-
Notifications
You must be signed in to change notification settings - Fork 136
Command plugin should skip irrelevant targets when run without --target argument #798
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
Command plugin should skip irrelevant targets when run without --target argument #798
Conversation
Good... the canary commit shows the failure:
But... annoyingly we get badly ordered output since there's a mix of stderr and stdout logging from the plugin and tool. A well behaved tool should log to stderr and reserve stdout for actual output that could e.g. be piped to other processes. I'll add one more commit to fix that before adding the commit for the actual fix. |
e496d38
to
8eaf620
Compare
OK, great. This is now failing as we expect:
I'll add the fix. |
And, now things are working as expected:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving, feel free to decide what to do with the two comments
Motivation
In #795 we adjusted the logic of the command plugin because errors were not propagating properly. As a result, we regressed behaviour when the command plugin was run without any
--target
argument. In this mode, the plugin runs on all targets. When it detects a misconfigured target it errors, as it should. However, the classification of misconfigured target included targets that were not intended for code generation at all, resulting in errors running the command plugin on packages with others targets.Modifications
--target
argument and cannot find any of the required files, skip that target.Result
Test Plan
This PR includes two commits. The first adds a step to the integration test, which runs the command plugin on the integration test package. This will fail in CI. Then the second commit will provide the fix, which should pass in CI. The commits will then be squash merged.