-
Notifications
You must be signed in to change notification settings - Fork 202
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
enhance apply_regex_substitutions to allow specifying action to take in case there are no matches #3440
enhance apply_regex_substitutions to allow specifying action to take in case there are no matches #3440
Conversation
70bda6b
to
cb534f1
Compare
Just wanted to highlight that this is expected to print warnings on current ECs/EasyBlocks. E.g. just got one from Bazel 3.4.1:
It's not a hard failure but incentivizes checking why those replacements don't apply: Either an upstream fix (so no longer required), an upstream change (so need to be adjusted) or a mistake in the regexps. Question also: Currently I warn only when none of the replacements applied. Maybe this should be enhanced to be more fine granular: Like |
That would probably be a good idea. But perhaps leave for a later enhancement unless it is trivial? |
It's not to hard but likely leads to more warnings. As mentioned I think that's ok. |
We don't want to start producing a large amount of warnings for what's basically no-op actions. If the patching no longer works but doesn't cause trouble, it shouldn't result in a verbose warning in the That already applies here, regardless of whether we make the warnings more fine-grained or not... |
But what if the patching is important and the trouble is only detected much later when the software is actually used? E.g. for most *Make builds we don't even run tests... |
@Flamefire Can you revive this by fixing the merge conflict? |
c68b731
to
cc839f4
Compare
Rebased and resolved, hope that works |
That's a fair point, but the only way to catch issues like that is to get better at testing, not producing scary looking warnings for things that most likely don't matter. Usually if the patching silently failed it'll either trigger an installation error or it doesn't matter at all, I expect. There may be other cases, but we need to detect those in some other way imho. Just logging a warning ( |
@Flamefire This will need some conflict resolving after the merge of #3507 |
4c8473c
to
083ac7e
Compare
Rebased. Wasn't particularly great to resolve the conflicts. Please doublecheck the result |
1517ecf
to
aa4e3e3
Compare
@Flamefire More conflicts to resolve. @boegel What is your take on this now? |
aa4e3e3
to
75ad404
Compare
Co-authored-by: Kenneth Hoste <kenneth.hoste@ugent.be>
75ad404
to
c697690
Compare
on_missing_match
parameter withwarn
as default (from--strict
) to catch outdated or faulty replacements but give invokers control over what should be done