-
Notifications
You must be signed in to change notification settings - Fork 182
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
Make duplicate output paths an error instead of a warning #682
Comments
Agreed. It should fail, and it only prints a warning for backwards compatibility with bad use cases. I am happy to go with option 2, but with a rule attribute rather than fail as the default. I think the backwards compatibility problem is not as bad as it could be. There are a lot of dups, but for the same source file. Few people are doing sophisticated attribute rewrites and also having dups. If a large organization really needs a global default change, they can vendor in the rules and fix it there. We'll do the next release as 0.9.0. |
See bazelbuild#682 for discussion about the appropriate action to take.
* Add support for failing on file conflicts. See #682 for discussion about the appropriate action to take. * Update pkg_files.bzl --------- Co-authored-by: aiuto <[email protected]>
pkg_tar can detect when there are file conflicts (code). However, when it detects them, it prints them instead of failing. I see no reason why anyone would want it on
print
other than for backwards compatibility (which I assume is why it was first added), but if anyone can think of a reason, please tell me.I'm happy to implement this myself. However, there are a few ways we could do it, and I don't know what the best approach would be to take. I was looking for approval / feedback on the best approach to take.
Option 1: Simple cutoff
Change
print
tofail
, and maybe increment the major version to indicate backwards incompatible changes. Alternatively, we may consider waiting for a major version increase to do this.Option 2: Feature flag
Create a bool_flag that controls whether it prints or fails. Initially default it to false, and when we release other backwards incompatible changes, we can set it to true.
The text was updated successfully, but these errors were encountered: