-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Use the existing path when removing the prefix fails #41170
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
Conversation
… use of out-of-tree paths to be specified
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Thanks for the PR! This looks right to me but I'm not quite sure how it came up. Can you elaborate as to the use case that caused this to panic? |
Sure thing. I'm working on modifications to rls-data, which is currently specified through a version on crates.io. My approach was to download rls-data locally, make changes and point the compiler to my local copy. In the Cargo.toml in librustc_save_analysis, I specified this new dependency as |
On IRC I was asking whether or not this is a change that was needed or not. While it's helpful for me, I wanted to make sure you guys also agreed. |
@alexcrichton (I know you're traveling this week, just keeping this on your radar)
Wdyt alex? |
@Nashenas88 gah sorry for the delay, got caught up in a lot of travel! In any case that sounds like a perfect use case to me, thanks for the PR! @bors: r+ |
📌 Commit a6f7628 has been approved by |
Use the existing path when removing the prefix fails This allows the use of out-of-tree paths to be specified. I found this while trying to build with a modified version of `rls-data`, which is currently pointing to a version on crates.io. cc @alexcrichton Also, it wasn't clear if I needed to add a test for this (or how). I didn't see any tests that took paths into consideration.
☀️ Test successful - status-appveyor, status-travis |
This allows the use of out-of-tree paths to be specified. I found this while trying to build with a modified version of
rls-data
, which is currently pointing to a version on crates.io.cc @alexcrichton
Also, it wasn't clear if I needed to add a test for this (or how). I didn't see any tests that took paths into consideration.