-
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
custom-setup: build path doesn't show Cabal version from extra-deps #3020
Comments
Hmm, yes I believe it is using the globally installed Cabal version instead. The support for the custom-setup stanza made it so that snapshot / extra-deps Cabal will actually be used. I'm thinking it will make sense to almost always use the snapshot / extra-deps version of Cabal - see #3049 . Lets see how that all turns out before addressing this. |
Hmm, this is particularly hard to fix, because in quite a few places stack assumes it is just using one version of Cabal. The custom-setup support means it now will potentially use two different versions of Cabal. This means that for The only clean solution I can see to this is to remove @snoyberg Will bad things happen if we drop the Cabal version from the paths? If we don't trust it to gracefully handle using dist directories written by a different version, then perhaps we can store the Cabal version along with the config cache. If the version has changed, wipe out the dist dir. This would also shorten paths, which is good for avoidance of MAX_PATH issues.. |
My understanding is that the differentiation by Cabal version helped keep apart build artifacts from different resolvers, effectively providing separate "build caches" for different resolvers / project configurations. Obviously these "separated build caches" worked imperfectly – when you switch from e.g. lts-8.3 to lts-8.4 you still have to rebuild everything (right?) because they use the same compiler and therefore the same Cabal version. (I hope I got this right.) I'm wondering if – loosely speaking – implicit snapshots could provide a better "criterion" for separating build artifacts… but I'm a bit too tired right now, this might not make any sense at all. EDIT:
Actually this "imperfection" might be a good heuristic for determining which project configurations to keep apart, and where to allow the build artifacts from one configuration to overwrite those from another configuration. |
I don't believe any change is needed here. The build path references the globally installed Cabal library, which is still being used for non-custom setups. For the custom setups which are using the local or snapshot version of Cabal, the snapshot itself is encoding which version is being used, and changing that Cabal version will either entail using a different snapshot or forcing recompilation of the local packages. |
Hmm, true, we likely don't need to change anything here. It does seems weird to me that we're putting a different Cabal version in the path. If the mismatch doesn't matter, then it makes me think we don't need it in the paths at all. |
I agree that the problem isn't severe enough to warrant making things more complicated.
I tried to explain in #3020 (comment) why I think that the Cabal version in the path (currently!) has its use. |
The build paths list
Cabal-1.24.2.0
where I would expectCabal-1.24.0.0
.The verbose logs do reveal though that the
Setup.hs
file was built with Cabal-1.24.0.0:The warnings for
directory
andprocess
seem a bit overkill too.The text was updated successfully, but these errors were encountered: