Run Spago from a nested directory other than workspace root#1310
Run Spago from a nested directory other than workspace root#1310f-f merged 36 commits intopurescript:masterfrom
Conversation
|
All feedback addressed except the request to mention #951, because I didn't understand what it meant. |
|
Thank you @fsoikin for implementing this feature! |
| - console: ">=6.0.0 <7.0.0" | ||
| - effect: ">=4.0.0 <5.0.0" | ||
| - prelude: ">=6.0.1 <7.0.0" | ||
| - prelude: ">=6.0.2 <7.0.0" |
There was a problem hiding this comment.
This change and equivalent changes in other test fixtures are not related to the PR as such, but are fixing a different issue.
- Prelude 6.0.2 was published on February 15th. It is included in package set 63.3.0.
- Because of this, when building with registry solver, Spago pulls in this new version of prelude.
- These test projects, however, explicitly specify prelude 6.0.1 as well as package set versions that don't have prelude 6.0.2 in them.
- As a result, building with solver and building with package set produces different build plans, which in turn causes
spago publishto run a new build, even ifspago buildwas run immediately before it, which in turn produces compiler progress output, and this compiler progress output was unexpected in test fixtures, causing the tests to fail. - To fix the issue, I upgraded the test fixtures to use prelude 6.0.2 and a corresponding package set, so that build plans with and without solver will match for these projects.
- This is not a good solution though, only a bandaid "for now". It will break again as soon as new packages are published. I'm not 100% sure what a good solution would be. Perhaps make the registry solver able to use a past snapshot of the registry? Or we could artificially cut out expected compiler output, like we already kind of do in some tests. Or, perhaps, this is actually good: this way Spago development never goes stale and keeps up with new stuff in new package sets.
There was a problem hiding this comment.
@fsoikin , can this be merged as-is? When an updated package set causes test breakage in the future, I suggest we continue patching until a permanent solution is found. The value-add of this PR is already big, as it is. Thanks again
f-f
left a comment
There was a problem hiding this comment.
Sorry I got to this only now - thanks for the massive effort! ❤️
|
Yes, seconded, thank you @fsoikin. @f-f , can we tag a new release |
|
@peterbecich published 0.93.44 |
|
thanks @f-f ! |
Description of the change
Fixes #1237
Allowing Spago to be launched from a directory nested within the workspace.
spago.yamlcontaining a workspace.spago.yamlfiles back down the tree and loads those that it hasn't loaded while walking up.spago.yml(wrong extension) files.spago.yamlit sees. If this is not the root project, it will become "selected".-poption. But on the other hand, it's very likely that if your CWD is a particular project, you're probably working on just that one.ymlfiles found along the way, if any, suggesting that they may have the wrong extension.Checklist:
[ ] Added some example of the new feature to theREADME