Skip to content
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

Update rust to 1.84.0 #10328

Merged
merged 1 commit into from
Jan 9, 2025
Merged

Update rust to 1.84.0 #10328

merged 1 commit into from
Jan 9, 2025

Conversation

arpad-m
Copy link
Member

@arpad-m arpad-m commented Jan 9, 2025

We keep the practice of keeping the compiler up to date, pointing to the latest release. This is done by many other projects in the Rust ecosystem as well.

Release notes.

Prior update was in #9926.

@arpad-m arpad-m added the run-extra-build-macos When placed on a PR, tells the CI to run a build on macOS. No unit tests are run, though. label Jan 9, 2025
@tristan957
Copy link
Member

Also update cargo-hakari, cargo-deny, cargo-hack and cargo-nextest to their latest versions.

I didn't see any of this in the PR.

@arpad-m
Copy link
Member Author

arpad-m commented Jan 9, 2025

I didn't see any of this in the PR.

ah sorry that was a copy-paste issue. removed.

@arpad-m arpad-m enabled auto-merge January 9, 2025 18:22
@arpad-m arpad-m added this pull request to the merge queue Jan 9, 2025
Merged via the queue into main with commit 99b5a67 Jan 9, 2025
90 checks passed
@arpad-m arpad-m deleted the arpad/rust_1_84 branch January 9, 2025 18:30
Copy link

github-actions bot commented Jan 9, 2025

7271 tests run: 6906 passed, 0 failed, 365 skipped (full report)


Code coverage* (full report)

  • functions: 32.7% (8039 of 24617 functions)
  • lines: 47.8% (66754 of 139683 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
6bf219b at 2025-01-09T18:37:52.671Z :recycle:

@alexanderlaw
Copy link
Contributor

When trying to enable sanitizers for neon (#6053), I've come across a new issue with rust 1.84.0:

CC=clang CFLAGS="-fsanitize=address" RUSTFLAGS="-C linker=clang -C link-arg=-fsanitize=address -C link-arg=-static-libsan" make -j`nproc` -s

works for me on 99b5a67~1, but fails with weird errors on 99b5a67:

Compiling Neon
error[E0463]: can't find crate for `parquet_derive`
  --> proxy/src/context/parquet.rs:75:10
   |
75 | #[derive(parquet_derive::ParquetRecordWriter)]
   |          ^^^^^^^^^^^^^^ can't find crate

error[E0599]: no method named `schema` found for reference `&[_]` in the current scope
   --> proxy/src/context/parquet.rs:270:34
    |
270 |     let schema = rows.as_slice().schema()?;
    |                                  ^^^^^^ method not found in `&[_]`

error[E0599]: no method named `write_to_row_group` found for reference `&[RequestData]` in the current scope
   --> proxy/src/context/parquet.rs:323:25
    |
323 |         rows.as_slice().write_to_row_group(&mut rg)?;
    |                         ^^^^^^^^^^^^^^^^^^ method not found in `&[RequestData]`

Some errors have detailed explanations: E0463, E0599.
For more information about an error, try `rustc --explain E0463`.
error: could not compile `proxy` (lib) due to 3 previous errors

@arpad-m
Copy link
Member Author

arpad-m commented Jan 13, 2025

@alexanderlaw strange, your given command worked for me on e9ed53b. Have you tried rm'ing the target and pg_install/ directories?

@alexanderlaw
Copy link
Contributor

@arpad-m , thank you for looking at this!

I've re-tested it on e9ed53b now:

git reset --hard e9ed53b; git clean -dfx; rm -rf vendor/postgres-*;  git submodule update --init --recursive --depth 2 --progress .; cargo-cache -a

CC=clang CFLAGS="-fsanitize=address" RUSTFLAGS="-C linker=clang -C link-arg=-fsanitize=address -C link-arg=-static-libsan" make -j`nproc` -s

and got the same:

...
Compiling neon_utils v15
error[E0463]: can't find crate for `parquet_derive`
  --> proxy/src/context/parquet.rs:75:10
   |
75 | #[derive(parquet_derive::ParquetRecordWriter)]
   |          ^^^^^^^^^^^^^^ can't find crate

error[E0599]: no method named `schema` found for reference `&[_]` in the current scope
   --> proxy/src/context/parquet.rs:270:34
    |
270 |     let schema = rows.as_slice().schema()?;
    |                                  ^^^^^^ method not found in `&[_]`

error[E0599]: no method named `write_to_row_group` found for reference `&[RequestData]` in the current scope
   --> proxy/src/context/parquet.rs:323:25
    |
323 |         rows.as_slice().write_to_row_group(&mut rg)?;
    |                         ^^^^^^^^^^^^^^^^^^ method not found in `&[RequestData]`

Some errors have detailed explanations: E0463, E0599.
For more information about an error, try `rustc --explain E0463`.
error: could not compile `proxy` (lib) due to 3 previous errors
make: *** [Makefile:84: neon] Error 101

I use "Ubuntu clang version 18.1.3 (1ubuntu1)".

@cloneable
Copy link
Contributor

cloneable commented Jan 14, 2025

Can you try with passing --target explicitly? https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/sanitizer.html#build-scripts-and-procedural-macros It is surprising that it simply stopped working after the update.

@alexanderlaw
Copy link
Contributor

Yeah, I was surprised when the command that had worked on a commit from Jan 3, failed on a recent one.

Adding --target doesn't change much:

CC=clang CFLAGS="-fsanitize=address" CARGO_BUILD_FLAGS="--target x86_64-unknown-linux-gnu"  RUSTFLAGS="-C linker=clang -C link-arg=-fsanitize=address -C link-arg=-static-libsan"  make -j`nproc` -s
...
Compiling Neon
error[E0463]: can't find crate for `parquet_derive`
  --> proxy/src/context/parquet.rs:75:10
...

This is not a crucial issue to me; my main goal is to use sanitizers with postgres, but it's still interesting, what the new version broke.

@arpad-m
Copy link
Member Author

arpad-m commented Jan 14, 2025

@alexanderlaw if you have time to dedicate, I would first try to use latest rust beta and nightly, maybe there is a compiler bug which has since been fixed (do channel = "beta" and same for nightly in rust-toolchain.toml).

after you've done that, you could use cargo-bisect-rustc with the --script flag to find out the rustc commit that broke things for you. The commit then could indicate the cause for why the crate was not found. Not automatically a compiler bug, maybe it's something illegal we do that is now erroring. It's a very weird error in any case.

@alexanderlaw
Copy link
Contributor

@arpad-m , thank you for the tip! It indeed works with beta. So I guess with the next update to 1.85 in February/March the issue will be resolved. I'll try to bisect the bug lifespan just out of curiosity later.

@alexanderlaw
Copy link
Contributor

According to bisect-rustc, this anomaly was introduced with
rust-lang/rust@13b77c6 (2024-12-17)
and fixed with
rust-lang/rust@8361aef (2025-01-14) / rust-lang-ci/rust@c810f78

@arpad-m
Copy link
Member Author

arpad-m commented Jan 20, 2025

I don't think either have something to do with the issue you report. The first patch only affects build metrics uploads, while the second patch is about rustdoc, so not about the compiler itself. Neither should affect the compiler. Maybe the issue doesn't reproduce 100% reliably?

@alexanderlaw
Copy link
Contributor

It reproduced reliably, but maybe bisect-rustc has it's own peculiarities, I can't understand yet. Unfortunately, I could not find my notes from the previous run, so I ran bisect anew:

cargo bisect-rustc --start 36780360b62320a61e2234b17ec600e8e4785509 --end f1e07524047cbc46501a429134e80505a7cd73c0 --script .../test-rust.sh

Regression in fe43131683267082fc46be5796ce84351e9fb497

And the other end (with the script returning the opposite codes):

cargo bisect-rustc --start f1e07524047cbc46501a429134e80505a7cd73c0 --end 203e6c127c50c499be53731a39fe36d24f544502 --script .../test-rust.sh

Regression in 5a6036a1802262f8cf02192b02026688d396f1d7

But the commit specified is not exact, it rather points at a range:

cargo bisect-rustc --install 5a6036a1802262f8cf02192b02026688d396f1d7
make -s distclean; RUSTUP_TOOLCHAIN=bisector-ci-5a6036a1802262f8cf02192b02026688d396f1d7-x86_64-unknown-linux-gnu CC=clang CFLAGS="-fsanitize=address" RUSTFLAGS="-C linker=clang -C link-arg=-fsanitize=address -C link-arg=-static-libsan" cargo build -p proxy; echo $?
...
0

vs the previous commit in the list printed by bisect-rustc:

...
make -s distclean; RUSTUP_TOOLCHAIN=bisector-ci-33c245b9e98bc91e18ea1c5033824f4c6f92766f-x86_64-unknown-linux-gnu CC=clang CFLAGS="-fsanitize=address" RUSTFLAGS="-C linker=clang -C link-arg=-fsanitize=address -C link-arg=-static-libsan" cargo build -p proxy

...
   Compiling proxy v0.1.0 (/t/neon/proxy)
error[E0463]: can't find crate for `parquet_derive`
  --> proxy/src/context/parquet.rs:75:10

And the range 33c245b9e...5a6036a18 covers 18 commits, that I can't install with cargo bisect-rustc --install.

github-merge-queue bot pushed a commit that referenced this pull request Jan 31, 2025
We keep the practice of keeping the compiler up to date, pointing to the
latest release. This is done by many other projects in the Rust
ecosystem as well.

[Release notes](https://releases.rs/docs/1.84.1/).

Prior update was in #10328.

Co-authored-by: Arpad Müller <arpad-m@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-extra-build-macos When placed on a PR, tells the CI to run a build on macOS. No unit tests are run, though.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants