-
Notifications
You must be signed in to change notification settings - Fork 133
New 'spago init --subpackage foo' option to initialize a sub-project within current workspace #1279
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
Conversation
…within current workspace
4016324 to
9a32078
Compare
|
@f-f is force-pushing a rebase on master ok? |
I mean, anything goes since we squash-merge everything. When I do it myself I always merge instead of rebasing because it makes it easier to deal with conflicts, but it doesn't matter in this case. |
bin/src/Flags.purs
Outdated
| initMode = | ||
| (Init.InitSubpackage <$> subpackageName) | ||
| <|> (Init.InitWorkspace <$> maybePackageName) | ||
| <|> Prelude.pure (Init.InitWorkspace Nothing) |
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.
Why import Prelude qualified here? It's already an open import.
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.
Because there is a value named pure in this module. It's parsing the --pure flag.
Took me a few minutes to figure out :-)
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.
Oh no, how is it not issuing a warning? 🤔
Let's rename the flag to pureLockfile or something like that
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.
Done
Description of the change
Fixes #1137
spago init --subpackage foocreates a new subdirectoryfooand initializes a project there with workspace-less config.spago init --subpackage foo --name baris disallowed.--subpackageis used together with--package-setand/or--use-solver, these options are ignored (obviously) and a warning is printed out.optparseconfig level, but decided it would be too unobvious.Checklist:
[ ] Added some example of the new feature to theREADME