Skip to content

fix textDocument/selectionRange's method #388

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

Merged
merged 2 commits into from
Jan 4, 2022

Conversation

kokobd
Copy link
Collaborator

@kokobd kokobd commented Jan 3, 2022

fix #387

Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

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

Good catch, it should be catched by some type of testing, but it is a generic issue we should tackle somewhere else

@jneira jneira added the merge me label Jan 3, 2022
@kokobd
Copy link
Collaborator Author

kokobd commented Jan 4, 2022

Nix build passes but direct build fails. It looks like an orphan instance in JsonSpec.hs conflicts with latest version of aeson.

instance Arbitrary J.Value where

Should it be fixed here or in another PR?

@kokobd kokobd force-pushed the fix/selection-range branch from 66aa726 to 1ee82f3 Compare January 4, 2022 02:55
@kokobd
Copy link
Collaborator Author

kokobd commented Jan 4, 2022

According to aeson's changlog, it provides Arbitrary instance for Value starting from version 2.0.3.0

@jneira
Copy link
Member

jneira commented Jan 4, 2022

wow, @michaelpj got to support aeson >= 2.0 without any cpp, not sure if we could avoid it fixing this

@jneira
Copy link
Member

jneira commented Jan 4, 2022

Add a instance is a breaking change and it should be a major version bump 🙄
Well i would update the aeson bounds to exclude 2.0.3.0 to make ci work and check the pr changes and left the fix for another pr (if @michaelpj agree)

@mergify mergify bot merged commit c974bb0 into haskell:master Jan 4, 2022
@kokobd
Copy link
Collaborator Author

kokobd commented Jan 4, 2022

@jneira I've added version bound by another commit in this PR. CI has passed now.

@michaelpj
Copy link
Collaborator

Ugh, thanks for fixing this.

Re: the CPP, I think there's a more elegant solution. We only need the instance in the tests for the lsp package. So we can put a aeson >= 2.0.3.0 constraint on the test component of lsp, and unconditionally delete the instance. That will force a new aeson... but only for people who build the test component. Users who only depend on the library won't get that constraint and will continue being able to use any vesrion.

@michaelpj
Copy link
Collaborator

(Incidentally, I don't love the fact that merge-me auto-merges even if someone pushes another commit!)

@michaelpj
Copy link
Collaborator

#389

@Bodigrim
Copy link
Contributor

Bodigrim commented Jan 4, 2022

Add a instance is a breaking change and it should be a major version bump

This is a non-orphan instance, which according to PVP is non-breaking.

@kokobd kokobd deleted the fix/selection-range branch July 26, 2022 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

textDocument/selectionRange uses STextDocumentFoldingRange
4 participants