Skip to content
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

gracefully handle errors for unsupported cabal version #4425

Conversation

fridewald
Copy link
Contributor

This PR makes sure that line number 0 returned from cabal is handled correctly.

This caused the marking of the whole cabal file if the cabal version is not supported as described in #4401

@fridewald fridewald requested a review from fendor as a code owner October 12, 2024 13:39
Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@fridewald fridewald force-pushed the 4401/gracfully_handle_errors_for_unsupported_cable_version branch from c8db13a to 1116c31 Compare October 12, 2024 14:27
@fendor fendor changed the title 4401/gracfully handle errors for unsupported cable version 4401/gracfully handle errors for unsupported cabal version Oct 12, 2024
@fridewald fridewald changed the title 4401/gracfully handle errors for unsupported cabal version gracfully handle errors for unsupported cabal version Oct 12, 2024
@fridewald fridewald force-pushed the 4401/gracfully_handle_errors_for_unsupported_cable_version branch 2 times, most recently from 295dcb8 to 40173f4 Compare October 13, 2024 12:15
@fendor fendor changed the title gracfully handle errors for unsupported cabal version gracefully handle errors for unsupported cabal version Oct 13, 2024
Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One little improvement to the much appreciated error message!

Otherwise, LGTM and we can merge.

plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs Outdated Show resolved Hide resolved
@fendor fendor enabled auto-merge (squash) October 20, 2024 19:25
@fridewald
Copy link
Contributor Author

Sorry for not responding, and thanks for adding the last missing change!

@fendor
Copy link
Collaborator

fendor commented Oct 20, 2024

No worries, it is usually no hurry, but we likely will have a release soon, I would love to have this change in :)

So rather, my apologies for just pushing changes without asking!

@fendor fendor force-pushed the 4401/gracfully_handle_errors_for_unsupported_cable_version branch from b543998 to 12cbc38 Compare October 20, 2024 20:13
@fendor fendor force-pushed the 4401/gracfully_handle_errors_for_unsupported_cable_version branch from 12cbc38 to 869e8a3 Compare October 20, 2024 20:13
@fendor fendor merged commit 3591109 into haskell:master Oct 20, 2024
36 checks passed
@fridewald fridewald deleted the 4401/gracfully_handle_errors_for_unsupported_cable_version branch October 20, 2024 21:44
noughtmare pushed a commit to noughtmare/haskell-language-server that referenced this pull request Oct 23, 2024
* Safely handle linenumbering for errors in the first line of cabal files

* add integration test for unsupported cabal version

Signed-off-by: Julian Kalema Lukwata <[email protected]>

* cast unsupported cabal version as warning

* add better warning text

* Add supported cabal-versions to the error message

---------

Signed-off-by: Julian Kalema Lukwata <[email protected]>
Co-authored-by: Fendor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants