Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog.d/8441-remove-legacy-compose-ffi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Fixed

- Removed `perry-container-compose`'s unused legacy `ffi` feature and duplicate
`js_compose_*` exports, which implemented a 4-byte string header incompatible
with the runtime's 20-byte string ABI. Compose FFI remains available through
the canonical stack-handle exports in `perry-stdlib`.
2 changes: 0 additions & 2 deletions crates/perry-container-compose/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ proptest = "1"

[features]
default = []
ffi = [] # Enable FFI exports for Perry TypeScript integration (legacy YAML-path shape;
# do NOT combine with perry-stdlib container feature — would link-collide)
# Live-runtime integration tests (require a real OCI runtime). The
# functional tests under tests/functional_orchestration.rs need
# `MockBackend` exposed, so this implies `test-utils`.
Expand Down
245 changes: 0 additions & 245 deletions crates/perry-container-compose/src/ffi.rs

This file was deleted.

8 changes: 0 additions & 8 deletions crates/perry-container-compose/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ pub mod yaml;
#[cfg(any(test, feature = "test-utils"))]
pub mod testing;

// FFI exports (Perry TypeScript integration). NOTE: when this crate is
// consumed by perry-stdlib (the canonical FFI host), the `ffi` feature
// must NOT be enabled — perry-stdlib publishes a different (canonical
// SPEC §9.1, stack-handle based) `js_compose_*` shape that would collide
// at link with this module's legacy YAML-file-path shape.
#[cfg(feature = "ffi")]
pub mod ffi;

// Re-exports
pub use backend::{
detect_backend, platform_candidates, probe_all_candidates, AppleContainerProtocol,
Expand Down
35 changes: 35 additions & 0 deletions crates/perry-container-compose/tests/legacy_ffi_removed.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
use std::path::Path;

#[test]
fn legacy_ffi_surface_stays_removed() {
let crate_dir = Path::new(env!("CARGO_MANIFEST_DIR"));
let manifest = std::fs::read_to_string(crate_dir.join("Cargo.toml"))
.expect("read perry-container-compose Cargo.toml");
let features = manifest
.split_once("[features]")
.expect("manifest has a features table")
.1
.split("\n[")
.next()
.expect("features table has contents");

assert!(
!features.lines().any(|line| {
line.split('#')
.next()
.is_some_and(|entry| entry.trim_start().starts_with("ffi ="))
}),
"the legacy `ffi` feature must not be reintroduced; perry-stdlib owns the canonical compose FFI"
);

let lib = std::fs::read_to_string(crate_dir.join("src/lib.rs"))
.expect("read perry-container-compose src/lib.rs");
assert!(
!lib.contains("feature = \"ffi\""),
"src/lib.rs must not gate a module on the removed legacy `ffi` feature"
);
assert!(
!crate_dir.join("src/ffi.rs").exists(),
"the duplicate legacy compose FFI module must stay deleted"
);
}
5 changes: 0 additions & 5 deletions crates/perry-stdlib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,6 @@ perry-updater = { workspace = true }
# entry is still required for `cargo build -p perry-container-compose`
# to succeed — that's enforced by the `crate_in_workspace_members` test
# in this crate's tests/.
#
# NOTE 2: do NOT enable the crate's own `ffi` feature here — it exports
# a *different* legacy `js_compose_*` shape (YAML-file-path-based) that
# would collide with stdlib's canonical SPEC §9.1 stack-handle
# signatures at link.
perry-container-compose = { path = "../perry-container-compose", optional = true }

thiserror.workspace = true
Expand Down
Loading