Skip to content

Commit

Permalink
Switch to consuming commons from the Ruby CNB main branch (#725)
Browse files Browse the repository at this point in the history
Since the feature branch no longer exists.

This will fix Dependabot erroring out with:

```
Errored with the message "Dependabot couldn't fetch the branch/reference for commons"
```

This also required adding `fun_run` as an explicit dependency, due to:
heroku/buildpacks-ruby#232
  • Loading branch information
edmorley authored Nov 17, 2023
1 parent 6c83855 commit f1bbcea
Show file tree
Hide file tree
Showing 11 changed files with 191 additions and 289 deletions.
458 changes: 179 additions & 279 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ edition = "2021"
publish = false

[workspace.dependencies]
commons = { git = "https://github.com/heroku/buildpacks-ruby", branch = "schneems/logging-state-machine-continued" }
commons = { git = "https://github.com/heroku/buildpacks-ruby", branch = "main" }
heroku-nodejs-utils = { path = "./common/nodejs-utils" }
indoc = "2"
# libcnb has a much bigger impact on buildpack behaviour than any other dependencies,
Expand Down
1 change: 1 addition & 0 deletions buildpacks/nodejs-npm-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ publish.workspace = true

[dependencies]
commons.workspace = true
fun_run = "0.1"
heroku-nodejs-utils.workspace = true
libcnb.workspace = true
libherokubuildpack.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions buildpacks/nodejs-npm-engine/src/layers/npm_engine.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::errors::NpmEngineBuildpackError;
use crate::NpmEngineBuildpack;
use commons::fun_run::CommandWithName;
use commons::output::fmt;
use commons::output::section_log::{log_step, log_step_timed, SectionLogger};
use fun_run::CommandWithName;
use heroku_nodejs_utils::inv::Release;
use heroku_nodejs_utils::vrs::Version;
use libcnb::build::BuildContext;
Expand Down Expand Up @@ -165,8 +165,8 @@ pub(crate) enum NpmEngineLayerError {
Download(DownloadError),
OpenTarball(std::io::Error),
DecompressTarball(std::io::Error),
RemoveExistingNpmInstall(commons::fun_run::CmdError),
InstallNpm(commons::fun_run::CmdError),
RemoveExistingNpmInstall(fun_run::CmdError),
InstallNpm(fun_run::CmdError),
}

impl From<NpmEngineLayerError> for NpmEngineBuildpackError {
Expand Down
2 changes: 1 addition & 1 deletion buildpacks/nodejs-npm-engine/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ mod npm;

use crate::errors::NpmEngineBuildpackError;
use crate::layers::npm_engine::NpmEngineLayer;
use commons::fun_run::CommandWithName;
use commons::output::build_log::{BuildLog, Logger, SectionLogger};
use commons::output::fmt;
use commons::output::section_log::log_step;
use fun_run::CommandWithName;
use heroku_nodejs_utils::inv::{Inventory, Release};
use heroku_nodejs_utils::package_json::PackageJson;
use heroku_nodejs_utils::vrs::{Requirement, Version};
Expand Down
2 changes: 1 addition & 1 deletion buildpacks/nodejs-npm-engine/src/node.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use commons::fun_run::CmdError;
use fun_run::CmdError;
use libcnb::Env;
use std::process::Command;

Expand Down
2 changes: 1 addition & 1 deletion buildpacks/nodejs-npm-engine/src/npm.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use commons::fun_run::CmdError;
use fun_run::CmdError;
use libcnb::Env;
use std::process::Command;

Expand Down
1 change: 1 addition & 0 deletions buildpacks/nodejs-npm-install/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ publish.workspace = true

[dependencies]
commons.workspace = true
fun_run = "0.1"
heroku-nodejs-utils.workspace = true
libcnb.workspace = true
libherokubuildpack.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion buildpacks/nodejs-npm-install/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::npm;
use crate::BUILDPACK_NAME;
use commons::fun_run::CmdError;
use commons::output::build_log::{BuildLog, Logger, StartedLogger};
use commons::output::fmt;
use commons::output::fmt::DEBUG_INFO;
use fun_run::CmdError;
use heroku_nodejs_utils::application;
use heroku_nodejs_utils::package_json::PackageJsonError;
use indoc::formatdoc;
Expand Down
2 changes: 1 addition & 1 deletion buildpacks/nodejs-npm-install/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ mod npm;

use crate::errors::NpmInstallBuildpackError;
use crate::layers::npm_cache::NpmCacheLayer;
use commons::fun_run::CommandWithName;
use commons::output::build_log::{BuildLog, Logger, SectionLogger};
use commons::output::fmt;
use commons::output::section_log::{log_step, log_step_stream};
use commons::output::warn_later::WarnGuard;
use fun_run::CommandWithName;
use heroku_nodejs_utils::application;
use heroku_nodejs_utils::package_json::PackageJson;
use heroku_nodejs_utils::package_manager::PackageManager;
Expand Down
2 changes: 1 addition & 1 deletion buildpacks/nodejs-npm-install/src/npm.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use commons::fun_run::CmdError;
use fun_run::CmdError;
use libcnb::Env;
use std::path::PathBuf;
use std::process::Command;
Expand Down

0 comments on commit f1bbcea

Please sign in to comment.