-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Parse .cabal files; show error and warning diagnostics #2954
Conversation
Wait... do all the plugins share the same dependency version? This plugin uses the parser from Cabal==3.6.2.0, and by looking at the CI logs it fails because it tries to use the same Cabal version for everything? :-/ |
All of the Haskell packages are compiled together into a single build plan by Cabal, yes. But I don't think any other plugins impose version constraints on Cabal. Possibly there's something to do with the Cabal library being bundled with GHC? It wouldn't shock me if we were only able to enable this on newer GHCs which give us a newer cabal library. |
0818d3c
to
5c6eeaa
Compare
d3e68ba
to
062b62a
Compare
062b62a
to
a0b7ff8
Compare
Mention it in the docs? For example section "Features", "Supported GHC Versions", etc. |
build-depends: | ||
, base >=4.12 && <5 | ||
, bytestring | ||
, Cabal ^>=3.2 || ^>=3.4 || ^>=3.6 |
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.
So, this is the Cabal
we use to build HLS. What will happen when this version mismatches the user's cabal-install
version? For GHC, we require the versions to equal. Maybe mention this information somewhere in docs.
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.
iirc, it would not be a problem to use the same cabal version for all GHC versions here, since Cabal 3.6 still compiles with GHC 8.8. However, stack makes it difficult, as we would have to either allow newer Cabal versions for all dependencies, or make the old resolver use the newer version for virtually all dependencies (e.g. packages that needed only version revisions). Don't know what do exactly do here, however, pre-built executables aren't build with stack so it should always use Cabal 3.6, afaict.
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.
I think this generally isn't too much of a problem: this plugin mostly operates on cabal files, and different versions of cabal usually treat cabal files the same; differences in behaviour are controlled with the cabal-version
field. So I think we're okay. BUT worth a comment :)
@runeksvendsen are you able to wrap up this PR? |
@pepeiborra I am making sure this PR will be pushed over the finish line. At the moment, we struggle with indeterministic test failure. Also, I want to add more tests, before merging. |
23066ed
to
0ebea4d
Compare
Co-authored-by: Julian Ospald <[email protected]>
Configure a "kick" function for cabal files that is run when the shake queue needs to be restarted. Copy pastes from ghcide and 'files of interest'. Maybe more abstraction needed.
3cce877
to
996d6a1
Compare
24f9f9b
to
701915c
Compare
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.
LGTM!
Depends on #2945