Skip to content

Commit

Permalink
chore: fix spelling (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbampton committed Apr 15, 2021
1 parent a975c2e commit ee11d8a
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/remote/non_cratesio/README.md
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion impl/src/context.rs
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions impl/src/metadata.rs
Expand Up @@ -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)?;
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions impl/src/planning/subplanners.rs
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions impl/src/rendering/bazel.rs
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand All @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions impl/src/settings.rs
Expand Up @@ -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<String>,
Expand Down Expand Up @@ -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
));
}
Expand Down Expand Up @@ -671,8 +671,8 @@ fn parse_raze_settings_legacy(metadata: &Metadata) -> Result<RazeSettings> {
/// Parses raze settings from the contents of a `Cargo.toml` file
fn parse_raze_settings(metadata: &Metadata) -> Result<RazeSettings> {
// 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);
}

Expand All @@ -683,7 +683,7 @@ fn parse_raze_settings(metadata: &Metadata) -> Result<RazeSettings> {
}
}

// 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]` \
Expand Down
2 changes: 1 addition & 1 deletion impl/src/testing.rs
Expand Up @@ -254,7 +254,7 @@ pub fn to_index_crates_map(list: Vec<(&str, &str)>) -> HashMap<String, String> {
.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<String, String>,
mock_dir: Option<&Path>,
Expand Down
2 changes: 1 addition & 1 deletion impl/src/util.rs
Expand Up @@ -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<PathBuf> {
// The custom raze lockfile will always take precidence
let raze_lockfile = raze_output_dir.join(RAZE_LOCKFILE_NAME);
Expand Down
2 changes: 1 addition & 1 deletion tools/examples_repository.bzl
Expand Up @@ -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,
),
Expand Down

0 comments on commit ee11d8a

Please sign in to comment.