Skip to content

Commit 45f6054

Browse files
authored
Fix typos, comments and other minor inconsistencies (#561)
Found/fixed via a Claude code review pass.
1 parent b819ed8 commit 45f6054

7 files changed

Lines changed: 13 additions & 13 deletions

File tree

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ always, thanks for contributing.
99

1010
The intent and goal of open sourcing this project is to increase the contributor
1111
and user base. However, only Salesforce employees will be given `admin` rights
12-
and will be the final arbitrars of what contributions are accepted or not.
12+
and will be the final arbiters of what contributions are accepted or not.
1313

1414
## Getting started
1515

1616
Please feel free to join the
1717
[Heroku Cloud Native Buildpacks discussions][discussions].
1818
You may also wish to take a look at
19-
[Heroku's product roadmap][roadmap] to see where are headed.
19+
[Heroku's product roadmap][roadmap] to see where we are headed.
2020

2121
## Ideas and Feedback
2222

@@ -37,7 +37,7 @@ Fixes, improvements, and patches all happen via [GitHub Pull Requests on this
3737
repository][pulls]. If you'd like to
3838
improve the tests, you want to make the documentation clearer, you have an
3939
alternative implementation of something that may have advantages over the way
40-
its currently done, or you have any other change, we would be happy to hear
40+
it's currently done, or you have any other change, we would be happy to hear
4141
about it. For trivial changes, send a pull request. For non-trivial changes,
4242
consider [opening an issue](#issues-feature-requests-and-bug-reports) to
4343
discuss it first instead.

src/layers/pip_cache.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ pub(crate) fn prepare_pip_cache(
5050
match cause {
5151
EmptyLayerCause::InvalidMetadataAction { .. }
5252
| EmptyLayerCause::RestoredLayerAction { .. } => {
53-
// We don't go into more details as to why the cache has been discarded, since
54-
// the reasons will be the same as those logged during the earlier Python layer.
53+
// We don't go into more details as to why the cache has been discarded, since the reasons
54+
// will overlap with those already logged during the earlier Python and pip layers.
5555
log_info("Discarding cached pip download/wheel cache");
5656
}
5757
EmptyLayerCause::NewlyCreated => {}

src/layers/python.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub(crate) fn install_python(
8585
// S3 bucket (eg files removed, or bucket made private). To try and tell the two
8686
// cases apart, we check whether the requested version included a patch component.
8787
// If it did, then it's most likely user error, but if it didn't, then the patch
88-
// version is the one we resolved, and so know it should be valid.
88+
// version is the one we resolved, and so we know it should be valid.
8989
//
9090
// We have to check for 403s too, since S3 will return a 403 instead of a 404 for
9191
// missing files, if the S3 bucket does not have public list permissions enabled.
@@ -107,7 +107,7 @@ pub(crate) fn install_python(
107107
}
108108

109109
let mut layer_env = generate_layer_env(&layer_path, python_version);
110-
layer.write_env(layer_env)?;
110+
layer.write_env(&layer_env)?;
111111
// Required to pick up the automatic env vars such as PATH. See: https://github.com/heroku/libcnb.rs/issues/842
112112
layer_env = layer.read_env()?;
113113
env.clone_from(&layer_env.apply(Scope::Build, env));

src/layers/uv_cache.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use libcnb::layer_env::{LayerEnv, ModificationBehavior, Scope};
1010
// We don't need to persist uv's cache between builds, since we cache site-packages instead.
1111
// However, we must make uv write its cache into the same filesystem mount as the venv layer,
1212
// otherwise uv can't use hardlinks when installing and will fall back to slower file copies.
13-
// The easiest way to do this is via a temporary `cache=false`, `launch=false` layer.
13+
// The easiest way to do this is via a temporary uncached, build-only layer.
1414
// See comments in `uv_dependencies.rs` for more details.
1515
pub(crate) fn prepare_uv_cache(
1616
context: &BuildContext<PythonBuildpack>,
@@ -24,7 +24,7 @@ pub(crate) fn prepare_uv_cache(
2424
},
2525
)?;
2626

27-
// https://docs.astral.sh/uv/configuration/environment/#uv_cache_dir
27+
// https://docs.astral.sh/uv/reference/environment/#uv_cache_dir
2828
let layer_env = LayerEnv::new().chainable_insert(
2929
Scope::Build,
3030
ModificationBehavior::Override,

src/layers/uv_dependencies.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub(crate) fn install_dependencies(
8787
log_info("Creating virtual environment");
8888
// We use Python's `venv` module to create the virtual environment since `uv venv` creates
8989
// import patching hooks that we don't want: https://github.com/astral-sh/uv/issues/6426
90-
// TODO: Open a PR upstream to remove those hooks or at least makes them optional.
90+
// TODO: Open a PR upstream to remove those hooks or at least make them optional.
9191
utils::run_command_and_stream_output(
9292
Command::new("python")
9393
.args(["-m", "venv", "--without-pip", &layer_path.to_string_lossy()])

src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub(crate) fn download_and_unpack_nested_gzip_archive(
134134
Ok(())
135135
}
136136

137-
/// Errors that can occur when downloading and unpacking an archive using `download_and_unpack_zstd_archive`.
137+
/// Errors that can occur when downloading and unpacking an archive.
138138
#[derive(Debug)]
139139
pub(crate) enum DownloadUnpackArchiveError {
140140
Request(ureq::Error),

tests/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ fn default_build_config(fixture_path: impl AsRef<Path>) -> BuildConfig {
2525
let builder = builder();
2626
let mut config = BuildConfig::new(&builder, fixture_path);
2727

28-
// TODO: Once Pack build supports `--platform` and libcnb-test adjusted accordingly, change this
29-
// to allow configuring the target arch independently of the builder name (eg via env var).
28+
// TODO: Once Pack build supports `--platform` and libcnb-test is adjusted accordingly, change
29+
// this to allow configuring the target arch independently of the builder name (eg via env var).
3030
let target_triple = match builder.as_str() {
3131
// Compile the buildpack for ARM64 iff the builder supports multi-arch and the host is ARM64.
3232
"heroku/builder:24" | "heroku/builder:26" if cfg!(target_arch = "aarch64") => {

0 commit comments

Comments
 (0)