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

Cleanup command line options & documentation #107

Open
Araq opened this issue Jan 22, 2024 · 3 comments
Open

Cleanup command line options & documentation #107

Araq opened this issue Jan 22, 2024 · 3 comments

Comments

@Araq
Copy link
Member

Araq commented Jan 22, 2024

Many commands like use and pin and rep can work on a Workspace or an individual project. We should offer project.use and workspace.use as aliases that enforce a respective interpretation. If the qualified command syntax is not used then if the current working directory is a project the command is mapped to project.command and else if the working directory is a workspace it is mapped to workspace.command otherwise it is an error as it's not clear what was meant.

@elcritch
Copy link
Contributor

I can work on this, but need to clarify a bit.

Many commands like use and pin and rep can work on a Workspace or an individual project. We should offer project.use and workspace.use as aliases that enforce a respective interpretation.

It sort of makes sense that these would be somewhat different when working on workspace vs project. However for use, pin, and rep I can't actually think of the differences. Aside perhaps from whether a project's nimble file is updated. But would it also affect the actual dependencies, etc?

If the qualified command syntax is not used then if the current working directory is a project the command is mapped to project.command and else if the working directory is a workspace it is mapped to workspace.command otherwise it is an error as it's not clear what was meant.

This makes sense. We're just assuming folders with nimble files are projects?

@Araq
Copy link
Member Author

Araq commented Jan 24, 2024

This makes sense. We're just assuming folders with nimble files are projects?

No, we detect the workspace and if the current working directory is a workspace then it's a workspace command.

BTW since I wrote this I changed my mind: The syntax should be atlas cmd -p # project interpretation vs atlas cmd -w # workspace interpretation

@elcritch
Copy link
Contributor

No, we detect the workspace and if the current working directory is a workspace then it's a workspace command.

Ah ok, we just check for workspace first. I still don't really know what we do differently, but I can look at the code.

BTW since I wrote this I changed my mind: The syntax should be atlas cmd -p # project interpretation vs atlas cmd -w # workspace interpretation

That should be easier to do.

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

No branches or pull requests

2 participants