-
Notifications
You must be signed in to change notification settings - Fork 841
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
Use stack init logic for global stack build #1693
Comments
That's a good idea. And if we use Another possibility is to use |
How about |
Could write it to a temp location, but I'm not sure where it'd go if we did write it somewhere.
Right! I'm not sure if we should encourage automatic updates to the global project, though.
Hmm, that could work decently. I'd really rather not support |
After considering this further, I think it makes sense to only search for a better snapshot, and report the best match. It should also suggest making a new stack.yaml or modifying the global project, if you want to do something fancier. This might detail how to Also, this should only be done when the build targets include non-local packages (like |
I did not mean automatic here. I meant the user invoking
True. I could not understand the last bit. I guess the local/non-local terminology is not clear to me. |
I got bitten by this myself today when trying to install
We can also combine the two options to try both - add external deps as well as scan to find the best resolver. This will be the most general do-whatever-it-takes config. @mgsloan thoughts? Should we bundle this in just one option (with less flexibility) or have both of the above? |
Can we have these for project packages as well or restrict to just external packages? I think for uniformity we should have for both. It cannot cause any harm as these are explicit options and not defaults. One would want to treat a locally available package just like an external package when she is only concerned with installing the package and not developing it. |
I saw scripts adding extra deps to global project for solving this problem like this one here. This also leaves the extra deps after the script finishes and might interfere with other installs. We need to get rid of such ugliness by design. |
Closing in favor of #2656 |
"haskell830" on #haskell was trying to install structured-haskell-mode via
stack install structured-haskell-mode
, and it didn't work because it's not updated to work with lts-4.Perhaps when the build plan fails with the global project, we could run stack init's logic to determine a better snapshot, and then suggest instead running
stack build --resolver lts-3.22 structured-haskell-mode
.One thing to consider is whether we'd add
--solver
as a build flag. Similarly to how the--resolver
build flag overrides the resolver field, this would override extra-deps.The text was updated successfully, but these errors were encountered: