Skip to content

Commit 4bf057d

Browse files
committed
Fix typos in crate universe folder
1 parent 62d7317 commit 4bf057d

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
@@ -5,12 +5,12 @@ repos:
55
- id: check-hooks-apply
66
- id: check-useless-excludes
77
- repo: https://github.com/crate-ci/typos
8-
rev: v1.33.1
8+
rev: v1.34.0
99
hooks:
1010
- id: typos
1111
exclude: |
1212
(?x)^(
13-
crate_universe|
13+
crate_universe/test_data|
1414
examples|
1515
extensions|
1616
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
@@ -1040,7 +1040,7 @@ _FROM_COMMON_ATTRS = {
10401040
"order to prevent other uses of Cargo from impacting having any effect on the generated targets " +
10411041
"produced by this rule. For users who either have multiple `crate_repository` definitions in a " +
10421042
"WORKSPACE or rapidly re-pin dependencies, setting this to false may improve build times. This " +
1043-
"variable is also controled by `CARGO_BAZEL_ISOLATED` environment variable."
1043+
"variable is also controlled by `CARGO_BAZEL_ISOLATED` environment variable."
10441044
),
10451045
default = True,
10461046
),
@@ -1327,7 +1327,7 @@ can be found below where the supported keys for each template can be found in th
13271327
default = True,
13281328
),
13291329
"generate_rules_license_metadata": attr.bool(
1330-
doc = "Whether to generate rules license metedata.",
1330+
doc = "Whether to generate rules license metadata.",
13311331
default = False,
13321332
),
13331333
"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
@@ -29,7 +29,7 @@ STDERR ------------------------------------------------------------------------
2929
"""
3030

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

155155
def cargo_environ(repository_ctx, isolated = True):
156-
"""Define Cargo environment varables for use with `cargo-bazel`
156+
"""Define Cargo environment variables for use with `cargo-bazel`
157157
158158
Args:
159159
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
@@ -216,7 +216,7 @@ CARGO_BAZEL_REPIN=1 bazel sync --only=crate_index
216216
217217
This will result in all dependencies being updated for a project. The `CARGO_BAZEL_REPIN` environment variable
218218
can also be used to customize how dependencies are updated. The following table shows translations from environment
219-
variable values to the equivilant [cargo update](https://doc.rust-lang.org/cargo/commands/cargo-update.html) command
219+
variable values to the equivalent [cargo update](https://doc.rust-lang.org/cargo/commands/cargo-update.html) command
220220
that is called behind the scenes to update dependencies.
221221
222222
| Value | Cargo command |
@@ -256,7 +256,7 @@ CARGO_BAZEL_REPIN=1 CARGO_BAZEL_REPIN_ONLY=crate_index bazel sync --only=crate_i
256256
mandatory = True,
257257
),
258258
"compressed_windows_toolchain_names": attr.bool(
259-
doc = "Wether or not the toolchain names of windows toolchains are expected to be in a `compressed` format.",
259+
doc = "Whether or not the toolchain names of windows toolchains are expected to be in a `compressed` format.",
260260
default = True,
261261
),
262262
"generate_binaries": attr.bool(
@@ -300,7 +300,7 @@ CARGO_BAZEL_REPIN=1 CARGO_BAZEL_REPIN_ONLY=crate_index bazel sync --only=crate_i
300300
"order to prevent other uses of Cargo from impacting having any effect on the generated targets " +
301301
"produced by this rule. For users who either have multiple `crate_repository` definitions in a " +
302302
"WORKSPACE or rapidly re-pin dependencies, setting this to false may improve build times. This " +
303-
"variable is also controled by `CARGO_BAZEL_ISOLATED` environment variable."
303+
"variable is also controlled by `CARGO_BAZEL_ISOLATED` environment variable."
304304
),
305305
default = True,
306306
),

crate_universe/private/generate_utils.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def render_config(
142142
keys are [`{triple}`].
143143
regen_command (str, optional): An optional command to demonstrate how generated files should be regenerated.
144144
vendor_mode (str, optional): An optional configuration for rendirng content to be rendered into repositories.
145-
generate_rules_license_metadata (bool, optional): Whether to generate rules license metedata
145+
generate_rules_license_metadata (bool, optional): Whether to generate rules license metadata
146146
147147
Returns:
148148
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)