Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

tests: Add a test for rust-lang/rust#57462 and go-to-definition without racer in general. #1230

Merged
merged 1 commit into from
Jan 22, 2019

Conversation

emilio
Copy link
Contributor

@emilio emilio commented Jan 9, 2019

No description provided.

@Xanewok
Copy link
Member

Xanewok commented Jan 9, 2019

And without the racer fallback we're not able to go to the definition of either Foo or Foo::new.

Are you sure? I tried with "rust.goto_def_racer_fallback": false and in this case the go-to-def worked only on new.

Could you try initializing with

"rootPath": root_path,
"capabilities": {},
"initializationOptions": {
    "settings": {
        "rust": {
            "goto_def_racer_fallback": false
        }
    }
}

and see if we can go-to-def on new but not on Foo?

@emilio
Copy link
Contributor Author

emilio commented Jan 9, 2019

Will try, thanks for the hint!

@emilio emilio changed the title tests: Add a test attempt for rust-lang/rust#57462. tests: Add a test attempt for rust-lang/rust#57462 and go-to-definition without racer in general. Jan 9, 2019
@emilio
Copy link
Contributor Author

emilio commented Jan 9, 2019

Ok, what was going on is that I wasn't waiting for the initialize response, so that was biting me and I was missing responses.

I added a more complete test where I query all the points in the program with racer disabled, but I can keep it simple and just test that I find Foo in Foo::new instead, just lmk.

@emilio
Copy link
Contributor Author

emilio commented Jan 9, 2019

(The reason I did that is because we have a couple more bugs reported against searchfox.org which may share the same root cause, but if they don't I may need to go and fix them and extend this test :P).

@emilio emilio changed the title tests: Add a test attempt for rust-lang/rust#57462 and go-to-definition without racer in general. tests: Add a test for rust-lang/rust#57462 and go-to-definition without racer in general. Jan 9, 2019
@emilio
Copy link
Contributor Author

emilio commented Jan 9, 2019

Ok, this should be good to go now. Test fails without my patch, passes with it. Also sent an improvement to existing tests in #1232.

@Xanewok
Copy link
Member

Xanewok commented Jan 9, 2019

I added a more complete test where I query all the points in the program

That seems total but I like that, thanks!

As I understand it, this should fail now and we should retrigger it when rust-lang/rust#57474 lands upstream?

@emilio
Copy link
Contributor Author

emilio commented Jan 9, 2019

Yes, that's right.

@Xanewok Xanewok added the blocked Blocked on external issue/PR label Jan 11, 2019
@Xanewok
Copy link
Member

Xanewok commented Jan 14, 2019

Sorry for the merge conflict; could you rebase, please? Also the upstream change got merged, so I think this should be good to go.

@Xanewok Xanewok removed the blocked Blocked on external issue/PR label Jan 14, 2019
@emilio
Copy link
Contributor Author

emilio commented Jan 14, 2019

Sure, should be done :)


rls.wait_until_done_indexing(rls_timeout());

let uri = format!("file://{}/src/main.rs", root_path.display());
Copy link
Member

Choose a reason for hiding this comment

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

Windows tests fail:
Got

"file:///C:/Users/travis/build/rust-lang/rls/target/rlsit/t13/simple_workspace/src/main.rs"

Expected

file://C:\\Users\\travis\\build\\rust-lang\\rls\\target\\rlsit\\t13\\simple_workspace/src/main.rs

I think something like let uri = Url::from_file_path(p.root().join("src/main.rs")).unwrap(); should make it work cross-platform

@emilio
Copy link
Contributor Author

emilio commented Jan 15, 2019

Tweaked it to avoid having to compare the URL instead.

@Xanewok
Copy link
Member

Xanewok commented Jan 22, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Jan 22, 2019

📌 Commit e9e643b has been approved by Xanewok

@bors
Copy link
Contributor

bors commented Jan 22, 2019

⌛ Testing commit e9e643b with merge 17dae09...

bors added a commit that referenced this pull request Jan 22, 2019
tests: Add a test for rust-lang/rust#57462 and go-to-definition without racer in general.
@bors
Copy link
Contributor

bors commented Jan 22, 2019

☀️ Test successful - checks-travis
Approved by: Xanewok
Pushing 17dae09 to master...

@bors bors merged commit e9e643b into rust-lang:master Jan 22, 2019
@Xanewok
Copy link
Member

Xanewok commented Jan 22, 2019

@emilio Thank you again for the test =)

@emilio
Copy link
Contributor Author

emilio commented Jan 23, 2019

NP! :)

@emilio emilio deleted the testing-testing branch January 23, 2019 00:20
bors added a commit to rust-lang/rust that referenced this pull request Feb 2, 2019
submodule: update rls from c9d25b to e2145d

Update rls rust-lang/rls@c9d25b6...e2145d

rust-lang/rls#1276 - h-michael:clippy, r=Xanewok
rust-lang/rls#1269 - rust-lang:dependabot/cargo/rand-0.6.5, r=Xanewok
Remove extra backticks in contributing.md
rust-lang/rls#1267 from h-michael/contributingmd
rust-lang/rls#1268 from matthiaskrgr/rustup
rust-lang/rls#1262 from rust-lang/dependabot/cargo/tokio-0.1.15
rust-lang/rls#1264 - h-michael:pub-crate, r=alexheretic
rust-lang/rls#1261 - rust-lang:dependabot/cargo/tokio-timer-0.2.9, r=Xanewok
rust-lang/rls#1263 - Xanewok:update-clippy, r=Xanewok
rust-lang/rls#1257 from Xanewok/architecture
rust-lang/rls#1258 - rust-lang:dependabot/cargo/lsp-types-0.55.1, r=Xanewok
rust-lang/rls#1255 - Xanewok:you-only-complete-once-fool, r=Xanewok
rust-lang/rls#1252 - rust-lang:dependabot/cargo/cargo_metadata-0.7.0, r=alexheretic
rust-lang/rls#1253 - rust-lang:dependabot/cargo/lsp-types-0.55.0, r=Xanewok
rust-lang/rls#1254 - rust-lang:dependabot/cargo/serde_json-1.0.37, r=Xanewok
dependabot: Explicitly list default allowed_updates
dependabot: Add automerge strategy for clippy_lints
rust-lang/rls#1251 - Xanewok:translate-deglob-test, r=Xanewok
rust-lang/rls#1250 from alexheretic/master
rust-lang/rls#1244 - Xanewok:translate-tests, r=alexheretic
rust-lang/rls#1247 - alexheretic:register-more-clippy, r=Xanewok
rust-lang/rls#1230 - emilio:testing-testing, r=Xanewok
rust-lang/rls#1246 from alexheretic/did-save-manifest
Merge branch 'beta-version-bump' of https://github.com/rust-lang-nursery/rls
bors added a commit to rust-lang/rust that referenced this pull request Feb 3, 2019
submodule: update rls from c9d25b to f331ff7

Update rls rust-lang/rls@c9d25b6...e2145d

rust-lang/rls#1276 - h-michael:clippy, r=Xanewok
rust-lang/rls#1269 - rust-lang:dependabot/cargo/rand-0.6.5, r=Xanewok
Remove extra backticks in contributing.md
rust-lang/rls#1267 from h-michael/contributingmd
rust-lang/rls#1268 from matthiaskrgr/rustup
rust-lang/rls#1262 from rust-lang/dependabot/cargo/tokio-0.1.15
rust-lang/rls#1264 - h-michael:pub-crate, r=alexheretic
rust-lang/rls#1261 - rust-lang:dependabot/cargo/tokio-timer-0.2.9, r=Xanewok
rust-lang/rls#1263 - Xanewok:update-clippy, r=Xanewok
rust-lang/rls#1257 from Xanewok/architecture
rust-lang/rls#1258 - rust-lang:dependabot/cargo/lsp-types-0.55.1, r=Xanewok
rust-lang/rls#1255 - Xanewok:you-only-complete-once-fool, r=Xanewok
rust-lang/rls#1252 - rust-lang:dependabot/cargo/cargo_metadata-0.7.0, r=alexheretic
rust-lang/rls#1253 - rust-lang:dependabot/cargo/lsp-types-0.55.0, r=Xanewok
rust-lang/rls#1254 - rust-lang:dependabot/cargo/serde_json-1.0.37, r=Xanewok
dependabot: Explicitly list default allowed_updates
dependabot: Add automerge strategy for clippy_lints
rust-lang/rls#1251 - Xanewok:translate-deglob-test, r=Xanewok
rust-lang/rls#1250 from alexheretic/master
rust-lang/rls#1244 - Xanewok:translate-tests, r=alexheretic
rust-lang/rls#1247 - alexheretic:register-more-clippy, r=Xanewok
rust-lang/rls#1230 - emilio:testing-testing, r=Xanewok
rust-lang/rls#1246 from alexheretic/did-save-manifest
Merge branch 'beta-version-bump' of https://github.com/rust-lang-nursery/rls
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants