This repository was archived by the owner on Dec 29, 2022. It is now read-only.
Conversation
Cargo has switched exclusively to `toml_edit`, so when downcasting errors to get line and column, we need to downcast for those errors as well. This does not attempt to port rls to `toml_edit` and an analysis was not done to verify if the `find_toml_error` code path only needs to check for one toml library. The downside to this solution is its brittle. Any time cargo upgrades through a breaking `toml_edit` version, this test will break again and we'll have to upgrade rls to fix it.
ehuss
approved these changes
Feb 10, 2022
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Feb 10, 2022
Update rls 2 commits in f37425e33c864c697af06df66e7473444605c149..3df74381f37617ec800537c11fb0c3130f5f3616 2022-01-15 18:07:20 +0100 to 2022-02-10 07:33:33 -0800 - chore: Upgrade cargo (rust-lang/rls#1764) - Bump rls-analysis version
bors
added a commit
to rust-lang/cargo
that referenced
this pull request
Apr 27, 2022
chore: Upgrade toml_edit ### What does this PR try to resolve? This upgrades toml_edit and tries to make future upgrades easier. To do this, it officially adds `toml_edit` to the public API but this will let RLS use these errors and stay up-to-date without manual intervention. ### How should we test and review this PR? The main question is if we should have toml_edit in the API ### Additional information See rust-lang/rls#1764
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cargo has switched exclusively to
toml_edit, so when downcastingerrors to get line and column, we need to downcast for those errors as
well.
This does not attempt to port rls to
toml_editand an analysis was notdone to verify if the
find_toml_errorcode path only needs to checkfor one toml library.
The downside to this solution is its brittle. Any time cargo upgrades
through a breaking
toml_editversion, this test will break again andwe'll have to upgrade rls to fix it.
The tracking of
manifest_error_rangewas changed because I was originally exploring removing it. ReturningNonedidn't change the test to fail in a way I expected, so I pivoted to getline_colintotoml_edit. I felt the change did make the code better match intent and since it was a distinct commit, I kept it here. I can remove it if needed.