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

[create-astro] --help does not print all possible flags #6339

Closed
1 task
ansidev opened this issue Feb 23, 2023 · 12 comments · Fixed by #6352
Closed
1 task

[create-astro] --help does not print all possible flags #6339

ansidev opened this issue Feb 23, 2023 · 12 comments · Fixed by #6352
Labels
- P2: nice to have Not breaking anything but nice to have (priority) help wanted Please help with this issue!

Comments

@ansidev
Copy link
Contributor

ansidev commented Feb 23, 2023

What version of astro are you using?

latest

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

pnpm

What operating system are you using?

macOS

Describe the Bug

Steps to reproduce:

  1. Run pnpm create astro@latest --help.

--help does not print all possible flags. These flags should be generated automatically.

Link to Minimal Reproducible Example

N/A

Participation

  • I am willing to submit a pull request for this issue.
@ematipico
Copy link
Member

Hi @ansidev , what are the flags you expect to see?

@ematipico ematipico added the - P2: nice to have Not breaking anything but nice to have (priority) label Feb 23, 2023
@ansidev
Copy link
Contributor Author

ansidev commented Feb 23, 2023

Hi @ansidev , what are the flags you expect to see?

You can see possible flags here:

https://github.com/withastro/astro/blob/main/packages/create-astro/src/actions/context.ts#L30-L51

@natemoo-re natemoo-re added the help wanted Please help with this issue! label Feb 23, 2023
@natemoo-re
Copy link
Member

Thanks for catching this—PRs welcome! Not sure if we'll have time to update ourselves but this seems like a great first issue for someone.

@SerekKiri
Copy link
Contributor

Hello 👋🏼 , if @ematipico wants to work on it then go on, if not I would love to pick it up 👍🏼

@ansidev
Copy link
Contributor Author

ansidev commented Feb 24, 2023

Hello 👋🏼 , if @ematipico wants to work on it then go on, if not I would love to pick it up 👍🏼

@SerekKiri At least this solution might resolve this issue, however, your solution does not solve it.

If flags were added, however, the developer forgets to update the help command, which will cause this issue again.

I expect a solution that automatically generates output for --help from given arguments and flags, ...

@SerekKiri
Copy link
Contributor

Ok, sounds good 👍🏼 I missed that part in the description 😅

@SerekKiri
Copy link
Contributor

@ansidev one question tho, do you expect for the ones that would be automatically added to have description?

@rishi-raj-jain
Copy link
Contributor

@ansidev

I think each flag's description can be added whenever a new one is added (which won't be that frequent ig), but something to be made sure of so would defer to @matthewp (to introduce a process for this maybe?)

@matthewp
Copy link
Contributor

Perfect is the enemy of good :) Flags are not added often enough to justify some big effort to attempt to automate them. So we should just add the ones that are missing imo :)

@rishi-raj-jain
Copy link
Contributor

rishi-raj-jain commented Feb 24, 2023

Yup, totally agreed!

Maybe can be just as small as a checkbox on the PR template.

@natemoo-re natemoo-re linked a pull request Feb 24, 2023 that will close this issue
@SerekKiri
Copy link
Contributor

@rishi-raj-jain hmm a checkbox is not a bad idea but does it make sens to add it to a template? I think it's a good thing to focus on during a code review and for a developer to remember.

@ansidev
Copy link
Contributor Author

ansidev commented Feb 24, 2023

I like this library: https://github.com/urfave/cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P2: nice to have Not breaking anything but nice to have (priority) help wanted Please help with this issue!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants