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

Change default Rust distribution downloads from .tar.gz to .tar.xz #2399

Merged
merged 3 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/flatten.md
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ A given instance of this rule should be accompanied by a toolchain_repository_pr
| <a id="rust_toolchain_tools_repository-rustfmt_version"></a>rustfmt_version | The version of the tool among "nightly", "beta", or an exact version. | String | optional | <code>""</code> |
| <a id="rust_toolchain_tools_repository-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. See [rust_repositories](#rust_repositories) for more details. | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | <code>{}</code> |
| <a id="rust_toolchain_tools_repository-target_triple"></a>target_triple | The Rust-style target that this compiler builds for. | String | required | |
| <a id="rust_toolchain_tools_repository-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | List of strings | optional | <code>["https://static.rust-lang.org/dist/{}.tar.gz"]</code> |
| <a id="rust_toolchain_tools_repository-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | List of strings | optional | <code>["https://static.rust-lang.org/dist/{}.tar.xz"]</code> |
| <a id="rust_toolchain_tools_repository-version"></a>version | The version of the tool among "nightly", "beta", or an exact version. | String | required | |


Expand Down Expand Up @@ -1737,7 +1737,7 @@ Assemble a remote rust_analyzer_toolchain target based on the given params.
| <a id="rust_analyzer_toolchain_repository-target_compatible_with"></a>target_compatible_with | A list of constraints for the target platform for this toolchain. | `[]` |
| <a id="rust_analyzer_toolchain_repository-iso_date"></a>iso_date | The date of the tool. | `None` |
| <a id="rust_analyzer_toolchain_repository-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. See [rust_repositories](#rust_repositories) for more details. | `None` |
| <a id="rust_analyzer_toolchain_repository-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.gz'] | `None` |
| <a id="rust_analyzer_toolchain_repository-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.xz'] | `None` |
| <a id="rust_analyzer_toolchain_repository-auth"></a>auth | Auth object compatible with repository_ctx.download to use when downloading files. See [repository_ctx.download](https://docs.bazel.build/versions/main/skylark/lib/repository_ctx.html#download) for more details. | `None` |

**RETURNS**
Expand Down Expand Up @@ -1954,7 +1954,7 @@ See `load_arbitrary_tool` in `@rules_rust//rust:repositories.bzl` for more detai
| <a id="rust_register_toolchains-extra_target_triples"></a>extra_target_triples | Additional rust-style targets that rust toolchains should support. | `["wasm32-unknown-unknown", "wasm32-wasi"]` |
| <a id="rust_register_toolchains-extra_rustc_flags"></a>extra_rustc_flags | Dictionary of target triples to list of extra flags to pass to rustc in non-exec configuration. | `None` |
| <a id="rust_register_toolchains-extra_exec_rustc_flags"></a>extra_exec_rustc_flags | Extra flags to pass to rustc in exec configuration. | `None` |
| <a id="rust_register_toolchains-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | `["https://static.rust-lang.org/dist/{}.tar.gz"]` |
| <a id="rust_register_toolchains-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | `["https://static.rust-lang.org/dist/{}.tar.xz"]` |
| <a id="rust_register_toolchains-version"></a>version | **Deprecated**: Use <code>versions</code> instead. | `None` |
| <a id="rust_register_toolchains-versions"></a>versions | A list of toolchain versions to download. This paramter only accepts one versions per channel. E.g. <code>["1.65.0", "nightly/2022-11-02", "beta/2020-12-30"]</code>. | `[]` |

Expand Down Expand Up @@ -2012,7 +2012,7 @@ Assembles a remote repository for the given toolchain params, produces a proxy r
| <a id="rust_repository_set-extra_exec_rustc_flags"></a>extra_exec_rustc_flags | Extra flags to pass to rustc in exec configuration. | `None` |
| <a id="rust_repository_set-opt_level"></a>opt_level | Dictionary of target triples to optimiztion config. | `None` |
| <a id="rust_repository_set-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. See [rust_repositories](#rust_repositories) for more details. | `None` |
| <a id="rust_repository_set-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | `["https://static.rust-lang.org/dist/{}.tar.gz"]` |
| <a id="rust_repository_set-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | `["https://static.rust-lang.org/dist/{}.tar.xz"]` |
| <a id="rust_repository_set-auth"></a>auth | Auth object compatible with repository_ctx.download to use when downloading files. See [repository_ctx.download](https://docs.bazel.build/versions/main/skylark/lib/repository_ctx.html#download) for more details. | `None` |
| <a id="rust_repository_set-register_toolchain"></a>register_toolchain | If True, the generated <code>rust_toolchain</code> target will become a registered toolchain. | `True` |
| <a id="rust_repository_set-exec_compatible_with"></a>exec_compatible_with | A list of constraints for the execution platform for this toolchain. | `None` |
Expand Down Expand Up @@ -2120,7 +2120,7 @@ Assembles a remote repository for the given toolchain params, produces a proxy r
| <a id="rust_toolchain_repository-extra_exec_rustc_flags"></a>extra_exec_rustc_flags | Extra flags to pass to rustc in exec configuration. | `None` |
| <a id="rust_toolchain_repository-opt_level"></a>opt_level | Optimization level config for this toolchain. | `None` |
| <a id="rust_toolchain_repository-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. See [rust_repositories](#rust_repositories) for more details. | `None` |
| <a id="rust_toolchain_repository-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.gz'] | `["https://static.rust-lang.org/dist/{}.tar.gz"]` |
| <a id="rust_toolchain_repository-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.xz'] | `["https://static.rust-lang.org/dist/{}.tar.xz"]` |
| <a id="rust_toolchain_repository-auth"></a>auth | Auth object compatible with repository_ctx.download to use when downloading files. See [repository_ctx.download](https://docs.bazel.build/versions/main/skylark/lib/repository_ctx.html#download) for more details. | `None` |

**RETURNS**
Expand Down
10 changes: 5 additions & 5 deletions docs/rust_repositories.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ A given instance of this rule should be accompanied by a toolchain_repository_pr
| <a id="rust_toolchain_tools_repository-rustfmt_version"></a>rustfmt_version | The version of the tool among "nightly", "beta", or an exact version. | String | optional | <code>""</code> |
| <a id="rust_toolchain_tools_repository-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. See [rust_repositories](#rust_repositories) for more details. | <a href="https://bazel.build/rules/lib/dict">Dictionary: String -> String</a> | optional | <code>{}</code> |
| <a id="rust_toolchain_tools_repository-target_triple"></a>target_triple | The Rust-style target that this compiler builds for. | String | required | |
| <a id="rust_toolchain_tools_repository-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | List of strings | optional | <code>["https://static.rust-lang.org/dist/{}.tar.gz"]</code> |
| <a id="rust_toolchain_tools_repository-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | List of strings | optional | <code>["https://static.rust-lang.org/dist/{}.tar.xz"]</code> |
| <a id="rust_toolchain_tools_repository-version"></a>version | The version of the tool among "nightly", "beta", or an exact version. | String | required | |


Expand Down Expand Up @@ -220,7 +220,7 @@ Assemble a remote rust_analyzer_toolchain target based on the given params.
| <a id="rust_analyzer_toolchain_repository-target_compatible_with"></a>target_compatible_with | A list of constraints for the target platform for this toolchain. | `[]` |
| <a id="rust_analyzer_toolchain_repository-iso_date"></a>iso_date | The date of the tool. | `None` |
| <a id="rust_analyzer_toolchain_repository-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. See [rust_repositories](#rust_repositories) for more details. | `None` |
| <a id="rust_analyzer_toolchain_repository-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.gz'] | `None` |
| <a id="rust_analyzer_toolchain_repository-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.xz'] | `None` |
| <a id="rust_analyzer_toolchain_repository-auth"></a>auth | Auth object compatible with repository_ctx.download to use when downloading files. See [repository_ctx.download](https://docs.bazel.build/versions/main/skylark/lib/repository_ctx.html#download) for more details. | `None` |

**RETURNS**
Expand Down Expand Up @@ -273,7 +273,7 @@ See `load_arbitrary_tool` in `@rules_rust//rust:repositories.bzl` for more detai
| <a id="rust_register_toolchains-extra_target_triples"></a>extra_target_triples | Additional rust-style targets that rust toolchains should support. | `["wasm32-unknown-unknown", "wasm32-wasi"]` |
| <a id="rust_register_toolchains-extra_rustc_flags"></a>extra_rustc_flags | Dictionary of target triples to list of extra flags to pass to rustc in non-exec configuration. | `None` |
| <a id="rust_register_toolchains-extra_exec_rustc_flags"></a>extra_exec_rustc_flags | Extra flags to pass to rustc in exec configuration. | `None` |
| <a id="rust_register_toolchains-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | `["https://static.rust-lang.org/dist/{}.tar.gz"]` |
| <a id="rust_register_toolchains-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | `["https://static.rust-lang.org/dist/{}.tar.xz"]` |
| <a id="rust_register_toolchains-version"></a>version | **Deprecated**: Use <code>versions</code> instead. | `None` |
| <a id="rust_register_toolchains-versions"></a>versions | A list of toolchain versions to download. This paramter only accepts one versions per channel. E.g. <code>["1.65.0", "nightly/2022-11-02", "beta/2020-12-30"]</code>. | `[]` |

Expand Down Expand Up @@ -331,7 +331,7 @@ Assembles a remote repository for the given toolchain params, produces a proxy r
| <a id="rust_repository_set-extra_exec_rustc_flags"></a>extra_exec_rustc_flags | Extra flags to pass to rustc in exec configuration. | `None` |
| <a id="rust_repository_set-opt_level"></a>opt_level | Dictionary of target triples to optimiztion config. | `None` |
| <a id="rust_repository_set-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. See [rust_repositories](#rust_repositories) for more details. | `None` |
| <a id="rust_repository_set-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | `["https://static.rust-lang.org/dist/{}.tar.gz"]` |
| <a id="rust_repository_set-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). | `["https://static.rust-lang.org/dist/{}.tar.xz"]` |
| <a id="rust_repository_set-auth"></a>auth | Auth object compatible with repository_ctx.download to use when downloading files. See [repository_ctx.download](https://docs.bazel.build/versions/main/skylark/lib/repository_ctx.html#download) for more details. | `None` |
| <a id="rust_repository_set-register_toolchain"></a>register_toolchain | If True, the generated <code>rust_toolchain</code> target will become a registered toolchain. | `True` |
| <a id="rust_repository_set-exec_compatible_with"></a>exec_compatible_with | A list of constraints for the execution platform for this toolchain. | `None` |
Expand Down Expand Up @@ -375,7 +375,7 @@ Assembles a remote repository for the given toolchain params, produces a proxy r
| <a id="rust_toolchain_repository-extra_exec_rustc_flags"></a>extra_exec_rustc_flags | Extra flags to pass to rustc in exec configuration. | `None` |
| <a id="rust_toolchain_repository-opt_level"></a>opt_level | Optimization level config for this toolchain. | `None` |
| <a id="rust_toolchain_repository-sha256s"></a>sha256s | A dict associating tool subdirectories to sha256 hashes. See [rust_repositories](#rust_repositories) for more details. | `None` |
| <a id="rust_toolchain_repository-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.gz'] | `["https://static.rust-lang.org/dist/{}.tar.gz"]` |
| <a id="rust_toolchain_repository-urls"></a>urls | A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.xz'] | `["https://static.rust-lang.org/dist/{}.tar.xz"]` |
| <a id="rust_toolchain_repository-auth"></a>auth | Auth object compatible with repository_ctx.download to use when downloading files. See [repository_ctx.download](https://docs.bazel.build/versions/main/skylark/lib/repository_ctx.html#download) for more details. | `None` |

**RETURNS**
Expand Down
2 changes: 1 addition & 1 deletion rust/private/repository_utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ load(
load("//rust/private:common.bzl", "DEFAULT_NIGHTLY_ISO_DATE")

DEFAULT_TOOLCHAIN_NAME_PREFIX = "toolchain_for"
DEFAULT_STATIC_RUST_URL_TEMPLATES = ["https://static.rust-lang.org/dist/{}.tar.gz"]
DEFAULT_STATIC_RUST_URL_TEMPLATES = ["https://static.rust-lang.org/dist/{}.tar.xz"]
DEFAULT_NIGHTLY_VERSION = "nightly/{}".format(DEFAULT_NIGHTLY_ISO_DATE)
DEFAULT_EXTRA_TARGET_TRIPLES = ["wasm32-unknown-unknown", "wasm32-wasi"]

Expand Down
6 changes: 3 additions & 3 deletions rust/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ def rust_toolchain_repository(
opt_level (dict, optional): Optimization level config for this toolchain.
sha256s (str, optional): A dict associating tool subdirectories to sha256 hashes. See
[rust_repositories](#rust_repositories) for more details.
urls (list, optional): A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.gz']
urls (list, optional): A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.xz']
auth (dict): Auth object compatible with repository_ctx.download to use when downloading files.
See [repository_ctx.download](https://docs.bazel.build/versions/main/skylark/lib/repository_ctx.html#download) for more details.

Expand Down Expand Up @@ -673,7 +673,7 @@ def rust_analyzer_toolchain_repository(
iso_date (str, optional): The date of the tool.
sha256s (str, optional): A dict associating tool subdirectories to sha256 hashes. See
[rust_repositories](#rust_repositories) for more details.
urls (list, optional): A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.gz']
urls (list, optional): A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.xz']
auth (dict): Auth object compatible with repository_ctx.download to use when downloading files.
See [repository_ctx.download](https://docs.bazel.build/versions/main/skylark/lib/repository_ctx.html#download) for more details.

Expand Down Expand Up @@ -792,7 +792,7 @@ def rustfmt_toolchain_repository(
channel (str, optional): The channel value to with which to constrain the toolchain.
sha256s (str, optional): A dict associating tool subdirectories to sha256 hashes. See
[rust_repositories](#rust_repositories) for more details.
urls (list, optional): A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.gz']
urls (list, optional): A list of mirror urls containing the tools from the Rust-lang static file server. These must contain the '{}' used to substitute the tool being fetched (using .format). Defaults to ['https://static.rust-lang.org/dist/{}.tar.xz']
auth (dict): Auth object compatible with repository_ctx.download to use when downloading files.
See [repository_ctx.download](https://docs.bazel.build/versions/main/skylark/lib/repository_ctx.html#download) for more details.

Expand Down
Loading
Loading