diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 17372937..5d43b00d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -508,6 +508,9 @@ jobs: run: bash scripts/ci/check_pypi_publisher_metadata.sh dist - name: Prepare generated Python live fixture + # The acceptance service is TypeDB 3.12.3, whose semantic profile is 3.12.1. + env: + TYPE_BRIDGE_ACCEPTANCE_SEMANTIC_PROFILE: typedb-3.12.1/v1 run: >- scripts/ci/prepare_generated_live_fixture.sh python tmp/release-generated-python @@ -908,6 +911,9 @@ jobs: run: npm run typecheck:projection-integration - name: Prepare generated Node live fixture + # The acceptance service is TypeDB 3.12.3, whose semantic profile is 3.12.1. + env: + TYPE_BRIDGE_ACCEPTANCE_SEMANTIC_PROFILE: typedb-3.12.1/v1 run: >- "$GITHUB_WORKSPACE/scripts/ci/prepare_generated_live_fixture.sh" node "$GITHUB_WORKSPACE/tmp/release-generated-node" @@ -1304,6 +1310,8 @@ jobs: TYPEDB_ADDRESS: localhost:1729 TYPEDB_HTTP_PORT: "8000" TYPE_BRIDGE_RUST_PROJECTION_INTG_DATABASE: release_rust_projection_live + # The service is TypeDB 3.12.3, whose semantic profile is 3.12.1. + TYPE_BRIDGE_ACCEPTANCE_SEMANTIC_PROFILE: typedb-3.12.1/v1 ACCEPTANCE_TARGET_DIR: ${{ runner.temp }}/release-rust-projection-target run: >- timeout --foreground 15m @@ -1552,6 +1560,8 @@ jobs: - name: Run exact-wheel generated Python application env: TYPE_BRIDGE_GENERATED_PARITY_REPORT: ${{ runner.temp }}/release-generated-parity.xml + # The service is TypeDB 3.12.3, whose semantic profile is 3.12.1. + TYPE_BRIDGE_ACCEPTANCE_SEMANTIC_PROFILE: typedb-3.12.1/v1 run: | cd "$RUNNER_TEMP" PATH="$RUNNER_TEMP/release-generated-parity/bin:$PATH" \ @@ -1631,6 +1641,10 @@ jobs: - name: Run exact-package generated Node application working-directory: type-bridge-core/crates/node + env: + # The service is TypeDB 3.12.3, whose semantic profile is 3.12.1. + TYPE_BRIDGE_ACCEPTANCE_SEMANTIC_PROFILE: typedb-3.12.1/v1 + TYPEDB_VERSION: 3.12.3 run: >- node --test --test-concurrency=1 "$TYPE_BRIDGE_GENERATED_NODE_STAGE/harness/tests/projection-integration/generated-package-live.test.js" diff --git a/docs/development/performance.md b/docs/development/performance.md index 0e7b2483..0bbeeefd 100644 --- a/docs/development/performance.md +++ b/docs/development/performance.md @@ -88,9 +88,12 @@ runners sit above the comparison noise threshold. Each iteration builds its plans with the SDK plan builder, stages them on a `Transaction`, commits and checks the answers. `type-bridge-perf` (a private -crate, never a dependency of a shipped crate) installs a `tracing` layer that -sums the [stage spans](#stage-spans): each span counts its wall time minus -that of its stage children, so nested stages never count twice. +crate, never a dependency of a shipped crate) installs the `tracing` layer of +`type-bridge-perf-stages`, which sums the [stage spans](#stage-spans): each +span counts its wall time minus that of its stage children, so nested stages +never count twice. The bindings' off-by-default `perf-stages` feature links +only that leaf crate, which has no path dependencies, so a binding's source +archive does not have to carry the SDK. Time inside no span is SDK-side work, for example the Rust SDK checking the schema package each time it builds a plan. diff --git a/scripts/ci/cargo_release_inventory.py b/scripts/ci/cargo_release_inventory.py index b4cbe093..c1ba64a9 100644 --- a/scripts/ci/cargo_release_inventory.py +++ b/scripts/ci/cargo_release_inventory.py @@ -25,7 +25,7 @@ } ) # Repository tooling that measures the product; never a dependency of it. -EXPECTED_PRIVATE_TOOLING = frozenset({"type-bridge-perf"}) +EXPECTED_PRIVATE_TOOLING = frozenset({"type-bridge-perf", "type-bridge-perf-stages"}) # The one way a package may link tooling: a private binding's optional # dependency enabled only by this off-by-default feature. PERF_STAGES_FEATURE = "perf-stages" diff --git a/scripts/ci/cargo_release_inventory.toml b/scripts/ci/cargo_release_inventory.toml index 1b1f39c9..5e99f42b 100644 --- a/scripts/ci/cargo_release_inventory.toml +++ b/scripts/ci/cargo_release_inventory.toml @@ -215,3 +215,11 @@ classification = "private-tooling" role = "perf-harness" version-policy = "lockstep" docs-target = "none" + +[[packages]] +name = "type-bridge-perf-stages" +manifest = "crates/perf-stages/Cargo.toml" +classification = "private-tooling" +role = "perf-harness" +version-policy = "lockstep" +docs-target = "none" diff --git a/scripts/ci/validate_python_release_artifacts.py b/scripts/ci/validate_python_release_artifacts.py index fb993037..64f0cfe5 100644 --- a/scripts/ci/validate_python_release_artifacts.py +++ b/scripts/ci/validate_python_release_artifacts.py @@ -87,12 +87,12 @@ "vendor/typedb-protocol-b8", "vendor/typedb-driver-b8", ) -# Maturin 1.14.1 does not discover the optional orm-derive path dependency +# Maturin 1.14.1 does not discover the optional orm-derive and perf-stages path dependencies # while constructing the Python sdist. pyproject.toml therefore includes this # source root explicitly. Unlike Cargo-packaged workspace members, the explicit # include is copied byte-for-byte: its manifest keeps workspace inheritance, # and Cargo resolves license-file to the archive's canonical root LICENSE. -CORE_SDIST_EXPLICIT_RAW_SOURCE_ROOTS = ("crates/orm-derive",) +CORE_SDIST_EXPLICIT_RAW_SOURCE_ROOTS = ("crates/orm-derive", "crates/perf-stages") CORE_SDIST_SOURCE_ROOTS = ( CORE_SDIST_WORKSPACE_MEMBERS + CORE_SDIST_EXPLICIT_RAW_SOURCE_ROOTS diff --git a/tests/contracts/c-broad-case-ledger.json b/tests/contracts/c-broad-case-ledger.json index fac205ac..e231c7eb 100644 --- a/tests/contracts/c-broad-case-ledger.json +++ b/tests/contracts/c-broad-case-ledger.json @@ -36,7 +36,7 @@ "source_commit": "177ce24ac182b94269561c8622e5533d29891a44", "authorities": [ {"path": "tests/contracts/c-artifact-journey-v1.json", "sha256": "76e7057180129fd5e0e7d47a314cb6059c4fc69f99d59942b690e99331b5270f"}, - {"path": "tests/contracts/c-distribution-v1.json", "sha256": "8c3a9dec2a676dc840ab9a2d89d50e5f01924c15a86d19d1b5e2f3d9c42c3938"} + {"path": "tests/contracts/c-distribution-v1.json", "sha256": "b74fa5acfe6eb429777b865d7397b174cac7b5a47be70a4a9778ca39d324fd67"} ] } }, diff --git a/tests/contracts/c-distribution-v1.json b/tests/contracts/c-distribution-v1.json index 6a7ab9f4..7edbaf77 100644 --- a/tests/contracts/c-distribution-v1.json +++ b/tests/contracts/c-distribution-v1.json @@ -241,7 +241,7 @@ "source_authorities": [ { "path": "type-bridge-core/crates/c/Cargo.toml", - "sha256": "c0ca37d12896cd32313b7f3ca65b568d7ead9c1f39c2697f98f6a72178aa354e" + "sha256": "a34c60b3e78207c720205312f0e0dc72081dc0ef5fa2e03114cc2f80755db763" }, { "path": "type-bridge-core/crates/c/CMakeLists.txt", diff --git a/tests/unit/compat/test_cargo_release_inventory.py b/tests/unit/compat/test_cargo_release_inventory.py index 69414171..1ded8f82 100644 --- a/tests/unit/compat/test_cargo_release_inventory.py +++ b/tests/unit/compat/test_cargo_release_inventory.py @@ -45,18 +45,21 @@ def test_repository_inventory_closes_every_cargo_product_class() -> None: assert inventory.release_version == "2.3.0" assert inventory.first_party_msrv == "1.88" - assert len(inventory.packages) == 23 + assert len(inventory.packages) == 24 assert len(inventory.public_packages) == 19 assert len(inventory.first_party_packages) == 17 assert len(inventory.immutable_packages) == 2 - assert len(inventory.private_packages) == 4 + assert len(inventory.private_packages) == 5 assert [package.publish_order for package in inventory.public_packages] == list(range(1, 20)) assert {package.name for package in inventory.binding_packages} == { "type-bridge-c", "type-bridge-core", "type-bridge-node", } - assert [package.name for package in inventory.tooling_packages] == ["type-bridge-perf"] + assert [package.name for package in inventory.tooling_packages] == [ + "type-bridge-perf", + "type-bridge-perf-stages", + ] assert set(inventory.private_packages) == { *inventory.binding_packages, *inventory.tooling_packages, @@ -222,9 +225,7 @@ def test_tooling_dependency_rule_accepts_the_checked_in_manifests() -> None: assert inventory_module.tooling_dependency_violations(inventory, workspace) == [] -PYTHON_PERF_DEPENDENCY = ( - 'type-bridge-perf = { path = "../perf", default-features = false, optional = true }' -) +PYTHON_PERF_DEPENDENCY = 'type-bridge-perf-stages = { path = "../perf-stages", default-features = false, optional = true }' @pytest.mark.parametrize( @@ -233,19 +234,19 @@ def test_tooling_dependency_rule_accepts_the_checked_in_manifests() -> None: ( "crates/orm/Cargo.toml", "[dependencies]\n", - '[dependencies]\ntype-bridge-perf = { path = "../perf", optional = true }\n', + '[dependencies]\ntype-bridge-perf-stages = { path = "../perf-stages", optional = true }\n', "only a private binding may link tooling", ), ( "crates/python/Cargo.toml", PYTHON_PERF_DEPENDENCY, - 'type-bridge-perf = { path = "../perf", default-features = false }', + 'type-bridge-perf-stages = { path = "../perf-stages", default-features = false }', "must be an optional normal dependency", ), ( "crates/python/Cargo.toml", PYTHON_PERF_DEPENDENCY, - 'type-bridge-perf = { path = "../perf", optional = true }', + 'type-bridge-perf-stages = { path = "../perf-stages", optional = true }', "must be an optional normal dependency", ), ( @@ -257,7 +258,7 @@ def test_tooling_dependency_rule_accepts_the_checked_in_manifests() -> None: ( "crates/python/Cargo.toml", "default = []", - 'default = []\nprofiling = ["type-bridge-perf/pipelines"]', + 'default = []\nprofiling = ["type-bridge-perf-stages/tracing"]', "must be enabled by 'perf-stages' alone", ), ], diff --git a/tests/unit/compat/test_python_release_artifact_validator.py b/tests/unit/compat/test_python_release_artifact_validator.py index 0c4c4046..2edbf7d7 100644 --- a/tests/unit/compat/test_python_release_artifact_validator.py +++ b/tests/unit/compat/test_python_release_artifact_validator.py @@ -957,14 +957,13 @@ def test_core_sdist_rejects_non_generated_symbolic_and_nonregular_inputs( validator.core_sdist_source_authorities(tmp_path) -def test_core_sdist_optional_derive_source_is_an_exact_raw_include() -> None: - assert "crates/orm-derive" in validator.CORE_SDIST_SOURCE_ROOTS - assert "crates/orm-derive" in validator.CORE_SDIST_EXPLICIT_RAW_SOURCE_ROOTS - assert "crates/orm-derive" not in validator.CORE_SDIST_WORKSPACE_MEMBERS - assert ( - "crates/orm-derive/Cargo.toml" not in validator.CORE_SDIST_TRANSFORMED_FIRST_PARTY_MANIFESTS - ) - assert "crates/orm-derive/LICENSE" not in validator.CORE_SDIST_GENERATED_LICENSES +@pytest.mark.parametrize("root", ["crates/orm-derive", "crates/perf-stages"]) +def test_core_sdist_optional_path_sources_are_exact_raw_includes(root: str) -> None: + assert root in validator.CORE_SDIST_SOURCE_ROOTS + assert root in validator.CORE_SDIST_EXPLICIT_RAW_SOURCE_ROOTS + assert root not in validator.CORE_SDIST_WORKSPACE_MEMBERS + assert f"{root}/Cargo.toml" not in validator.CORE_SDIST_TRANSFORMED_FIRST_PARTY_MANIFESTS + assert f"{root}/LICENSE" not in validator.CORE_SDIST_GENERATED_LICENSES def test_core_sdist_rejects_changed_raw_optional_derive_manifest(tmp_path: Path) -> None: diff --git a/tests/unit/compat/test_release_identity_validator.py b/tests/unit/compat/test_release_identity_validator.py index 30dc25cc..8530abf3 100644 --- a/tests/unit/compat/test_release_identity_validator.py +++ b/tests/unit/compat/test_release_identity_validator.py @@ -231,6 +231,7 @@ def test_repository_cargo_graph_is_complete_and_ordered() -> None: "type-bridge-core", "type-bridge-node", "type-bridge-perf", + "type-bridge-perf-stages", ] dependency_order = report["cargo_manifest_dependency_order"] assert isinstance(dependency_order, dict) @@ -263,6 +264,7 @@ def test_repository_cargo_graph_is_complete_and_ordered() -> None: "type-bridge-orm", "type-bridge-orm-derive", "type-bridge-perf", + "type-bridge-perf-stages", "type-bridge-query", "type-bridge-schema", "type-bridge-schema-codegen", diff --git a/tests/unit/compat/test_rust_generated_parity_inventory.py b/tests/unit/compat/test_rust_generated_parity_inventory.py index e0bab1a9..27ecc33f 100644 --- a/tests/unit/compat/test_rust_generated_parity_inventory.py +++ b/tests/unit/compat/test_rust_generated_parity_inventory.py @@ -126,11 +126,24 @@ def test_only_binding_perf_stages_features_depend_on_the_private_perf_harness() dependents = sorted( manifest.parent.name for manifest in (workspace / "crates").glob("*/Cargo.toml") - if _depends_on(tomllib.loads(manifest.read_text(encoding="utf-8")), "type-bridge-perf") + if _depends_on( + tomllib.loads(manifest.read_text(encoding="utf-8")), "type-bridge-perf-stages" + ) ) - assert dependents == ["c", "node", "python"] - perf = tomllib.loads((workspace / "crates/perf/Cargo.toml").read_text(encoding="utf-8")) - assert perf["package"]["publish"] is False + # The bindings and the pipelines harness, which re-exports the layer. + assert dependents == ["c", "node", "perf", "python"] + # The bindings link only the stage layer, never the pipelines harness. + assert not [ + manifest.parent.name + for manifest in (workspace / "crates").glob("*/Cargo.toml") + if manifest.parent.name not in {"perf", "perf-stages"} + and _depends_on(tomllib.loads(manifest.read_text(encoding="utf-8")), "type-bridge-perf") + ] + for crate in ("perf", "perf-stages"): + manifest = tomllib.loads( + (workspace / f"crates/{crate}/Cargo.toml").read_text(encoding="utf-8") + ) + assert manifest["package"]["publish"] is False def _assert_source_evidence(item: dict[str, Any]) -> None: diff --git a/tests/unit/infra/test_release_artifact_gates.py b/tests/unit/infra/test_release_artifact_gates.py index 64c6d2fd..da294fe7 100644 --- a/tests/unit/infra/test_release_artifact_gates.py +++ b/tests/unit/infra/test_release_artifact_gates.py @@ -80,6 +80,7 @@ def test_core_sdist_includes_optional_rust_path_dependency() -> None: "path": "crates/orm-derive/**/*", "format": "sdist", } in included + assert {"path": "crates/perf-stages/**/*", "format": "sdist"} in included assert {"path": "LICENSE", "format": "sdist"} in included diff --git a/type-bridge-core/Cargo.lock b/type-bridge-core/Cargo.lock index de92aad0..06256d3c 100644 --- a/type-bridge-core/Cargo.lock +++ b/type-bridge-core/Cargo.lock @@ -3247,7 +3247,7 @@ dependencies = [ "type-bridge-contract", "type-bridge-core-lib", "type-bridge-orm", - "type-bridge-perf", + "type-bridge-perf-stages", "type-bridge-schema", "type-bridge-schema-codegen", "type-bridge-schema-migration", @@ -3304,7 +3304,7 @@ dependencies = [ "type-bridge-core-lib", "type-bridge-migration", "type-bridge-orm", - "type-bridge-perf", + "type-bridge-perf-stages", "type-bridge-schema", "type-bridge-schema-codegen", "type-bridge-schema-compat", @@ -3382,7 +3382,7 @@ dependencies = [ "type-bridge-contract", "type-bridge-core-lib", "type-bridge-orm", - "type-bridge-perf", + "type-bridge-perf-stages", "type-bridge-schema", "type-bridge-schema-codegen", "type-bridge-schema-migration", @@ -3433,16 +3433,24 @@ version = "2.3.0" dependencies = [ "serde_json", "tokio", - "tracing", - "tracing-subscriber", "type-bridge", "type-bridge-cli", "type-bridge-contract", "type-bridge-orm", + "type-bridge-perf-stages", "type-bridge-schema", "type-bridge-schema-codegen", ] +[[package]] +name = "type-bridge-perf-stages" +version = "2.3.0" +dependencies = [ + "tokio", + "tracing", + "tracing-subscriber", +] + [[package]] name = "type-bridge-query" version = "2.3.0" diff --git a/type-bridge-core/Cargo.toml b/type-bridge-core/Cargo.toml index c1422b20..1c259549 100644 --- a/type-bridge-core/Cargo.toml +++ b/type-bridge-core/Cargo.toml @@ -22,6 +22,7 @@ members = [ "crates/rust", "crates/toml-transpiler", "crates/perf", + "crates/perf-stages", "vendor/typedb-protocol-b8", "vendor/typedb-driver-b8", ] diff --git a/type-bridge-core/crates/c/Cargo.toml b/type-bridge-core/crates/c/Cargo.toml index b0940eef..35cf9d07 100644 --- a/type-bridge-core/crates/c/Cargo.toml +++ b/type-bridge-core/crates/c/Cargo.toml @@ -26,13 +26,13 @@ serde_json = "1" tokio = { version = "1", features = ["full"] } tracing = { version = "0.1", default-features = false, features = ["std"] } # Private perf harness; only the off-by-default `perf-stages` feature links it. -type-bridge-perf = { path = "../perf", default-features = false, optional = true } +type-bridge-perf-stages = { path = "../perf-stages", default-features = false, optional = true } [features] default = [] # The private, non-ABI `tb_perf_stages_json` recorder for the perf drivers. # Never enabled for shipped archives. -perf-stages = ["dep:type-bridge-perf"] +perf-stages = ["dep:type-bridge-perf-stages"] [dev-dependencies] sha2 = "0.10" diff --git a/type-bridge-core/crates/c/src/perf_stages.rs b/type-bridge-core/crates/c/src/perf_stages.rs index 3449ff50..1c2818b8 100644 --- a/type-bridge-core/crates/c/src/perf_stages.rs +++ b/type-bridge-core/crates/c/src/perf_stages.rs @@ -30,7 +30,7 @@ pub(crate) fn entry() -> tracing::Span { #[cfg(feature = "perf-stages")] #[unsafe(no_mangle)] pub unsafe extern "C" fn tb_perf_stages_json(buffer: *mut u8, capacity: usize) -> usize { - let Ok(times) = type_bridge_perf::stages::recorder() else { + let Ok(times) = type_bridge_perf_stages::recorder() else { return usize::MAX; }; let stages = times.take(); diff --git a/type-bridge-core/crates/node/Cargo.toml b/type-bridge-core/crates/node/Cargo.toml index 15615dfa..40f39012 100644 --- a/type-bridge-core/crates/node/Cargo.toml +++ b/type-bridge-core/crates/node/Cargo.toml @@ -18,7 +18,7 @@ default = [] contract-test-adapter = [] # The private `_perfStages()` recorder for the perf drivers. Never enabled # for shipped packages. -perf-stages = ["dep:type-bridge-perf"] +perf-stages = ["dep:type-bridge-perf-stages"] [dependencies] type-bridge-contract = { path = "../contract", version = "2.3.0" } @@ -35,7 +35,7 @@ serde_json = "1.0" tokio = { version = "1", features = ["rt-multi-thread", "sync"] } tracing = { version = "0.1", default-features = false, features = ["std"] } # Private perf harness; only the off-by-default `perf-stages` feature links it. -type-bridge-perf = { path = "../perf", default-features = false, optional = true } +type-bridge-perf-stages = { path = "../perf-stages", default-features = false, optional = true } [build-dependencies] napi-build = "2" diff --git a/type-bridge-core/crates/node/src/perf_stages.rs b/type-bridge-core/crates/node/src/perf_stages.rs index eb94bf46..40a04021 100644 --- a/type-bridge-core/crates/node/src/perf_stages.rs +++ b/type-bridge-core/crates/node/src/perf_stages.rs @@ -19,7 +19,7 @@ pub(crate) fn entry() -> tracing::Span { #[cfg(feature = "perf-stages")] #[napi_derive::napi(js_name = "_perfStages")] pub fn perf_stages() -> napi::Result> { - let times = type_bridge_perf::stages::recorder() + let times = type_bridge_perf_stages::recorder() .map_err(|error| napi::Error::new(napi::Status::GenericFailure, error.to_string()))?; Ok(times .take() diff --git a/type-bridge-core/crates/perf-stages/Cargo.toml b/type-bridge-core/crates/perf-stages/Cargo.toml new file mode 100644 index 00000000..f50fb806 --- /dev/null +++ b/type-bridge-core/crates/perf-stages/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "type-bridge-perf-stages" +version = "2.3.0" +edition = "2024" +rust-version = "1.88" +description = "Private perf harness: exclusive wall time per TypeBridge stage span" +license.workspace = true +license-file.workspace = true +repository.workspace = true +authors.workspace = true +# The SDK bindings' off-by-default perf-stages feature links this leaf crate; +# it has no path dependencies, so a binding's source archive stays loadable. +publish = false + +[dependencies] +tracing = "0.1" +tracing-subscriber = { version = "0.3", default-features = false, features = ["registry", "std"] } + +[dev-dependencies] +tokio = { version = "1", features = ["rt", "time"] } + +[lints] +workspace = true diff --git a/type-bridge-core/crates/perf/src/stages.rs b/type-bridge-core/crates/perf-stages/src/lib.rs similarity index 100% rename from type-bridge-core/crates/perf/src/stages.rs rename to type-bridge-core/crates/perf-stages/src/lib.rs diff --git a/type-bridge-core/crates/perf/Cargo.toml b/type-bridge-core/crates/perf/Cargo.toml index 387c093d..d6d8a49a 100644 --- a/type-bridge-core/crates/perf/Cargo.toml +++ b/type-bridge-core/crates/perf/Cargo.toml @@ -23,8 +23,8 @@ required-features = ["pipelines"] [features] default = ["pipelines"] -# The Rust pipeline driver. The SDK bindings link only the stage layer -# (`default-features = false`), so they never pull the SDK or the CLI. +# The Rust pipeline driver. The SDK bindings link only +# type-bridge-perf-stages, so they never pull the SDK or the CLI. pipelines = [ "dep:serde_json", "dep:tokio", @@ -37,8 +37,7 @@ pipelines = [ ] [dependencies] -tracing = "0.1" -tracing-subscriber = { version = "0.3", default-features = false, features = ["registry", "std"] } +type-bridge-perf-stages = { path = "../perf-stages" } serde_json = { version = "1", optional = true } tokio = { version = "1", features = ["rt-multi-thread", "time"], optional = true } type-bridge = { path = "../rust", optional = true } diff --git a/type-bridge-core/crates/perf/src/lib.rs b/type-bridge-core/crates/perf/src/lib.rs index 1a6db3f2..fc1d5f3a 100644 --- a/type-bridge-core/crates/perf/src/lib.rs +++ b/type-bridge-core/crates/perf/src/lib.rs @@ -10,4 +10,4 @@ //! //! The crate is never published and no shipped crate depends on it. -pub mod stages; +pub use type_bridge_perf_stages as stages; diff --git a/type-bridge-core/crates/python/Cargo.toml b/type-bridge-core/crates/python/Cargo.toml index 49852573..6f9aeb53 100644 --- a/type-bridge-core/crates/python/Cargo.toml +++ b/type-bridge-core/crates/python/Cargo.toml @@ -34,13 +34,13 @@ serde_json = "1.0" tokio = { version = "1", features = ["rt-multi-thread"] } tracing = { version = "0.1", default-features = false, features = ["std"] } # Private perf harness; only the off-by-default `perf-stages` feature links it. -type-bridge-perf = { path = "../perf", default-features = false, optional = true } +type-bridge-perf-stages = { path = "../perf-stages", default-features = false, optional = true } [features] default = [] # The private `_perf_stages()` recorder for the perf drivers. Never enabled # for shipped wheels. -perf-stages = ["dep:type-bridge-perf"] +perf-stages = ["dep:type-bridge-perf-stages"] [dev-dependencies] sha2 = "0.10" diff --git a/type-bridge-core/crates/python/src/perf_stages.rs b/type-bridge-core/crates/python/src/perf_stages.rs index d9724455..d78d3444 100644 --- a/type-bridge-core/crates/python/src/perf_stages.rs +++ b/type-bridge-core/crates/python/src/perf_stages.rs @@ -18,8 +18,8 @@ pub(crate) fn entry() -> tracing::Span { #[cfg(feature = "perf-stages")] #[pyo3::pyfunction] fn _perf_stages() -> pyo3::PyResult> { - type_bridge_perf::stages::recorder() - .map(type_bridge_perf::stages::StageTimes::take) + type_bridge_perf_stages::recorder() + .map(type_bridge_perf_stages::StageTimes::take) .map_err(|error| pyo3::exceptions::PyRuntimeError::new_err(error.to_string())) } diff --git a/type-bridge-core/pyproject.toml b/type-bridge-core/pyproject.toml index c3e20f3f..bfbf704a 100644 --- a/type-bridge-core/pyproject.toml +++ b/type-bridge-core/pyproject.toml @@ -29,6 +29,8 @@ include = [ # Cargo metadata resolves optional path dependencies even when their feature # is disabled. Maturin 1.14 no longer discovers this crate automatically. { path = "crates/orm-derive/**/*", format = "sdist" }, + # The perf-stages feature's optional stage-timing crate, for the same reason. + { path = "crates/perf-stages/**/*", format = "sdist" }, ] exclude = [ "python/**/__pycache__/**",