Skip to content
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

Fixes #124 - Created alias variable by allowing multiple command attributes #125

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

BlackPhlox
Copy link

First draft for how to fix #124.

Created alias variable by allowing multiple command attributes, generation changes and test that passes.

@BlackPhlox
Copy link
Author

CommandAliasWithRoot currently fails as it generates a switch case for which there are no switches generated at that location due to being root.

@BlackPhlox BlackPhlox mentioned this pull request Jun 16, 2024
@neuecc
Copy link
Member

neuecc commented Jun 18, 2024

Thank you, I ran the code and checked it.

The choice to allow setting multiple Commands is OK.
Since I think only some users will use it, it's good that it doesn't change for normal use cases.

Regarding the code:
Having the emit for aliases in EmitRunBody feels a bit off, I feel there might be a more appropriate place for it.
Also, the output code unnecessarily indented the case statements.
string[] Aliases probably won't be Incremental,
so an Incremental test is needed (see IncrementalGeneratorTest).

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.

Alias Commands
2 participants