Skip to content

Conversation

@cameel
Copy link
Collaborator

@cameel cameel commented Sep 30, 2021

Implements part of #11629.
Depends on #12070. In draft mode until that PR is merged. Merged.

This makes the compiler report errors when outputs that are unavailable in the current input mode are selected via CLI flags.

This was originally a part of a bigger PR that enables output selection in assembly mode but it actually also makes sense on its own and can be considered a separate feature/fix.

@cameel cameel self-assigned this Sep 30, 2021
@cameel cameel force-pushed the cli-validate-output-selection branch from 71b3b0e to 12f1312 Compare September 30, 2021 20:37
@cameel cameel force-pushed the refactor-cli-output-flags branch from 22881a3 to bdfbbeb Compare October 1, 2021 11:13
@cameel cameel force-pushed the cli-validate-output-selection branch 2 times, most recently from 813ea59 to e7fc139 Compare October 1, 2021 12:42
Base automatically changed from refactor-cli-output-flags to develop October 4, 2021 14:03
@cameel
Copy link
Collaborator Author

cameel commented Oct 4, 2021

#12070 merged so this is now reviewable.

@cameel cameel marked this pull request as ready for review October 4, 2021 14:04
@cameel
Copy link
Collaborator Author

cameel commented Oct 4, 2021

This change is technically breaking, but it could be argued that it's a bugfix (see #11730 (comment)) if we consider missing CLI validations bugs rather than missing features.

@cameel cameel force-pushed the cli-validate-output-selection branch from e7fc139 to a3fa5d7 Compare October 4, 2021 14:37
@cameel cameel force-pushed the cli-validate-output-selection branch from a3fa5d7 to b9b2c69 Compare October 6, 2021 18:09

switch (_mode)
{
case InputMode::Compiler:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I thought we need explicit [[fallthrough]]; but if this works, great!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only need that if there's anything between the labels.

@cameel cameel merged commit b0a5b92 into develop Oct 11, 2021
@cameel cameel deleted the cli-validate-output-selection branch October 11, 2021 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants