-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
internal compiler error: cannot lex source_file
without source: /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/ppv-lite86-0.2.6/src/x86_64/mod.rs
#69933
Comments
Also to note: so far this has happened 2/2 times today. It didn't happen yesterday (which presumably was running using a slightly-older rustc and checking slightly-older glean code). |
Re-running the command:
in the proper directory on the machine in question reproduces the error. The file it's complaining about ( |
Running the command over and over changes which crate it errors out on. In the initial run it was erroring out on |
If I remove the /cc @Xanewok |
I'm able to reproduce this in a local environment as well. Minimal steps so far (on a Ubuntu 18.04 VM)
I ran
(Obviously your paths may vary) Also note that this does NOT happen with |
Rust regression range: 3dbade6...1581278 |
If you're unable to repro or need more detail feel free to let me know. Otherwise for now I'm leaving this with you (i.e. rust developers) to dig into. |
I have the very same crush with rustc 1.43.0-nightly (c20d7ee 2020-03-11) on both of Mac and WSL2/Ubuntu, every time Rust language Server starts up in VSCode.
Error message:
|
I used |
I'd say this is a pre-existing save-analysis bug that was exposed by #66364.
|
Same here: Code
Meta
Output
|
Actually, this doesn't have to fail at all either, it's just hardcoded to non-external files: rust/src/librustc_parse/lexer/mod.rs Lines 49 to 54 in e0f5df0
Before checking for the source, it would need to do this: sess.source_map.ensure_source_file_source_present(source_file.clone()); And then something like this to handle both local and external sources: rust/src/librustc_span/source_map.rs Lines 586 to 590 in e0f5df0
|
So what are next steps here? I don't know what rustc's policy is with respect to regressions, is the regressing patch author responsible for fixing the regression? |
Downgrading to |
Sorry, I'll go implement #69933 (comment) now. |
I'm not sure why the original reproduction seemed so daunting, it triggered the bug as expected. I was also able to reproduce it on the problem crate itself: git clone https://github.com/cryptocorrosion/cryptocorrosion
cd cryptocorrosion
RUSTFLAGS="-Z save-analysis" cargo +nightly check and it succeeds with this (which is my local build including #70172): RUSTFLAGS="-Z save-analysis" cargo +rust-2-stage1 check
|
…trochenkov parse/lexer: support `StringReader::retokenize` called on external files. This ~~should theoretically~~ fixes rust-lang#69933, ~~but I'm not sure what the best way to test it is~~. **EDIT**: see rust-lang#69933 (comment). r? @petrochenkov cc @Xanewok @staktrace
Thank you for the fix! At the moment using rustup to pull a nightly still gives me an older nightly (due to newer ones missing various components) but once I can get a nightly with the fix I'll report back whether or not it solved my original issue. |
Confirmed the fix by forcing a nightly update. Thanks! |
I am running into this / similar issue when
versions
Here is the simple reproducible test case https://github.com/Gozala/rls-vscode-bug-report |
Never mind I see now that version I have is |
The setup under which this occurs is somewhat complicated, but I'll try to reduce it as much as I can and update this issue with details. But basically it's using the latest nightly rustc and running
cargo check
on the latestglean
code (https://github.com/mozilla/glean, rev a30e58cebe6888a6c15fcb58d32dc00a9c38bc17).Code
Meta
rustc --version --verbose
:Error output
(See full output in the backtrace details below)
Backtrace
The text was updated successfully, but these errors were encountered: