Skip to content

Commit a03d794

Browse files
committed
Fix typos in crate universe folder
1 parent a44ac6e commit a03d794

19 files changed

+34
-33
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ repos:
1212
- id: buildifier-lint
1313
args: [--version, "v8.2.0", --warnings=all]
1414
- repo: https://github.com/crate-ci/typos
15-
rev: v1.33.1
15+
rev: v1.34.0
1616
hooks:
1717
- id: typos
1818
exclude: |
1919
(?x)^(
20-
crate_universe|
20+
crate_universe/test_data|
2121
examples|
2222
extensions|
2323
ffi|

.typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[default.extend-words]
22
nto = "nto" # For toolchains
3+
flate = "flate" # https://crates.io/crates/flate2

crate_universe/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ rust_library(
7070
# This target embeds additional, stamping related information (see
7171
# https://docs.bazel.build/versions/main/user-manual.html#workspace_status
7272
# for more information). Set stamp = -1 to indicate that it should respect
73-
# the value of the --stamp comandline flag.
73+
# the value of the --stamp commandline flag.
7474
stamp = -1,
7575
version = VERSION,
7676
visibility = ["//visibility:public"],

crate_universe/defs.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ rust_test(
9999
100100
### Direct Packages
101101
102-
In cases where Rust targets have heavy interractions with other Bazel targests ([Cc][cc], [Proto][proto], etc.),
102+
In cases where Rust targets have heavy interractions with other Bazel targets ([Cc][cc], [Proto][proto], etc.),
103103
maintaining `Cargo.toml` files may have deminishing returns as things like [rust-analyzer][ra] begin to be confused
104104
about missing targets or environment variables defined only in Bazel. In workspaces like this, it may be desirable
105105
to have a "Cargo free" setup. `crates_repository` supports this through the `packages` attribute.
@@ -124,7 +124,7 @@ crates_repository(
124124
},
125125
# Setting the default package name to `""` forces the use of the macros defined in this repository
126126
# to always use the root package when looking for dependencies or aliases. This should be considered
127-
# optional as the repository also exposes alises for easy access to all dependencies.
127+
# optional as the repository also exposes aliases for easy access to all dependencies.
128128
render_config = render_config(
129129
default_package_name = ""
130130
),

crate_universe/extensions.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ _FROM_COMMON_ATTRS = {
10471047
"order to prevent other uses of Cargo from impacting having any effect on the generated targets " +
10481048
"produced by this rule. For users who either have multiple `crate_repository` definitions in a " +
10491049
"WORKSPACE or rapidly re-pin dependencies, setting this to false may improve build times. This " +
1050-
"variable is also controled by `CARGO_BAZEL_ISOLATED` environment variable."
1050+
"variable is also controlled by `CARGO_BAZEL_ISOLATED` environment variable."
10511051
),
10521052
default = True,
10531053
),
@@ -1342,7 +1342,7 @@ can be found below where the supported keys for each template can be found in th
13421342
default = True,
13431343
),
13441344
"generate_rules_license_metadata": attr.bool(
1345-
doc = "Whether to generate rules license metedata.",
1345+
doc = "Whether to generate rules license metadata.",
13461346
default = False,
13471347
),
13481348
"generate_target_compatible_with": attr.bool(

crate_universe/private/common_utils.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ STDERR ------------------------------------------------------------------------
3030
"""
3131

3232
def execute(repository_ctx, args, env = {}, allow_fail = False, quiet = True):
33-
"""A heler macro for executing some arguments and displaying nicely formatted errors
33+
"""A helper macro for executing some arguments and displaying nicely formatted errors
3434
3535
Args:
3636
repository_ctx (repository_ctx): The rule's context object.
@@ -159,7 +159,7 @@ def _cargo_home_path(repository_ctx):
159159
return repository_ctx.path(".cargo_home")
160160

161161
def cargo_environ(repository_ctx, isolated = True):
162-
"""Define Cargo environment varables for use with `cargo-bazel`
162+
"""Define Cargo environment variables for use with `cargo-bazel`
163163
164164
Args:
165165
repository_ctx (repository_ctx): The rules context object

crate_universe/private/crate.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def _annotation(
159159
gen_binaries (list or bool, optional): As a list, the subset of the crate's bins that should get `rust_binary`
160160
targets produced. Or `True` to generate all, `False` to generate none.
161161
disable_pipelining (bool, optional): If True, disables pipelining for library targets for this crate.
162-
gen_build_script (bool, optional): An authorative flag to determine whether or not to produce
162+
gen_build_script (bool, optional): An authoritative flag to determine whether or not to produce
163163
`cargo_build_script` targets for the current crate.
164164
patch_args (list, optional): The `patch_args` attribute of a Bazel repository rule. See
165165
[http_archive.patch_args](https://docs.bazel.build/versions/main/repo/http.html#http_archive-patch_args)

crate_universe/private/crates_repository.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ CARGO_BAZEL_REPIN=1 bazel sync --only=crate_index
219219
220220
This will result in all dependencies being updated for a project. The `CARGO_BAZEL_REPIN` environment variable
221221
can also be used to customize how dependencies are updated. The following table shows translations from environment
222-
variable values to the equivilant [cargo update](https://doc.rust-lang.org/cargo/commands/cargo-update.html) command
222+
variable values to the equivalent [cargo update](https://doc.rust-lang.org/cargo/commands/cargo-update.html) command
223223
that is called behind the scenes to update dependencies.
224224
225225
| Value | Cargo command |
@@ -259,7 +259,7 @@ CARGO_BAZEL_REPIN=1 CARGO_BAZEL_REPIN_ONLY=crate_index bazel sync --only=crate_i
259259
mandatory = True,
260260
),
261261
"compressed_windows_toolchain_names": attr.bool(
262-
doc = "Wether or not the toolchain names of windows toolchains are expected to be in a `compressed` format.",
262+
doc = "Whether or not the toolchain names of windows toolchains are expected to be in a `compressed` format.",
263263
default = True,
264264
),
265265
"generate_binaries": attr.bool(
@@ -303,7 +303,7 @@ CARGO_BAZEL_REPIN=1 CARGO_BAZEL_REPIN_ONLY=crate_index bazel sync --only=crate_i
303303
"order to prevent other uses of Cargo from impacting having any effect on the generated targets " +
304304
"produced by this rule. For users who either have multiple `crate_repository` definitions in a " +
305305
"WORKSPACE or rapidly re-pin dependencies, setting this to false may improve build times. This " +
306-
"variable is also controled by `CARGO_BAZEL_ISOLATED` environment variable."
306+
"variable is also controlled by `CARGO_BAZEL_ISOLATED` environment variable."
307307
),
308308
default = True,
309309
),

crate_universe/private/generate_utils.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def render_config(
144144
keys are [`{triple}`].
145145
regen_command (str, optional): An optional command to demonstrate how generated files should be regenerated.
146146
vendor_mode (str, optional): An optional configuration for rendirng content to be rendered into repositories.
147-
generate_rules_license_metadata (bool, optional): Whether to generate rules license metedata
147+
generate_rules_license_metadata (bool, optional): Whether to generate rules license metadata
148148
149149
Returns:
150150
string: A json encoded struct to match the Rust `config::RenderConfig` struct

crate_universe/private/local_crate_mirror.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def _local_crate_mirror_impl(repository_ctx):
2929
local_crate_mirror = repository_rule(
3030
doc = """This is a private implementation detail of crate_universe, and should not be relied on in manually written code.
3131
32-
This is effectively a `local_repository` rule impementation, but where the BUILD.bazel file is generated using the `cargo-bazel render` command.""",
32+
This is effectively a `local_repository` rule implementation, but where the `BUILD.bazel` file is generated using the `cargo-bazel render` command.""",
3333
implementation = _local_crate_mirror_impl,
3434
attrs = {
3535
"generator": attr.string(

0 commit comments

Comments
 (0)