-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
[DO NOT MERGE] ./x test rust-analyzer
#136779
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry Albert, this PR is purely for reference purposes and is highly experimental. |
[features] | ||
default = [] | ||
in-rust-tree = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe could be --cfg
instead but idk
// RA's test suite tries to write to the source directory, that can't work in Rust CI. | ||
cargo.env("SKIP_SLOW_TESTS", "1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this will mean not all r-a tests would be run via ./x test rust-analyzer
/// When using `download-rustc`, we need to use a new build of `std` for running unit tests of | ||
/// std itself, but we need to use the downloaded copy of std for linking to rustdoc. Allow this | ||
/// to be overridden by `builder.ensure` from other steps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated comment reflow diffs, was annoying when reading these locally, I'll drop these formatting diffs if we want to merge the actual changes.
trace!( | ||
?force_recompile, | ||
is_git_managed = builder.rust_info().is_managed_git_subrepository(), | ||
download_rustc = builder.download_rustc(), | ||
last_modified_commit = | ||
?builder.config.last_modified_commit(&["library"], "download-rustc", true), | ||
"checking std force-recompile" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated tracing diff, was mostly to help local debugging, I'd like to upstream some of these tracing bits separately (unrelated to r-a tests).
if let Some(enzyme_install) = enzyme_install { | ||
if builder.config.llvm_enzyme { | ||
let enzyme_install = builder.ensure(llvm::Enzyme { target: build_compiler.host }); | ||
let lib_ext = std::env::consts::DLL_EXTENSION; | ||
let src_lib = enzyme_install.join("build/Enzyme/libEnzyme-19").with_extension(lib_ext); | ||
let libdir = builder.sysroot_target_libdir(build_compiler, build_compiler.host); | ||
let target_libdir = | ||
builder.sysroot_target_libdir(target_compiler, target_compiler.host); | ||
builder.sysroot_target_libdir(output_compiler, output_compiler.host); | ||
let dst_lib = libdir.join("libEnzyme-19").with_extension(lib_ext); | ||
let target_dst_lib = target_libdir.join("libEnzyme-19").with_extension(lib_ext); | ||
builder.copy_link(&src_lib, &dst_lib); | ||
builder.copy_link(&src_lib, &target_dst_lib); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated enzyme change
skip_all, | ||
fields(target = ?self.target, compiler = ?self.compiler), | ||
), | ||
)] | ||
fn run(self, builder: &Builder<'_>) -> u32 { | ||
let compiler = self.compiler; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Rustc
there's a comment on self.compiler
that says
/// The **previous** compiler used to compile this compiler.
pub compiler: Compiler,
I'm not 100% sure if that's actually true under all scenarios.
#[cfg_attr( | ||
feature = "tracing", | ||
instrument( | ||
level = "debug", | ||
name = "RustAnalyzer::run", | ||
skip_all, | ||
fields(stage = self.stage, host = ?self.host), | ||
), | ||
)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but you can look at the tracing logs locally via
$ BOOTSTRAP_TRACING=bootstrap=trace ./x test rust-analyzer
(or =debug
)
☔ The latest upstream changes (presumably #136751) made this pull request unmergeable. Please resolve the merge conflicts. |
(Uh sorry Onur, I have no idea how I managed to click that button, did not mean to do that) |
// FIXME: may need a fix from https://github.com/rust-lang/rust-analyzer/pull/19124. | ||
"--skip=config::tests::cargo_target_dir_subdir", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other tests pass locally, except for the test fixed in rust-lang/rust-analyzer#19124 (which can be re-eval'd after the next subtree sync)
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
[DO NOT MERGE] `./x test rust-analyzer` I somehow made `./x test rust-analyzer` work on my machine[^machine], **but at what cost?** Not intended for merge but only as a reference. If we do want to land this, I'll need to tidy this up. Notes: - I abused a bunch of cargo features `in-rust-tree`. It probably doesn't need to be, and simply `--cfg` might work. I was trying to get the main rust-analyzer tests to build *at all*. Anything building is already a miracle. - I had to slap a bunch of the following to all the r-a crates to get the tests to build at all. I don't 100% understand why, but otherwise I get a whole ton of ``expected `rustc_lexer` to be available in rlib format`` build failures. ```rs #![cfg_attr(feature = "in-rust-tree", feature(rustc_private))] #[cfg(all(feature = "in-rust-tree", test))] extern crate rustc_driver as _; ``` - Skipped one config test that was fixed on r-a master but not synced here in r-l/r yet. [^machine]: `x86_64-unknown-linux-gnu`, haven't bothered trying this on msvc yet. try-job: aarch64-gnu try-job: x86_64-apple-1 try-job: aarch64-apple try-job: i686-mingw-1 try-job: x86_64-mingw-1 try-job: i686-msvc-1 try-job: x86_64-msvc-1
This comment was marked as off-topic.
This comment was marked as off-topic.
@bors try |
@bors try |
[DO NOT MERGE] `./x test rust-analyzer` I somehow made `./x test rust-analyzer` work on my machine[^machine], **but at what cost?** Not intended for merge but only as a reference. If we do want to land this, I'll need to tidy this up. Notes: - I abused a bunch of cargo features `in-rust-tree`. It probably doesn't need to be, and simply `--cfg` might work. I was trying to get the main rust-analyzer tests to build *at all*. Anything building is already a miracle. - I had to slap a bunch of the following to all the r-a crates to get the tests to build at all. I don't 100% understand why, but otherwise I get a whole ton of ``expected `rustc_lexer` to be available in rlib format`` build failures. ```rs #![cfg_attr(feature = "in-rust-tree", feature(rustc_private))] #[cfg(all(feature = "in-rust-tree", test))] extern crate rustc_driver as _; ``` - Skipped one config test that was fixed on r-a master but not synced here in r-l/r yet. [^machine]: `x86_64-unknown-linux-gnu`, haven't bothered trying this on msvc yet. try-job: aarch64-gnu try-job: x86_64-apple-1 try-job: aarch64-apple try-job: i686-mingw try-job: x86_64-mingw-1 try-job: i686-msvc-1 try-job: x86_64-msvc-1
⌛ Trying commit b1738c9 with merge 7388bdea11d7e5065c7352cc6a1c9c6eb81a91e8... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
@bors try |
⌛ Trying commit 5322e1c with merge 1105fba3228149721a170beb101c38f9fd83b35b... |
[DO NOT MERGE] `./x test rust-analyzer` I somehow made `./x test rust-analyzer` work on my machine[^machine], **but at what cost?** Not intended for merge but only as a reference. If we do want to land this, I'll need to tidy this up. Notes: - I abused a bunch of cargo features `in-rust-tree`. It probably doesn't need to be, and simply `--cfg` might work. I was trying to get the main rust-analyzer tests to build *at all*. Anything building is already a miracle. - I had to slap a bunch of the following to all the r-a crates to get the tests to build at all. I don't 100% understand why, but otherwise I get a whole ton of ``expected `rustc_lexer` to be available in rlib format`` build failures. ```rs #![cfg_attr(feature = "in-rust-tree", feature(rustc_private))] #[cfg(all(feature = "in-rust-tree", test))] extern crate rustc_driver as _; ``` - Skipped one config test that was fixed on r-a master but not synced here in r-l/r yet. [^machine]: `x86_64-unknown-linux-gnu`, haven't bothered trying this on msvc yet. try-job: aarch64-gnu try-job: x86_64-apple-1 try-job: aarch64-apple try-job: i686-mingw try-job: x86_64-mingw-1 try-job: i686-msvc-1 try-job: x86_64-msvc-1
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
@bors try |
[DO NOT MERGE] `./x test rust-analyzer` I somehow made `./x test rust-analyzer` work on my machine[^machine], **but at what cost?** Not intended for merge but only as a reference. If we do want to land this, I'll need to tidy this up. Notes: - I abused a bunch of cargo features `in-rust-tree`. It probably doesn't need to be, and simply `--cfg` might work. I was trying to get the main rust-analyzer tests to build *at all*. Anything building is already a miracle. - I had to slap a bunch of the following to all the r-a crates to get the tests to build at all. I don't 100% understand why, but otherwise I get a whole ton of ``expected `rustc_lexer` to be available in rlib format`` build failures. ```rs #![cfg_attr(feature = "in-rust-tree", feature(rustc_private))] #[cfg(all(feature = "in-rust-tree", test))] extern crate rustc_driver as _; ``` - Skipped one config test that was fixed on r-a master but not synced here in r-l/r yet. [^machine]: `x86_64-unknown-linux-gnu`, haven't bothered trying this on msvc yet. try-job: aarch64-gnu try-job: x86_64-apple-1 try-job: aarch64-apple try-job: i686-mingw try-job: x86_64-mingw-1 try-job: i686-msvc-1 try-job: x86_64-msvc-1
💔 Test failed - checks-actions |
@bors try |
[DO NOT MERGE] `./x test rust-analyzer` I somehow made `./x test rust-analyzer` work on my machine[^machine], **but at what cost?** Not intended for merge but only as a reference. If we do want to land this, I'll need to tidy this up. Notes: - I abused a bunch of cargo features `in-rust-tree`. It probably doesn't need to be, and simply `--cfg` might work. I was trying to get the main rust-analyzer tests to build *at all*. Anything building is already a miracle. - I had to slap a bunch of the following to all the r-a crates to get the tests to build at all. I don't 100% understand why, but otherwise I get a whole ton of ``expected `rustc_lexer` to be available in rlib format`` build failures. ```rs #![cfg_attr(feature = "in-rust-tree", feature(rustc_private))] #[cfg(all(feature = "in-rust-tree", test))] extern crate rustc_driver as _; ``` - Skipped one config test that was fixed on r-a master but not synced here in r-l/r yet. [^machine]: `x86_64-unknown-linux-gnu`, haven't bothered trying this on msvc yet. try-job: aarch64-gnu try-job: x86_64-apple-1 try-job: aarch64-apple try-job: i686-mingw try-job: x86_64-mingw-1 try-job: i686-msvc-1 try-job: x86_64-msvc-1
💔 Test failed - checks-actions |
Please? |
[DO NOT MERGE] `./x test rust-analyzer` I somehow made `./x test rust-analyzer` work on my machine[^machine], **but at what cost?** Not intended for merge but only as a reference. If we do want to land this, I'll need to tidy this up. Notes: - I abused a bunch of cargo features `in-rust-tree`. It probably doesn't need to be, and simply `--cfg` might work. I was trying to get the main rust-analyzer tests to build *at all*. Anything building is already a miracle. - I had to slap a bunch of the following to all the r-a crates to get the tests to build at all. I don't 100% understand why, but otherwise I get a whole ton of ``expected `rustc_lexer` to be available in rlib format`` build failures. ```rs #![cfg_attr(feature = "in-rust-tree", feature(rustc_private))] #[cfg(all(feature = "in-rust-tree", test))] extern crate rustc_driver as _; ``` - Skipped one config test that was fixed on r-a master but not synced here in r-l/r yet. [^machine]: `x86_64-unknown-linux-gnu`, haven't bothered trying this on msvc yet. try-job: aarch64-gnu try-job: x86_64-apple-1 try-job: aarch64-apple try-job: i686-mingw try-job: x86_64-mingw-1 try-job: i686-msvc-1 try-job: x86_64-msvc-1
A job failed! Check out the build log: (web) (plain) Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
I somehow made
./x test rust-analyzer
work on my machine1, but at what cost?Not intended for merge but only as a reference. If we do want to land this, I'll need to tidy this up.
Notes:
in-rust-tree
. It probably doesn't need to be, and simply--cfg
might work. I was trying to get the main rust-analyzer tests to build at all. Anything building is already a miracle.expected `rustc_lexer` to be available in rlib format
build failures.try-job: aarch64-gnu
try-job: x86_64-apple-1
try-job: aarch64-apple
try-job: i686-mingw
try-job: x86_64-mingw-1
try-job: i686-msvc-1
try-job: x86_64-msvc-1
Footnotes
x86_64-unknown-linux-gnu
, haven't bothered trying this on msvc yet. ↩