diff --git a/README.md b/README.md index 4fddda316..9e3af746a 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ all of their `raze` settings into the `[workspace.metadata.raze]` field in the top level `Cargo.toml` file which contains the `[workspace]` definition. These settings should be identical to the ones seen in `[package.metadata.raze]` in [the previous section](#using-existing-cargotoml). However, crate settings may still -be placed in the `Cargo.toml` files of the workspace memebers: +be placed in the `Cargo.toml` files of the workspace members: ```toml # Above this line should be the contents of your package's Cargo.toml file diff --git a/examples/remote/non_cratesio/README.md b/examples/remote/non_cratesio/README.md index 635052460..3dbe75d9c 100644 --- a/examples/remote/non_cratesio/README.md +++ b/examples/remote/non_cratesio/README.md @@ -10,6 +10,6 @@ 4. Run `cargo vendor --versioned-dirs` from `cargo/` 5. Run `cargo raze` from `cargo/` -At this point you will have a dependency specification that Bazel can understand. You will also have starter BUILD files that referene the specified dependencies and generate rust_library rules. +At this point you will have a dependency specification that Bazel can understand. You will also have starter BUILD files that reference the specified dependencies and generate rust_library rules. To expose those dependencies, `alias` entries are created for the explicit Cargo dependencies. It is important to only expose explicit dependencies for the sake of hygiene. diff --git a/impl/src/context.rs b/impl/src/context.rs index d9d7b407c..399af4c68 100644 --- a/impl/src/context.rs +++ b/impl/src/context.rs @@ -22,7 +22,7 @@ use serde::Serialize; #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Serialize)] pub struct BuildableDependency { // Note: Buildifier-compliant BUILD file generation depends on correct sorting of collections - // of this struct by `buildable_target`. Do not add fields preceeding this field. + // of this struct by `buildable_target`. Do not add fields preceding this field. pub buildable_target: String, pub name: String, pub version: Version, diff --git a/impl/src/metadata.rs b/impl/src/metadata.rs index 24a698178..9ceba3ca0 100644 --- a/impl/src/metadata.rs +++ b/impl/src/metadata.rs @@ -219,7 +219,7 @@ impl RazeMetadataFetcher { &no_deps_metadata.workspace_root, ) .ok_or_else(|| { - anyhow!("All workspace memebers are expected to be under the workspace root") + anyhow!("All workspace members are expected to be under the workspace root") })?; let new_path = temp_dir.join(diff); fs::create_dir_all(&new_path)?; @@ -237,7 +237,7 @@ impl RazeMetadataFetcher { // Determine the difference between the workspace root and the current file let diff = diff_paths(&path, &no_deps_metadata.workspace_root).ok_or_else(|| { - anyhow!("All workspace memebers are expected to be under the workspace root") + anyhow!("All workspace members are expected to be under the workspace root") })?; // Create a matching directory tree for the current file within the temp workspace diff --git a/impl/src/planning/subplanners.rs b/impl/src/planning/subplanners.rs index 57e645097..a73033b9a 100644 --- a/impl/src/planning/subplanners.rs +++ b/impl/src/planning/subplanners.rs @@ -121,13 +121,13 @@ impl<'planner> WorkspaceSubplanner<'planner> { .workspace_members .iter() .filter_map(|pkg_id| { - let workspace_memeber = self + let workspace_member = self .metadata .metadata .packages .iter() .find(|pkg| pkg.id == *pkg_id); - if let Some(pkg) = workspace_memeber { + if let Some(pkg) = workspace_member { // Don't include binary dependencies if self.settings.binary_deps.contains_key(&pkg.name) { None diff --git a/impl/src/rendering/bazel.rs b/impl/src/rendering/bazel.rs index 353ab2494..b11f21728 100644 --- a/impl/src/rendering/bazel.rs +++ b/impl/src/rendering/bazel.rs @@ -37,7 +37,7 @@ macro_rules! unwind_tera_error { }}; } -// A Bazel block that exposts the `crates.bz` files renderd in Remote genmode +// A Bazel block that exposts the `crates.bz` files rendered in Remote genmode const EXPORTS_FILES: &str = r#" # Export file for Stardoc support exports_files( @@ -866,7 +866,7 @@ mod tests { .render_remote_planned_build(&render_details, &planned_build) .unwrap(); - // Ensure that the lockfiles for binary dependencies get written out propperly + // Ensure that the lockfiles for binary dependencies get written out properly assert!(render_result.iter().any(|file_output| { file_output.path == PathBuf::from("/some/bazel/root/./some_render_prefix/Cargo.raze.lock") && file_output.contents @@ -882,7 +882,7 @@ mod tests { #[test] fn test_experimental_api_with_workspace_members() { - // Setup render detials + // Setup render details let mut render_details = dummy_render_details("BUILD.bazel"); render_details.experimental_api = true; render_details.render_package_aliases = false; diff --git a/impl/src/settings.rs b/impl/src/settings.rs index d2734802c..b6e7ccb4c 100644 --- a/impl/src/settings.rs +++ b/impl/src/settings.rs @@ -221,7 +221,7 @@ pub struct CrateSettings { /// The `patch(1)` utility to use. /// - /// If this is specified, Bazel will use the specifed patch tool instead of the Bazel-native patch + /// If this is specified, Bazel will use the specified patch tool instead of the Bazel-native patch /// implementation. #[serde(default)] pub patch_tool: Option, @@ -584,13 +584,13 @@ fn parse_raze_settings_workspace( // Check for duplication errors if !duplicate_binary_deps.is_empty() { return Err(anyhow!( - "Duplicate `raze.binary_deps` values detected accross various crates: {:?}", + "Duplicate `raze.binary_deps` values detected across various crates: {:?}", duplicate_binary_deps )); } if !duplicate_crate_settings.is_empty() { return Err(anyhow!( - "Duplicate `raze.crates.*` values detected accross various crates: {:?}", + "Duplicate `raze.crates.*` values detected across various crates: {:?}", duplicate_crate_settings )); } @@ -671,8 +671,8 @@ fn parse_raze_settings_legacy(metadata: &Metadata) -> Result { /// Parses raze settings from the contents of a `Cargo.toml` file fn parse_raze_settings(metadata: &Metadata) -> Result { // Workspace takes precedence - let workspace_level_settigns = metadata.workspace_metadata.get("raze"); - if let Some(value) = workspace_level_settigns { + let workspace_level_settings = metadata.workspace_metadata.get("raze"); + if let Some(value) = workspace_level_settings { return parse_raze_settings_workspace(value, &metadata); } @@ -683,7 +683,7 @@ fn parse_raze_settings(metadata: &Metadata) -> Result { } } - // Attempt to load legacy settings but do not allow failures to propogate + // Attempt to load legacy settings but do not allow failures to propagate if let Ok(settings) = parse_raze_settings_legacy(metadata) { eprintln!( "WARNING: The top-level `[raze]` key is deprecated. Please set `[workspace.metadata.raze]` \ diff --git a/impl/src/testing.rs b/impl/src/testing.rs index 3a08fb105..8eeb97862 100644 --- a/impl/src/testing.rs +++ b/impl/src/testing.rs @@ -254,7 +254,7 @@ pub fn to_index_crates_map(list: Vec<(&str, &str)>) -> HashMap { .collect() } -/// Create a mock cache in a temporary direcotry that contains a set of given crates +/// Create a mock cache in a temporary directory that contains a set of given crates pub fn mock_crate_index( crates: &HashMap, mock_dir: Option<&Path>, diff --git a/impl/src/util.rs b/impl/src/util.rs index 762c61f3b..16f585f67 100644 --- a/impl/src/util.rs +++ b/impl/src/util.rs @@ -318,7 +318,7 @@ pub fn package_ident(package_name: &str, package_version: &str) -> String { /// Locates a lockfile for the associated crate. A `Cargo.raze.lock` file in the /// [RazeSettings::workspace_path](crate::settings::RazeSettings::workspace_path) -/// direcotry will take precidence over a standard `Cargo.lock` file. +/// directory will take precidence over a standard `Cargo.lock` file. pub fn find_lockfile(cargo_workspace_root: &Path, raze_output_dir: &Path) -> Option { // The custom raze lockfile will always take precidence let raze_lockfile = raze_output_dir.join(RAZE_LOCKFILE_NAME); diff --git a/tools/examples_repository.bzl b/tools/examples_repository.bzl index 678c4f292..2d18c96c0 100644 --- a/tools/examples_repository.bzl +++ b/tools/examples_repository.bzl @@ -110,7 +110,7 @@ _examples_repository = repository_rule( allow_single_file = True, ), "_script_windows": attr.label( - doc = "The windows equivilant of `_script`", + doc = "The windows equivalent of `_script`", default = Label("//tools:examples_repository_tools.bat"), allow_single_file = True, ),