Skip to content

Commit

Permalink
Remove and deprecate commons APIs (#345)
Browse files Browse the repository at this point in the history
* Deprecate api for configuring environment variables

These structs were used with the old trait based API. They're not needed anymore as env-vars can be written without needing a struct now.

* Rename metadata struct

* Make metadata internals accessible and PartialEq

* Replace layer trait with struct layer

* Remove deprecation allowance

* Remove unused code

* Move Metadata struct

* Remove previously deprecated interface

* Deprecate BuildLog

* Remove style guide (since it's deprecated)

* Allow deprecated in internal code

* Deprecate fmt

* Deprecate section log

* Remove unused dependencies

These were used in the style guide and docs for a deprecated feature.

* Consolidate imports
  • Loading branch information
schneems authored Nov 11, 2024
1 parent 9272ef1 commit 221fe5b
Show file tree
Hide file tree
Showing 14 changed files with 78 additions and 464 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,3 @@ jobs:
run: pack build my-image --force-color --builder heroku/builder:24 --trust-extra-buildpacks --buildpack heroku/nodejs-engine --buildpack packaged/${{ matrix.target }}/debug/heroku_ruby --path tmp/ruby-getting-started --pull-policy never
- name: "PRINT: Cached getting started guide output"
run: pack build my-image --force-color --builder heroku/builder:24 --trust-extra-buildpacks --buildpack heroku/nodejs-engine --buildpack packaged/${{ matrix.target }}/debug/heroku_ruby --path tmp/ruby-getting-started --pull-policy never

print-style-guide:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install musl-tools
run: sudo apt-get install musl-tools --no-install-recommends
- name: Update Rust toolchain
run: rustup update
- name: Install Rust linux-musl target
run: rustup target add x86_64-unknown-linux-musl
- name: Rust Cache
uses: Swatinem/[email protected]
- name: "PRINT: Style guide"
run: cargo run --quiet --bin print_style_guide
12 changes: 0 additions & 12 deletions Cargo.lock

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

8 changes: 8 additions & 0 deletions commons/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog for commons features

## 2024-11-11

## Changed

- Deprecate `layers` including `layers::ConfigureEnvLayer` and `layers::DefaultEnvLayer` (https://github.com/heroku/buildpacks-ruby/pull/345)
- Remove `AppCacheCollection` (https://github.com/heroku/buildpacks-ruby/pull/345)
- Deprecate `output` module in favor of the `bullet_stream` crate (https://github.com/heroku/buildpacks-ruby/pull/345)

## 2024-08-16

### Fixed
Expand Down
6 changes: 0 additions & 6 deletions commons/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,16 @@ name = "commons"
edition.workspace = true
rust-version.workspace = true

[[bin]]
name = "print_style_guide"
path = "bin/print_style_guide.rs"

[lints]
workspace = true

[dependencies]
ascii_table = { version = "4", features = ["color_codes"] }
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"
fun_run = "0.2"
glob = "0.3"
indoc = "2"
lazy_static = "1"
Expand Down
216 changes: 0 additions & 216 deletions commons/bin/print_style_guide.rs

This file was deleted.

10 changes: 2 additions & 8 deletions commons/src/cache.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
mod app_cache;
mod app_cache_collection;
mod clean;
mod config;
mod error;
mod in_app_dir_cache_layer;

pub use self::app_cache::{build, PathState};
pub use self::app_cache::{AppCache, CacheState};
#[allow(deprecated)]
pub use self::app_cache_collection::AppCacheCollection;
pub use self::app_cache::{build, AppCache, CacheState, PathState};
pub use self::clean::FilesWithSize;
pub use self::config::CacheConfig;
pub use self::config::{mib, KeepPath};
pub use self::config::{mib, CacheConfig, KeepPath};
pub use self::error::CacheError;
Loading

0 comments on commit 221fe5b

Please sign in to comment.