-
Notifications
You must be signed in to change notification settings - Fork 132
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
69799a2
New 'spago init --subpackage foo' option to initialize a sub-project …
fsoikin 879c9ef
Fix fixture
fsoikin 2232d6d
And we should never, ever forget about Windows. Or else.
fsoikin be3d4d7
Tolerate verying versions
fsoikin b56a266
Reformat all the things!
fsoikin 40a4480
Restore error order
fsoikin 2f44ed3
Move logging again
fsoikin fadbcc8
Fix up fixtures again
fsoikin 9a32078
Update to new CLI help output
fsoikin b620e05
Account for another possible layout
fsoikin 46515fd
Review: named fields, remve unsafeCoerce, add type signatures, quote …
fsoikin 01731bd
Properly quote:
fsoikin 14e128d
Rename pure to pureLockfile
fsoikin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Invalid option `--subpackage' | ||
|
||
Usage: index.dev.js init [--migrate] [--monochrome|--no-color] [--offline] [-q|--quiet] [-v|--verbose] ([--subpackage ARG] | [--name ARG]) [--package-set ARG] [--use-solver] | ||
Initialise a new project | ||
|
||
Available options: | ||
--migrate Migrate the spago.yaml file to the latest format | ||
--monochrome,--no-color Force logging without ANSI color escape sequences | ||
--offline Do not attempt to use the network. Warning: this will | ||
fail if you don't have the necessary dependencies | ||
already cached | ||
-q,--quiet Suppress all spago logging | ||
-v,--verbose Enable additional debug logging, e.g. printing `purs` | ||
commands | ||
--subpackage ARG Name of a subpackage to initialize within the current | ||
workspace | ||
--name ARG Optional package name to be used for the new project | ||
--package-set ARG Optional package set version to be used instead of | ||
the latest one | ||
--use-solver Use the solver instead of package sets | ||
-h,--help Show this help text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Initializing a new project... | ||
Found PureScript a.b.c, will use package set x.y.z | ||
Found existing directory subdir/src, skipping copy of sample sources | ||
Set up a new Spago project. | ||
Try running `spago run -p subdir` |
8 changes: 8 additions & 0 deletions
8
test-fixtures/init/subpackage/package-set-solver-warning-existing-files.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
‼ The --package-set and --use-solver flags are ignored when initializing a subpackage | ||
Initializing a new project... | ||
Found PureScript a.b.c, will use package set x.y.z | ||
Found a subdir/spago.yaml file, skipping copy. | ||
Found existing directory subdir/src, skipping copy of sample sources | ||
Found existing directory subdir/test, skipping copy of sample sources | ||
Set up a new Spago project. | ||
Try running `spago run -p subdir` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
‼ The --package-set and --use-solver flags are ignored when initializing a subpackage | ||
Initializing a new project... | ||
Found PureScript a.b.c, will use package set x.y.z | ||
Set up a new Spago project. | ||
Try running `spago run -p subdir` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package: | ||
name: subdir | ||
dependencies: | ||
- console | ||
- effect | ||
- prelude | ||
test: | ||
main: Test.Main | ||
dependencies: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package: | ||
name: subdir2 | ||
dependencies: | ||
- console | ||
- effect | ||
- prelude | ||
test: | ||
main: Test.Main | ||
dependencies: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thatThere 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