-
Notifications
You must be signed in to change notification settings - Fork 131
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
Add flag for specifying config path location #357
Conversation
in osx build |
@justinwoo that error there is because of the test harness and is a normal (I'll refactor the tests so it doesn't happen), but the tests fail because I'm working through my backlog, I'll review this later today |
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.
This is cool by me, but I'm concerned about some edge cases that might be challenging UX-wise. A non-comprehensive list:
- when we search for local packages we hardcode the
spago.dhall
. I think we should not change this, but it might be weird in some usecase I'm not considering - We have a few more mentions of the
spago.dhall
that we might want to fix too inSpago.Messages
here and here and inSpago.Dhall
here - when we encourage things like
./spago.dhall // { dependencies = [ "prelude" ] }
, we have to make sure stuff that manipulates the AST directly still works (likespago install
)
So here I would like a test that makes sure thatspago -x foo.dhall install simple-json
works properly and:- actually adds the package if
foo.dhall
is./spago.dhall // { dependencies = [ "prelude" ] }
- and is a no-op if
foo.dhall
is./spago.dhall // { sources = [ "src/**/*.purs" ] }
- actually adds the package if
Co-Authored-By: Fabrizio Ferrai <fabrizio.ferrai@gmail.com>
I think it would also be good to just disallow automatic editing for anything that doesn't conform to the expected Expr structure, and instead just print warnings on what the users should do manually with their frankenstein-ass configs |
@justinwoo that is the current behaviour: if stuff doesn't conform to the expected structure then the editing is not performed. However we do not have the infrastructure to detect when this is the case and print warnings TL;DR: I believe if you add the tests I mentioned they will just pass |
This should now be good to go. @justinwoo can you take a look? |
Description of the change
fixes #329, specify config path globally if desired for specific usages
e.g.
spago.dhall
i don't want to build with all the sources.
codegen.dhall
other uses:
"optional app separate from library"
"test config overrides and modifications"
"some other config modifications"
Checklist:
README
P.S.: the above checks are not compulsory to get a change merged, so you may skip them. However, taking care of them will result in less work for the maintainers and will be much appreciated 😊