rules_rust icon indicating copy to clipboard operation
rules_rust copied to clipboard

Unable to use nightly host tools when using bzlmod

Open csmulhern opened this issue 2 years ago • 0 comments

The tag class definition for rust.host_tools includes version, but not iso_date.

https://github.com/bazelbuild/rules_rust/blob/fe610dab73c3c61560a547bc661177dd5115fed7/rust/extensions.bzl#L126-L129

This leads to the following error when trying to use a nightly version of the rust host tools (which is e.g. required to enable bindeps in crate universe).

ERROR: <builtin>: fetching rust_toolchain_tools_repository rule //:rules_rust~0.38.0~rust~rust_host_tools: Traceback (most recent call last):
	File "/private/var/tmp/_bazel_cameron/f5a6fe93ded5fb771eddb255ace4ff75/external/rules_rust~0.38.0/rust/repositories.bzl", line 295, column 24, in _rust_toolchain_tools_repository_impl
		check_version_valid(ctx.attr.version, ctx.attr.iso_date)
	File "/private/var/tmp/_bazel_cameron/f5a6fe93ded5fb771eddb255ace4ff75/external/rules_rust~0.38.0/rust/private/repository_utils.bzl", line 622, column 13, in check_version_valid
		fail("{param_prefix}iso_date must be specified if version is 'beta' or 'nightly'".format(param_prefix = param_prefix))
Error in fail: iso_date must be specified if version is 'beta' or 'nightly'

csmulhern avatar Jan 24 '24 13:01 csmulhern