-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit error if target appears twice #184
Comments
I think sequentially, 1) the latter one shall override the earlier ones or 2) throw an error. The matching criteria: a. template name, b. config file name, c. output file name are the same. A new class named 'target' may benefit the matching process. |
I am just wondering if output alone is the sole error emitter, two or more targets produces: 'great.output' |
This issue is about emitting an error now, because repeating a target now is not supported, especially if the target is repeated in |
to define 'repeat', would you agree that 'output' field is enough? |
When I looked at in code, there is an exception guard this error already, https://github.com/moremoban/moban/blame/dev/moban/plugins/strategy.py#L44. So I am closing it unless the exception does not raise when there are two duplicated targets. here is the test case for such a scenario: https://github.com/moremoban/moban/blob/dev/tests/integration_tests/test_command_line_options.py#L327 |
Where I encountered this was a copy: and a target: with the same filename. Now we are deprecating |
Oh I see. That makes sense. I forgot that copy was separate to targets. |
There are some future use-cases for a target appearing twice. e.g. #38 , and also splitting targets into multiple files , where it is more likely that two entries might occur.
We need to reject this occurring now, until we have decided how that scenario should be handled.
The text was updated successfully, but these errors were encountered: