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

Updated default Rust version to 1.49.0 to fix bazel sync #544

Merged
merged 6 commits into from
Jan 1, 2021
Merged

Updated default Rust version to 1.49.0 to fix bazel sync #544

merged 6 commits into from
Jan 1, 2021

Conversation

UebelAndre
Copy link
Collaborator

@UebelAndre UebelAndre commented Dec 29, 2020

Having the aarch64-apple-darwin target in the list of default toolchains breaks bazel sync with the following error:

INFO: Repository rust_darwin_aarch64 instantiated at:
  /Users/user/Code/cargo-raze/WORKSPACE.bazel:19:18: in <toplevel>
  /private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/io_bazel_rules_rust/rust/repositories.bzl:110:24: in rust_repositories
  /private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/io_bazel_rules_rust/rust/repositories.bzl:714:30: in rust_repository_set
Repository rule rust_toolchain_repository defined at:
  /private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/io_bazel_rules_rust/rust/repositories.bzl:613:44: in <toplevel>
WARNING: Download from https://static.rust-lang.org/dist/rust-1.48.0-aarch64-apple-darwin.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
ERROR: An error occurred during the fetch of repository 'rust_darwin_aarch64':
   Traceback (most recent call last):
	File "/private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/io_bazel_rules_rust/rust/repositories.bzl", line 578, column 44, in _rust_toolchain_repository_impl
		build_components = [_load_rust_compiler(ctx)]
	File "/private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/io_bazel_rules_rust/rust/repositories.bzl", line 483, column 24, in _load_rust_compiler
		load_arbitrary_tool(
	File "/private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/io_bazel_rules_rust/rust/repositories.bzl", line 442, column 17, in load_arbitrary_tool
		ctx.download(
Error in download: java.io.IOException: Error downloading [https://static.rust-lang.org/dist/rust-1.48.0-aarch64-apple-darwin.tar.gz] to /private/var/tmp/_bazel_user/32618c3132899251ff30687e197d6243/external/rust_darwin_aarch64/rust-1.48.0-aarch64-apple-darwin.tar.gz: GET returned 404 Not Found

With the release of Rust version 1.49.0 (and the tooling for aarch64-apple-darwin), bazel sync once again succeeds.
Closes #506

Additionally, a Bazel target has been created for //util:fetch_shas.sh (//util:fetch_shas) and made compatible with MacOS which was used to update the sha256 map.

Users on MacOS will need to install GNU parallel which can be done via

brew install parallel

@google-cla google-cla bot added the cla: yes label Dec 29, 2020
@UebelAndre
Copy link
Collaborator Author

https://blog.rust-lang.org/inside-rust/2020/12/29/1.49.0-prerelease.html might actually change the nature of this pull request. If a compiler is released for aarch64-apple-darwin then instead the default version should change to 1.49 and the appropriate sha256s should be added. I still think this is worth while to merge since it fixes currently broken functionality.

@UebelAndre UebelAndre changed the title Removed aarch64-apple-darwin from default toolchains Updated default Rust version to 1.49.0 to fix bazel sync Dec 31, 2020
@UebelAndre
Copy link
Collaborator Author

Ok, now that there is a compiler for aarch64-apple-darwin, this PR has changed to update the default version instead of removing the declaration of the toolchain.

@UebelAndre
Copy link
Collaborator Author

With 1.49.0 I ran into a new clippy error:

INFO: From Clippy test/clippy/ok_test_clippy.ok:
error: identical args used in this `assert_eq!` macro call
 --> test/clippy/src/lib.rs:9:20
  |
9 |         assert_eq!(2 + 2, 4);
  |                    ^^^^^^^^
  |
  = note: `#[deny(clippy::eq_op)]` on by default
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#eq_op

error: aborting due to previous error

A fix for this has also been added to this PR.

Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

Thanks! One small nit and I think we're good to go

util/fetch_shas.sh Outdated Show resolved Hide resolved
util/fetch_shas.sh Outdated Show resolved Hide resolved
@illicitonion illicitonion merged commit df18ddb into bazelbuild:master Jan 1, 2021
@UebelAndre UebelAndre deleted the toolchains branch January 1, 2021 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bazel sync is currently broken
2 participants