Skip to content

Commit

Permalink
Remove deprecated interfaces (#385)
Browse files Browse the repository at this point in the history
* Remove deprecated interfaces

* Force stdout and stderr to sync

This output came from CI:

```
      ** Invoke assets:precompile (first_time)
      START RAKE TEST OUTPUT
      $ echo $PATH
      ** Execute assets:precompile
      /layers/heroku_ruby/gems/ruby/3.2.0/bin:/workspace/bin:/layers/heroku_ruby/gems/bin:/layers/heroku_ruby/bundler/bin:/layers/heroku_ruby/binruby/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
      $ which -a rake
      /layers/heroku_ruby/gems/ruby/3.2.0/bin/rake
      /workspace/bin/rake
      /layers/heroku_ruby/gems/bin/rake
      /layers/heroku_ruby/binruby/bin/rake
      /usr/bin/rake
      /bin/rake
      $ which -a ruby
      /layers/heroku_ruby/binruby/bin/ruby
      /usr/bin/ruby
      /bin/ruby
      END RAKE TEST OUTPUT
```

Which is ordered incorrectly. This forces stdout and stderr to emit immediately instead of buffering.
  • Loading branch information
schneems authored Jan 14, 2025
1 parent 3d89f33 commit 525865c
Show file tree
Hide file tree
Showing 16 changed files with 9 additions and 2,192 deletions.
33 changes: 0 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions buildpacks/ruby/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ fn test_default_app_ubuntu20() {
chmod_plus_x(&app_dir.join("bin").join("rake")).unwrap();

fs_err::write(app_dir.join("Rakefile"), r#"
STDOUT.sync = true
STDERR.sync = true
task "assets:precompile" do
puts "START RAKE TEST OUTPUT"
run!("echo $PATH")
Expand Down
6 changes: 6 additions & 0 deletions commons/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog for commons features

## 2024-01-14

### Changed

- Remove deprecated interfaces: `layer::ConfigureEnvLayer` and `layer::DefaultEnvLayer` and the `output` module (https://github.com/heroku/buildpacks-ruby/pull/385)

## 2024-01-13

### Added
Expand Down
7 changes: 0 additions & 7 deletions commons/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@ workspace = true

[dependencies]
byte-unit = "5"
const_format = "0.2"
# TODO: Consolidate on either the regex crate or the fancy-regex crate, since this repo currently uses both.
fancy-regex = "0.14"
fs_extra = "1"
fs-err = "3"
glob = "0.3"
indoc = "2"
lazy_static = "1"
# libcnb has a much bigger impact on buildpack behaviour than any other dependencies,
# so it's pinned to an exact version to isolate it from lockfile refreshes.
libcnb = "=0.26.1"
libherokubuildpack = { version = "=0.26.1", default-features = false, features = ["command"] }
regex = "1"
serde = "1"
sha2 = "0.10"
Expand All @@ -33,8 +29,5 @@ cache_diff = "1.0"

[dev-dependencies]
filetime = "0.2"
indoc = "2"
libcnb-test = "=0.26.1"
pretty_assertions = "1"
toml = "0.8"
bullet_stream = "0.3.0"
8 changes: 0 additions & 8 deletions commons/src/layer.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
mod configure_env_layer;
mod default_env_layer;
pub mod diff_migrate;

#[deprecated(note = "Use the struct layer API in the latest libcnb.rs instead")]
pub use self::configure_env_layer::ConfigureEnvLayer;

#[deprecated(note = "Use the struct layer API in the latest libcnb.rs instead")]
pub use self::default_env_layer::DefaultEnvLayer;
128 changes: 0 additions & 128 deletions commons/src/layer/configure_env_layer.rs

This file was deleted.

87 changes: 0 additions & 87 deletions commons/src/layer/default_env_layer.rs

This file was deleted.

1 change: 0 additions & 1 deletion commons/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ pub mod gem_version;
pub mod gemfile_lock;
pub mod layer;
pub mod metadata_digest;
pub mod output;
Loading

0 comments on commit 525865c

Please sign in to comment.