@convesoft/nx-rust 0.0.0 → 1.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +21 -0
- package/PLUGIN.md +106 -0
- package/README.md +51 -1
- package/docs/artifacts.mara.md +374 -0
- package/docs/caching.mara.md +999 -0
- package/docs/ci.mara.md +308 -0
- package/docs/configuration.mara.md +508 -0
- package/docs/decisions.mara.md +3267 -0
- package/docs/execution.mara.md +533 -0
- package/docs/index.mara.md +51 -0
- package/docs/product.mara.md +366 -0
- package/docs/release.mara.md +493 -0
- package/docs/setup.mara.md +486 -0
- package/docs/targets.mara.md +704 -0
- package/docs/testing.mara.md +431 -0
- package/docs/verification.mara.md +465 -0
- package/docs/workspaces.mara.md +445 -0
- package/executors.json +35 -0
- package/generators.json +19 -0
- package/package.json +17 -4
- package/src/cargo/build-settings.d.ts +61 -0
- package/src/cargo/build-settings.js +103 -0
- package/src/cargo/build-settings.js.map +1 -0
- package/src/cargo/configured-runner.d.ts +36 -0
- package/src/cargo/configured-runner.js +99 -0
- package/src/cargo/configured-runner.js.map +1 -0
- package/src/cargo/configured-tools.d.ts +35 -0
- package/src/cargo/configured-tools.js +46 -0
- package/src/cargo/configured-tools.js.map +1 -0
- package/src/cargo/dep-info-basedir.d.ts +18 -0
- package/src/cargo/dep-info-basedir.js +38 -0
- package/src/cargo/dep-info-basedir.js.map +1 -0
- package/src/cargo/directories.d.ts +40 -0
- package/src/cargo/directories.js +89 -0
- package/src/cargo/directories.js.map +1 -0
- package/src/cargo/host-triple.d.ts +7 -0
- package/src/cargo/host-triple.js +21 -0
- package/src/cargo/host-triple.js.map +1 -0
- package/src/cargo/lockfile.d.ts +63 -0
- package/src/cargo/lockfile.js +157 -0
- package/src/cargo/lockfile.js.map +1 -0
- package/src/cargo/metadata.d.ts +114 -0
- package/src/cargo/metadata.js +37 -0
- package/src/cargo/metadata.js.map +1 -0
- package/src/cargo/package-specs.d.ts +54 -0
- package/src/cargo/package-specs.js +109 -0
- package/src/cargo/package-specs.js.map +1 -0
- package/src/cargo/paths-crates.d.ts +27 -0
- package/src/cargo/paths-crates.js +69 -0
- package/src/cargo/paths-crates.js.map +1 -0
- package/src/cargo/print-artifact-folders.d.ts +1 -0
- package/src/cargo/print-artifact-folders.js +58 -0
- package/src/cargo/print-artifact-folders.js.map +1 -0
- package/src/cargo/redirections.d.ts +90 -0
- package/src/cargo/redirections.js +200 -0
- package/src/cargo/redirections.js.map +1 -0
- package/src/cargo/run-cargo.d.ts +31 -0
- package/src/cargo/run-cargo.js +75 -0
- package/src/cargo/run-cargo.js.map +1 -0
- package/src/cargo/target-triples.d.ts +98 -0
- package/src/cargo/target-triples.js +265 -0
- package/src/cargo/target-triples.js.map +1 -0
- package/src/cargo/version-req.d.ts +12 -0
- package/src/cargo/version-req.js +122 -0
- package/src/cargo/version-req.js.map +1 -0
- package/src/cargo/warnings-setting.d.ts +24 -0
- package/src/cargo/warnings-setting.js +81 -0
- package/src/cargo/warnings-setting.js.map +1 -0
- package/src/compatibility/cargo-version.d.ts +43 -0
- package/src/compatibility/cargo-version.js +83 -0
- package/src/compatibility/cargo-version.js.map +1 -0
- package/src/compatibility/nx-bridge.d.ts +312 -0
- package/src/compatibility/nx-bridge.js +407 -0
- package/src/compatibility/nx-bridge.js.map +1 -0
- package/src/compatibility/nx-version.d.ts +104 -0
- package/src/compatibility/nx-version.js +272 -0
- package/src/compatibility/nx-version.js.map +1 -0
- package/src/executors/affected-inputs.d.ts +29 -0
- package/src/executors/affected-inputs.js +259 -0
- package/src/executors/affected-inputs.js.map +1 -0
- package/src/executors/affected-run.d.ts +54 -0
- package/src/executors/affected-run.js +394 -0
- package/src/executors/affected-run.js.map +1 -0
- package/src/executors/affected.d.ts +239 -0
- package/src/executors/affected.js +589 -0
- package/src/executors/affected.js.map +1 -0
- package/src/executors/baseline-context.d.ts +85 -0
- package/src/executors/baseline-context.js +227 -0
- package/src/executors/baseline-context.js.map +1 -0
- package/src/executors/baseline.d.ts +123 -0
- package/src/executors/baseline.js +356 -0
- package/src/executors/baseline.js.map +1 -0
- package/src/executors/batch.d.ts +75 -0
- package/src/executors/batch.js +434 -0
- package/src/executors/batch.js.map +1 -0
- package/src/executors/build-records.d.ts +110 -0
- package/src/executors/build-records.js +267 -0
- package/src/executors/build-records.js.map +1 -0
- package/src/executors/cargo/executor.d.ts +28 -0
- package/src/executors/cargo/executor.js +58 -0
- package/src/executors/cargo/executor.js.map +1 -0
- package/src/executors/cargo/schema.json +58 -0
- package/src/executors/cargo-invocation.d.ts +81 -0
- package/src/executors/cargo-invocation.js +109 -0
- package/src/executors/cargo-invocation.js.map +1 -0
- package/src/executors/cargo-output.d.ts +218 -0
- package/src/executors/cargo-output.js +660 -0
- package/src/executors/cargo-output.js.map +1 -0
- package/src/executors/command.d.ts +331 -0
- package/src/executors/command.js +547 -0
- package/src/executors/command.js.map +1 -0
- package/src/executors/coverage-baseline.d.ts +23 -0
- package/src/executors/coverage-baseline.js +284 -0
- package/src/executors/coverage-baseline.js.map +1 -0
- package/src/executors/declared-options.d.ts +21 -0
- package/src/executors/declared-options.js +58 -0
- package/src/executors/declared-options.js.map +1 -0
- package/src/executors/denied-warnings.d.ts +99 -0
- package/src/executors/denied-warnings.js +188 -0
- package/src/executors/denied-warnings.js.map +1 -0
- package/src/executors/digests.d.ts +94 -0
- package/src/executors/digests.js +190 -0
- package/src/executors/digests.js.map +1 -0
- package/src/executors/dotenv-check.d.ts +79 -0
- package/src/executors/dotenv-check.js +553 -0
- package/src/executors/dotenv-check.js.map +1 -0
- package/src/executors/group-invocations.d.ts +80 -0
- package/src/executors/group-invocations.js +253 -0
- package/src/executors/group-invocations.js.map +1 -0
- package/src/executors/group-run.d.ts +114 -0
- package/src/executors/group-run.js +601 -0
- package/src/executors/group-run.js.map +1 -0
- package/src/executors/groups.d.ts +118 -0
- package/src/executors/groups.js +304 -0
- package/src/executors/groups.js.map +1 -0
- package/src/executors/input-check.d.ts +52 -0
- package/src/executors/input-check.js +271 -0
- package/src/executors/input-check.js.map +1 -0
- package/src/executors/kept-files.d.ts +98 -0
- package/src/executors/kept-files.js +341 -0
- package/src/executors/kept-files.js.map +1 -0
- package/src/executors/lockfile/executor.d.ts +16 -0
- package/src/executors/lockfile/executor.js +37 -0
- package/src/executors/lockfile/executor.js.map +1 -0
- package/src/executors/lockfile/schema.json +50 -0
- package/src/executors/napi-build.d.ts +73 -0
- package/src/executors/napi-build.js +420 -0
- package/src/executors/napi-build.js.map +1 -0
- package/src/executors/nextest.d.ts +189 -0
- package/src/executors/nextest.js +504 -0
- package/src/executors/nextest.js.map +1 -0
- package/src/executors/nx-command.d.ts +95 -0
- package/src/executors/nx-command.js +205 -0
- package/src/executors/nx-command.js.map +1 -0
- package/src/executors/nx-task-files.d.ts +82 -0
- package/src/executors/nx-task-files.js +156 -0
- package/src/executors/nx-task-files.js.map +1 -0
- package/src/executors/print-test-mode.d.ts +1 -0
- package/src/executors/print-test-mode.js +25 -0
- package/src/executors/print-test-mode.js.map +1 -0
- package/src/executors/release-publish/executor.d.ts +24 -0
- package/src/executors/release-publish/executor.js +165 -0
- package/src/executors/release-publish/executor.js.map +1 -0
- package/src/executors/release-publish/schema.json +30 -0
- package/src/executors/run/executor.d.ts +12 -0
- package/src/executors/run/executor.js +27 -0
- package/src/executors/run/executor.js.map +1 -0
- package/src/executors/run/schema.json +45 -0
- package/src/executors/runner-script.d.ts +12 -0
- package/src/executors/runner-script.js +22 -0
- package/src/executors/runner-script.js.map +1 -0
- package/src/executors/runtime-input-check.d.ts +24 -0
- package/src/executors/runtime-input-check.js +87 -0
- package/src/executors/runtime-input-check.js.map +1 -0
- package/src/executors/shared-artifacts.d.ts +44 -0
- package/src/executors/shared-artifacts.js +132 -0
- package/src/executors/shared-artifacts.js.map +1 -0
- package/src/executors/split-words.d.ts +24 -0
- package/src/executors/split-words.js +111 -0
- package/src/executors/split-words.js.map +1 -0
- package/src/executors/stage.d.ts +163 -0
- package/src/executors/stage.js +526 -0
- package/src/executors/stage.js.map +1 -0
- package/src/executors/staged-run.d.ts +24 -0
- package/src/executors/staged-run.js +110 -0
- package/src/executors/staged-run.js.map +1 -0
- package/src/executors/task-env.d.ts +271 -0
- package/src/executors/task-env.js +494 -0
- package/src/executors/task-env.js.map +1 -0
- package/src/executors/task-execution.d.ts +61 -0
- package/src/executors/task-execution.js +122 -0
- package/src/executors/task-execution.js.map +1 -0
- package/src/executors/task-guards.d.ts +112 -0
- package/src/executors/task-guards.js +435 -0
- package/src/executors/task-guards.js.map +1 -0
- package/src/executors/task-options.d.ts +114 -0
- package/src/executors/task-options.js +258 -0
- package/src/executors/task-options.js.map +1 -0
- package/src/executors/task.d.ts +166 -0
- package/src/executors/task.js +527 -0
- package/src/executors/task.js.map +1 -0
- package/src/executors/test-mode.d.ts +185 -0
- package/src/executors/test-mode.js +397 -0
- package/src/executors/test-mode.js.map +1 -0
- package/src/executors/test-runner.d.ts +44 -0
- package/src/executors/test-runner.js +159 -0
- package/src/executors/test-runner.js.map +1 -0
- package/src/executors/test-steps.d.ts +121 -0
- package/src/executors/test-steps.js +566 -0
- package/src/executors/test-steps.js.map +1 -0
- package/src/executors/wasm-build.d.ts +56 -0
- package/src/executors/wasm-build.js +216 -0
- package/src/executors/wasm-build.js.map +1 -0
- package/src/generators/crate/binary.schema.json +28 -0
- package/src/generators/crate/crate.d.ts +24 -0
- package/src/generators/crate/crate.js +108 -0
- package/src/generators/crate/crate.js.map +1 -0
- package/src/generators/crate/enclosing-workspace.d.ts +25 -0
- package/src/generators/crate/enclosing-workspace.js +58 -0
- package/src/generators/crate/enclosing-workspace.js.map +1 -0
- package/src/generators/crate/library.schema.json +28 -0
- package/src/generators/init/graph-check.d.ts +81 -0
- package/src/generators/init/graph-check.js +299 -0
- package/src/generators/init/graph-check.js.map +1 -0
- package/src/generators/init/init.d.ts +23 -0
- package/src/generators/init/init.js +113 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/report.d.ts +19 -0
- package/src/generators/init/report.js +93 -0
- package/src/generators/init/report.js.map +1 -0
- package/src/generators/init/schema.json +9 -0
- package/src/graph/artifact-kinds.d.ts +29 -0
- package/src/graph/artifact-kinds.js +50 -0
- package/src/graph/artifact-kinds.js.map +1 -0
- package/src/graph/artifact-names.d.ts +97 -0
- package/src/graph/artifact-names.js +276 -0
- package/src/graph/artifact-names.js.map +1 -0
- package/src/graph/build-records.d.ts +74 -0
- package/src/graph/build-records.js +104 -0
- package/src/graph/build-records.js.map +1 -0
- package/src/graph/caching.d.ts +148 -0
- package/src/graph/caching.js +681 -0
- package/src/graph/caching.js.map +1 -0
- package/src/graph/clippy-input.d.ts +53 -0
- package/src/graph/clippy-input.js +107 -0
- package/src/graph/clippy-input.js.map +1 -0
- package/src/graph/collisions.d.ts +113 -0
- package/src/graph/collisions.js +156 -0
- package/src/graph/collisions.js.map +1 -0
- package/src/graph/computation-reports.d.ts +89 -0
- package/src/graph/computation-reports.js +216 -0
- package/src/graph/computation-reports.js.map +1 -0
- package/src/graph/declared-files.d.ts +190 -0
- package/src/graph/declared-files.js +600 -0
- package/src/graph/declared-files.js.map +1 -0
- package/src/graph/discovery.d.ts +190 -0
- package/src/graph/discovery.js +661 -0
- package/src/graph/discovery.js.map +1 -0
- package/src/graph/edges.d.ts +25 -0
- package/src/graph/edges.js +94 -0
- package/src/graph/edges.js.map +1 -0
- package/src/graph/entries.d.ts +83 -0
- package/src/graph/entries.js +259 -0
- package/src/graph/entries.js.map +1 -0
- package/src/graph/inputs.d.ts +422 -0
- package/src/graph/inputs.js +756 -0
- package/src/graph/inputs.js.map +1 -0
- package/src/graph/lockfile-task.d.ts +74 -0
- package/src/graph/lockfile-task.js +105 -0
- package/src/graph/lockfile-task.js.map +1 -0
- package/src/graph/names.d.ts +41 -0
- package/src/graph/names.js +34 -0
- package/src/graph/names.js.map +1 -0
- package/src/graph/napi.d.ts +107 -0
- package/src/graph/napi.js +206 -0
- package/src/graph/napi.js.map +1 -0
- package/src/graph/nx-glob.d.ts +36 -0
- package/src/graph/nx-glob.js +152 -0
- package/src/graph/nx-glob.js.map +1 -0
- package/src/graph/nx-internals.d.ts +57 -0
- package/src/graph/nx-internals.js +128 -0
- package/src/graph/nx-internals.js.map +1 -0
- package/src/graph/options.d.ts +32 -0
- package/src/graph/options.js +80 -0
- package/src/graph/options.js.map +1 -0
- package/src/graph/outputs.d.ts +75 -0
- package/src/graph/outputs.js +140 -0
- package/src/graph/outputs.js.map +1 -0
- package/src/graph/path-dependencies.d.ts +122 -0
- package/src/graph/path-dependencies.js +459 -0
- package/src/graph/path-dependencies.js.map +1 -0
- package/src/graph/plugin-package.d.ts +36 -0
- package/src/graph/plugin-package.js +132 -0
- package/src/graph/plugin-package.js.map +1 -0
- package/src/graph/plugin-version.d.ts +20 -0
- package/src/graph/plugin-version.js +153 -0
- package/src/graph/plugin-version.js.map +1 -0
- package/src/graph/projects.d.ts +141 -0
- package/src/graph/projects.js +193 -0
- package/src/graph/projects.js.map +1 -0
- package/src/graph/reached-projects.d.ts +46 -0
- package/src/graph/reached-projects.js +102 -0
- package/src/graph/reached-projects.js.map +1 -0
- package/src/graph/real-path.d.ts +47 -0
- package/src/graph/real-path.js +113 -0
- package/src/graph/real-path.js.map +1 -0
- package/src/graph/redirected-uses.d.ts +98 -0
- package/src/graph/redirected-uses.js +434 -0
- package/src/graph/redirected-uses.js.map +1 -0
- package/src/graph/registration.d.ts +121 -0
- package/src/graph/registration.js +233 -0
- package/src/graph/registration.js.map +1 -0
- package/src/graph/rustfmt-config.d.ts +42 -0
- package/src/graph/rustfmt-config.js +173 -0
- package/src/graph/rustfmt-config.js.map +1 -0
- package/src/graph/script-input.d.ts +46 -0
- package/src/graph/script-input.js +65 -0
- package/src/graph/script-input.js.map +1 -0
- package/src/graph/settings.d.ts +178 -0
- package/src/graph/settings.js +479 -0
- package/src/graph/settings.js.map +1 -0
- package/src/graph/target-defaults-causes.d.ts +33 -0
- package/src/graph/target-defaults-causes.js +202 -0
- package/src/graph/target-defaults-causes.js.map +1 -0
- package/src/graph/target-defaults-layers.d.ts +186 -0
- package/src/graph/target-defaults-layers.js +420 -0
- package/src/graph/target-defaults-layers.js.map +1 -0
- package/src/graph/target-defaults-meaning.d.ts +95 -0
- package/src/graph/target-defaults-meaning.js +292 -0
- package/src/graph/target-defaults-meaning.js.map +1 -0
- package/src/graph/target-defaults-report.d.ts +77 -0
- package/src/graph/target-defaults-report.js +242 -0
- package/src/graph/target-defaults-report.js.map +1 -0
- package/src/graph/target-defaults.d.ts +79 -0
- package/src/graph/target-defaults.js +425 -0
- package/src/graph/target-defaults.js.map +1 -0
- package/src/graph/target-fields.d.ts +16 -0
- package/src/graph/target-fields.js +134 -0
- package/src/graph/target-fields.js.map +1 -0
- package/src/graph/target-tables.d.ts +45 -0
- package/src/graph/target-tables.js +299 -0
- package/src/graph/target-tables.js.map +1 -0
- package/src/graph/targets.d.ts +371 -0
- package/src/graph/targets.js +408 -0
- package/src/graph/targets.js.map +1 -0
- package/src/graph/unification.d.ts +141 -0
- package/src/graph/unification.js +459 -0
- package/src/graph/unification.js.map +1 -0
- package/src/graph/unignored-directories.d.ts +25 -0
- package/src/graph/unignored-directories.js +89 -0
- package/src/graph/unignored-directories.js.map +1 -0
- package/src/graph/visibility.d.ts +17 -0
- package/src/graph/visibility.js +67 -0
- package/src/graph/visibility.js.map +1 -0
- package/src/graph/warnings.d.ts +38 -0
- package/src/graph/warnings.js +77 -0
- package/src/graph/warnings.js.map +1 -0
- package/src/graph/wasm.d.ts +56 -0
- package/src/graph/wasm.js +77 -0
- package/src/graph/wasm.js.map +1 -0
- package/src/index.d.ts +68 -0
- package/src/index.js +109 -0
- package/src/index.js.map +1 -0
- package/src/release/manifests.d.ts +95 -0
- package/src/release/manifests.js +164 -0
- package/src/release/manifests.js.map +1 -0
- package/src/release/places.d.ts +127 -0
- package/src/release/places.js +368 -0
- package/src/release/places.js.map +1 -0
- package/src/release/publish-cargo.d.ts +177 -0
- package/src/release/publish-cargo.js +351 -0
- package/src/release/publish-cargo.js.map +1 -0
- package/src/release/publish-crates.d.ts +124 -0
- package/src/release/publish-crates.js +242 -0
- package/src/release/publish-crates.js.map +1 -0
- package/src/release/publish-environments.d.ts +50 -0
- package/src/release/publish-environments.js +284 -0
- package/src/release/publish-environments.js.map +1 -0
- package/src/release/publish-messages.d.ts +66 -0
- package/src/release/publish-messages.js +273 -0
- package/src/release/publish-messages.js.map +1 -0
- package/src/release/publish-registry.d.ts +27 -0
- package/src/release/publish-registry.js +135 -0
- package/src/release/publish-registry.js.map +1 -0
- package/src/release/publish-settings.d.ts +26 -0
- package/src/release/publish-settings.js +56 -0
- package/src/release/publish-settings.js.map +1 -0
- package/src/release/publish.d.ts +59 -0
- package/src/release/publish.js +620 -0
- package/src/release/publish.js.map +1 -0
- package/src/release/repository.d.ts +73 -0
- package/src/release/repository.js +219 -0
- package/src/release/repository.js.map +1 -0
- package/src/release/requirements.d.ts +34 -0
- package/src/release/requirements.js +30 -0
- package/src/release/requirements.js.map +1 -0
- package/src/release/toml-edit.d.ts +67 -0
- package/src/release/toml-edit.js +453 -0
- package/src/release/toml-edit.js.map +1 -0
- package/src/release/version-actions.d.ts +133 -0
- package/src/release/version-actions.js +474 -0
- package/src/release/version-actions.js.map +1 -0
- package/src/release/version-checks.d.ts +21 -0
- package/src/release/version-checks.js +151 -0
- package/src/release/version-checks.js.map +1 -0
- package/src/release/version-lockfiles.d.ts +61 -0
- package/src/release/version-lockfiles.js +222 -0
- package/src/release/version-lockfiles.js.map +1 -0
- package/src/tools/napi-cli.d.ts +70 -0
- package/src/tools/napi-cli.js +63 -0
- package/src/tools/napi-cli.js.map +1 -0
- package/src/tools/optional-tools.d.ts +121 -0
- package/src/tools/optional-tools.js +303 -0
- package/src/tools/optional-tools.js.map +1 -0
- package/src/tools/print-napi-cli.d.ts +1 -0
- package/src/tools/print-napi-cli.js +24 -0
- package/src/tools/print-napi-cli.js.map +1 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { CargoPackage } from "../cargo/metadata";
|
|
2
|
+
import type { ReportedWorkspace } from "./discovery";
|
|
3
|
+
/**
|
|
4
|
+
* What the executor of `build` needs to name the dependency files that
|
|
5
|
+
* `cargo build -p <crate>` exports beside the crate's library and binaries,
|
|
6
|
+
* without asking cargo (`DES-BUILD-INPUT-CHECK`, points 1 and 2). Graph
|
|
7
|
+
* creation takes it from the `cargo metadata` report and puts it into the
|
|
8
|
+
* metadata of the crate's `build` target, which Nx keeps out of task hashes.
|
|
9
|
+
* Cargo's directories are not part of it: the executor asks cargo for them
|
|
10
|
+
* with the task's environment, which a dotenv file of the task can change.
|
|
11
|
+
*/
|
|
12
|
+
export interface BuildRecordSource {
|
|
13
|
+
/** The crate's library, if it has one. */
|
|
14
|
+
library?: {
|
|
15
|
+
/** The library's name as Cargo reports it. */
|
|
16
|
+
name: string;
|
|
17
|
+
/** Whether it is a proc macro, which cargo builds for the host whatever the triple. */
|
|
18
|
+
procMacro: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The library's crate types, its `kind` in the report, such as `cdylib`
|
|
21
|
+
* and `rlib`; absent in a graph made before they were recorded, which
|
|
22
|
+
* names `lib<name>.d` for every triple.
|
|
23
|
+
*/
|
|
24
|
+
crateTypes?: string[];
|
|
25
|
+
};
|
|
26
|
+
/** The crate's binaries, with the features that each requires. */
|
|
27
|
+
binaries: {
|
|
28
|
+
name: string;
|
|
29
|
+
requiredFeatures: string[];
|
|
30
|
+
}[];
|
|
31
|
+
/** The crate's features, each with what it turns on, as the report lists them. */
|
|
32
|
+
features: Record<string, string[]>;
|
|
33
|
+
/**
|
|
34
|
+
* The names under which the crate lists its optional dependencies that
|
|
35
|
+
* no platform limits, sorted: a `<dependency>/<feature>` entry for one of
|
|
36
|
+
* them also turns on the crate's feature of the dependency's name.
|
|
37
|
+
*/
|
|
38
|
+
optionalDependencies?: string[];
|
|
39
|
+
/**
|
|
40
|
+
* The names of the crate's records that a target of another crate with
|
|
41
|
+
* the same artifact directory shares, such as `cli.d` for two binaries
|
|
42
|
+
* called `cli`. Cargo keeps one record for such a name, that of the crate
|
|
43
|
+
* it built last.
|
|
44
|
+
*/
|
|
45
|
+
shared: string[];
|
|
46
|
+
}
|
|
47
|
+
/** The name of the record that cargo exports for a library: `lib<name>.d`, with `-` as `_`. */
|
|
48
|
+
export declare function libraryRecordName(name: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* The name of the record that cargo exports for a library's `cdylib` built
|
|
51
|
+
* for a triple whose dynamic libraries have no `lib` prefix, such as
|
|
52
|
+
* `wasm32-unknown-unknown`, where the library is `<name>.wasm`:
|
|
53
|
+
* `<name>.d`, with `-` as `_` (`EVD-WASM-POSTPROCESS`).
|
|
54
|
+
*/
|
|
55
|
+
export declare function unprefixedLibraryRecordName(name: string): string;
|
|
56
|
+
/** The name of the record that cargo exports for a binary: `<name>.d`. */
|
|
57
|
+
export declare function binaryRecordName(name: string): string;
|
|
58
|
+
/**
|
|
59
|
+
* The record names that targets of more than one crate with the same
|
|
60
|
+
* artifact directory give, for each workspace by its root folder
|
|
61
|
+
* (`DES-BUILD-INPUT-CHECK`, point 2, "A shared name"). Workspaces count as
|
|
62
|
+
* having the same artifact directory where `sharers` links them, also
|
|
63
|
+
* through a third, as for the files of `build` (`directoryGroups` in
|
|
64
|
+
* `artifact-names.ts`). Every member of every workspace counts, those
|
|
65
|
+
* without a project too.
|
|
66
|
+
*/
|
|
67
|
+
export declare function sharedRecordNames(workspaces: readonly ReportedWorkspace[], sharers: ReadonlyMap<ReportedWorkspace, readonly ReportedWorkspace[]>): Map<string, string[]>;
|
|
68
|
+
/**
|
|
69
|
+
* The {@link BuildRecordSource} of a crate.
|
|
70
|
+
*
|
|
71
|
+
* @param shared The record names that targets of several crates with the
|
|
72
|
+
* crate's artifact directory give ({@link sharedRecordNames}).
|
|
73
|
+
*/
|
|
74
|
+
export declare function buildRecordSource(pkg: CargoPackage, shared: readonly string[]): BuildRecordSource;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.libraryRecordName = libraryRecordName;
|
|
4
|
+
exports.unprefixedLibraryRecordName = unprefixedLibraryRecordName;
|
|
5
|
+
exports.binaryRecordName = binaryRecordName;
|
|
6
|
+
exports.sharedRecordNames = sharedRecordNames;
|
|
7
|
+
exports.buildRecordSource = buildRecordSource;
|
|
8
|
+
const artifact_names_1 = require("./artifact-names");
|
|
9
|
+
/** The `kind` values of a library target in the `cargo metadata` report. */
|
|
10
|
+
const libraryKinds = new Set(["lib", "rlib", "dylib", "cdylib", "staticlib", "proc-macro"]);
|
|
11
|
+
/** The name of the record that cargo exports for a library: `lib<name>.d`, with `-` as `_`. */
|
|
12
|
+
function libraryRecordName(name) {
|
|
13
|
+
return `lib${name.replace(/-/g, "_")}.d`;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The name of the record that cargo exports for a library's `cdylib` built
|
|
17
|
+
* for a triple whose dynamic libraries have no `lib` prefix, such as
|
|
18
|
+
* `wasm32-unknown-unknown`, where the library is `<name>.wasm`:
|
|
19
|
+
* `<name>.d`, with `-` as `_` (`EVD-WASM-POSTPROCESS`).
|
|
20
|
+
*/
|
|
21
|
+
function unprefixedLibraryRecordName(name) {
|
|
22
|
+
return `${name.replace(/-/g, "_")}.d`;
|
|
23
|
+
}
|
|
24
|
+
/** The name of the record that cargo exports for a binary: `<name>.d`. */
|
|
25
|
+
function binaryRecordName(name) {
|
|
26
|
+
return `${name}.d`;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The record names that targets of more than one crate with the same
|
|
30
|
+
* artifact directory give, for each workspace by its root folder
|
|
31
|
+
* (`DES-BUILD-INPUT-CHECK`, point 2, "A shared name"). Workspaces count as
|
|
32
|
+
* having the same artifact directory where `sharers` links them, also
|
|
33
|
+
* through a third, as for the files of `build` (`directoryGroups` in
|
|
34
|
+
* `artifact-names.ts`). Every member of every workspace counts, those
|
|
35
|
+
* without a project too.
|
|
36
|
+
*/
|
|
37
|
+
// @mara implements DES-BUILD-INPUT-CHECK
|
|
38
|
+
function sharedRecordNames(workspaces, sharers) {
|
|
39
|
+
var _a;
|
|
40
|
+
const result = new Map();
|
|
41
|
+
for (const group of (0, artifact_names_1.directoryGroups)(workspaces, sharers)) {
|
|
42
|
+
const counts = new Map();
|
|
43
|
+
for (const workspace of group) {
|
|
44
|
+
for (const pkg of workspace.report.packages) {
|
|
45
|
+
for (const name of recordNames(pkg)) {
|
|
46
|
+
counts.set(name, ((_a = counts.get(name)) !== null && _a !== void 0 ? _a : 0) + 1);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const shared = [...counts]
|
|
51
|
+
.filter(([, count]) => count > 1)
|
|
52
|
+
.map(([name]) => name)
|
|
53
|
+
.sort();
|
|
54
|
+
for (const workspace of group) {
|
|
55
|
+
result.set(workspace.root, shared);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The {@link BuildRecordSource} of a crate.
|
|
62
|
+
*
|
|
63
|
+
* @param shared The record names that targets of several crates with the
|
|
64
|
+
* crate's artifact directory give ({@link sharedRecordNames}).
|
|
65
|
+
*/
|
|
66
|
+
// @mara implements DES-BUILD-INPUT-CHECK
|
|
67
|
+
function buildRecordSource(pkg, shared) {
|
|
68
|
+
var _a;
|
|
69
|
+
const library = pkg.targets.find(isLibrary);
|
|
70
|
+
const own = new Set(recordNames(pkg));
|
|
71
|
+
return Object.assign(Object.assign({}, (library === undefined
|
|
72
|
+
? {}
|
|
73
|
+
: {
|
|
74
|
+
library: {
|
|
75
|
+
name: library.name,
|
|
76
|
+
procMacro: library.kind.includes("proc-macro"),
|
|
77
|
+
crateTypes: [...library.kind],
|
|
78
|
+
},
|
|
79
|
+
})), { binaries: pkg.targets
|
|
80
|
+
.filter((target) => target.kind.includes("bin"))
|
|
81
|
+
.map((target) => {
|
|
82
|
+
var _a;
|
|
83
|
+
return ({
|
|
84
|
+
name: target.name,
|
|
85
|
+
requiredFeatures: [...((_a = target["required-features"]) !== null && _a !== void 0 ? _a : [])],
|
|
86
|
+
});
|
|
87
|
+
}), features: Object.fromEntries(Object.entries((_a = pkg.features) !== null && _a !== void 0 ? _a : {}).map(([name, enables]) => [name, [...enables]])), optionalDependencies: [
|
|
88
|
+
...new Set(pkg.dependencies
|
|
89
|
+
.filter((dependency) => dependency.optional === true && !dependency.target)
|
|
90
|
+
.map((dependency) => { var _a; return (_a = dependency.rename) !== null && _a !== void 0 ? _a : dependency.name; })),
|
|
91
|
+
].sort(), shared: shared.filter((name) => own.has(name)) });
|
|
92
|
+
}
|
|
93
|
+
// The names of the records that a package's library and binaries give.
|
|
94
|
+
function recordNames(pkg) {
|
|
95
|
+
return pkg.targets.flatMap((target) => isLibrary(target)
|
|
96
|
+
? [libraryRecordName(target.name)]
|
|
97
|
+
: target.kind.includes("bin")
|
|
98
|
+
? [binaryRecordName(target.name)]
|
|
99
|
+
: []);
|
|
100
|
+
}
|
|
101
|
+
function isLibrary(target) {
|
|
102
|
+
return target.kind.some((kind) => libraryKinds.has(kind));
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=build-records.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-records.js","sourceRoot":"","sources":["../../../../nx-rust/src/graph/build-records.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import type { NxJsonConfiguration, TargetConfiguration } from "@nx/devkit";
|
|
2
|
+
import { type SharedArtifactNames } from "./artifact-names";
|
|
3
|
+
import type { DeclaredPattern } from "./declared-files";
|
|
4
|
+
import type { ComputationReports } from "./computation-reports";
|
|
5
|
+
import type { CargoDiscovery } from "./discovery";
|
|
6
|
+
import { type EntryView } from "./entries";
|
|
7
|
+
import { InputContext, InputSettings, InputSubject } from "./inputs";
|
|
8
|
+
import { ArtifactDirectory } from "./outputs";
|
|
9
|
+
import { InferredTargetName } from "./targets";
|
|
10
|
+
import type { WorkspaceStrategy } from "./unification";
|
|
11
|
+
/** What the caching of every project of one graph computation shares. */
|
|
12
|
+
export interface CacheContext extends InputContext {
|
|
13
|
+
/** Where each workspace's artifact directory lies, by the workspace's root folder. */
|
|
14
|
+
artifactDirectories: ReadonlyMap<string, ArtifactDirectory>;
|
|
15
|
+
/** The warnings for each project, by the manifest path of its crate or of its workspace. */
|
|
16
|
+
warnings: ReadonlyMap<string, readonly string[]>;
|
|
17
|
+
/**
|
|
18
|
+
* The problems of the files that the crates without an edge declare, each
|
|
19
|
+
* once, which stop graph creation together with the projects' own
|
|
20
|
+
* (`inferProjects` in `projects.ts`).
|
|
21
|
+
*/
|
|
22
|
+
declaredFileProblems: readonly string[];
|
|
23
|
+
/**
|
|
24
|
+
* The patterns of the files that the crates without an edge declare, for
|
|
25
|
+
* the check of `createDependencies` (`failOnUncoveredProjectFolders` in
|
|
26
|
+
* `declared-files.ts`).
|
|
27
|
+
*/
|
|
28
|
+
declaredPatterns?: readonly DeclaredPattern[];
|
|
29
|
+
/**
|
|
30
|
+
* The root folders of the workspaces that have no lockfile task, because
|
|
31
|
+
* Nx hands their root manifest to no entry of the plugin: an entry that
|
|
32
|
+
* receives a workspace's other manifests but not its root manifest knows
|
|
33
|
+
* that no other entry receives it either (`checkEntries` in `entries.ts`).
|
|
34
|
+
*/
|
|
35
|
+
withoutLockfileTask?: ReadonlySet<string>;
|
|
36
|
+
/**
|
|
37
|
+
* The record names that targets of several crates with one artifact
|
|
38
|
+
* directory give, by the workspace's root folder (`sharedRecordNames` in
|
|
39
|
+
* `build-records.ts`), which the check of `DES-BUILD-INPUT-CHECK` does not read.
|
|
40
|
+
*/
|
|
41
|
+
sharedRecordNames?: ReadonlyMap<string, readonly string[]>;
|
|
42
|
+
/**
|
|
43
|
+
* The crates whose `build`, and maybe `test`, the plugin leaves uncached
|
|
44
|
+
* because another crate puts a file of the same name into their artifact
|
|
45
|
+
* directory, with the reasons (`sharedArtifactNames` in `artifact-names.ts`).
|
|
46
|
+
*/
|
|
47
|
+
sharedArtifactNames?: SharedArtifactNames;
|
|
48
|
+
/**
|
|
49
|
+
* The feature-unification strategy of each workspace, by its root folder
|
|
50
|
+
* (`workspaceStrategies` in `unification.ts`); a workspace without one
|
|
51
|
+
* uses `workspace-build`.
|
|
52
|
+
*/
|
|
53
|
+
strategies?: ReadonlyMap<string, WorkspaceStrategy>;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Works out what the inputs and outputs of the projects that `discovery`
|
|
57
|
+
* found need beyond each project: how the plugin's version reaches the keys,
|
|
58
|
+
* the crates without a project that path dependencies and redirections
|
|
59
|
+
* reach, the redirected crates whose edges are left out with the crates
|
|
60
|
+
* that cargo builds with them, the path crates outside each workspace that
|
|
61
|
+
* a build of the whole workspace compiles, and where each
|
|
62
|
+
* workspace's artifact directory lies; and the warnings of `DES-DIAGNOSTICS`
|
|
63
|
+
* that these give, together with those about Cargo directories that Nx reads
|
|
64
|
+
* ({@link unignoredDirectoryWarnings}), which it also prints, each once. A
|
|
65
|
+
* path dependency whose report cargo refused adds its warning to the crates
|
|
66
|
+
* that reach it, and the warnings about a workspace's redirections
|
|
67
|
+
* ({@link CargoWorkspace.warnings}) go to every project of the workspace;
|
|
68
|
+
* discovery has printed those already.
|
|
69
|
+
*
|
|
70
|
+
* The redirected uses come from `redirectedUses`, which `createDependencies`
|
|
71
|
+
* asks again with the projects of every plugin and entry. Here it knows only
|
|
72
|
+
* the projects of this entry, so a crate that another entry gives a project
|
|
73
|
+
* counts as one without a project, and its folder joins the inputs beside
|
|
74
|
+
* the edge that `createDependencies` adds.
|
|
75
|
+
*
|
|
76
|
+
* Artifact directories are compared with those of the workspaces that the
|
|
77
|
+
* other entries of the plugin receive as well ({@link otherEntriesWorkspaces}),
|
|
78
|
+
* so that every entry reaches the same verdict (`DES-OUTPUTS`).
|
|
79
|
+
*
|
|
80
|
+
* @param everyProject Warnings that concern every project and have been
|
|
81
|
+
* printed already, such as the one for an Nx major newer than the
|
|
82
|
+
* supported ones (`checkNxForGraph` in `nx-version.ts`); they come first.
|
|
83
|
+
* @param reports The reports of the graph computation, which the other
|
|
84
|
+
* entries in this process share.
|
|
85
|
+
* @param view Where this entry stands among the entries of the plugin: a
|
|
86
|
+
* warning that names crates of several entries is printed by the first
|
|
87
|
+
* of them ({@link warnsHere}), so that it is printed once.
|
|
88
|
+
* @param strategies The feature-unification strategy of each workspace
|
|
89
|
+
* (`workspaceStrategies` in `unification.ts`), whose warnings go to every
|
|
90
|
+
* project of the workspace.
|
|
91
|
+
*/
|
|
92
|
+
export declare function cacheContext(discovery: CargoDiscovery, nxJson: NxJsonConfiguration | undefined, everyProject?: readonly string[], reports?: ComputationReports, view?: EntryView, strategies?: ReadonlyMap<string, WorkspaceStrategy>): Promise<CacheContext>;
|
|
93
|
+
/** What caching needs to know about a project. */
|
|
94
|
+
export type CacheSubject = InputSubject;
|
|
95
|
+
/** What a project's settings change in the caching of its targets. */
|
|
96
|
+
export interface CacheOptions {
|
|
97
|
+
/** The settings that change the project's inputs. */
|
|
98
|
+
settings: InputSettings;
|
|
99
|
+
/**
|
|
100
|
+
* The target tables of the project for the target with this default name,
|
|
101
|
+
* in the order in which they are laid over it (`applyTargetTables` in
|
|
102
|
+
* `target-tables.ts`), as far as their options and configurations decide
|
|
103
|
+
* whether every run of the target names a triple.
|
|
104
|
+
*/
|
|
105
|
+
targetTables?: (target: InferredTargetName) => readonly TargetConfiguration[];
|
|
106
|
+
/** The name that `targetNames` gives the lockfile task, on which cached targets depend. */
|
|
107
|
+
lockfileTarget?: string;
|
|
108
|
+
/**
|
|
109
|
+
* The name that `targetNames` gives `hakari-check`, on which cached targets
|
|
110
|
+
* depend under `hakari` (`DES-UNIFICATION`, "Drift").
|
|
111
|
+
*/
|
|
112
|
+
hakariCheckTarget?: string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Gives each of a project's inferred targets its caching: whether it is
|
|
116
|
+
* cached, its inputs and its outputs (`DES-INPUTS`, `DES-OUTPUTS`), and the
|
|
117
|
+
* plugin's version as the option `pluginVersion` where no npm node carries
|
|
118
|
+
* it. A target arrives cached where `cachedTargets` names it, and stays so
|
|
119
|
+
* unless {@link uncachedReason} gives a reason for this project, its
|
|
120
|
+
* workspace has no lockfile task, or another crate puts a file of the same
|
|
121
|
+
* name into its artifact directory ({@link sharedArtifactNameReason}). Every
|
|
122
|
+
* inferred target gets `cache` and `outputs`, and an uncached one the
|
|
123
|
+
* reason in `metadata.cargo.uncached`, from which the executor fails a task
|
|
124
|
+
* that the configuration caches anyway. The targets that `DES-INPUTS`
|
|
125
|
+
* covers get their inputs, the lockfile task those of
|
|
126
|
+
* `DES-WORKSPACE-TARGETS` and its digest folder as its output, and `audit`,
|
|
127
|
+
* `deny` and `update` keep the inputs that `inferTargets` gave them, with
|
|
128
|
+
* the plugin's input added, which every inferred target has.
|
|
129
|
+
*
|
|
130
|
+
* A target that stays cached, other than `fmt-check`, depends on the
|
|
131
|
+
* lockfile task of its workspace, the project at the workspace's root
|
|
132
|
+
* folder, and under `hakari` on its `hakari-check` as well, which depends
|
|
133
|
+
* on the lockfile task and has the lockfile task's inputs with cargo-hakari's
|
|
134
|
+
* configuration file (`DES-UNIFICATION`, "Drift"), and hashes the digests it
|
|
135
|
+
* writes; where the workspace has no
|
|
136
|
+
* lockfile task, such a target is left uncached instead. Its metadata names
|
|
137
|
+
* the crate's own member and, with `everyDigest`, says that its key holds
|
|
138
|
+
* every member's digest, as `holdsEveryDigest` decides, for the executor's
|
|
139
|
+
* check after cargo's call, which compares each of them, the other members
|
|
140
|
+
* as the lockfile task's metadata names them (`DES-LOCKFILE-HASHING`,
|
|
141
|
+
* "Post-check"). It is the one dependency of a
|
|
142
|
+
* crate's target on a task of another project (`REQ-NO-RUST-TASK-DEPS`);
|
|
143
|
+
* the one on a task of the crate itself, of `test` on `build`, comes from
|
|
144
|
+
* `inferTargets` in `targets.ts`.
|
|
145
|
+
*/
|
|
146
|
+
export declare function configureCaching(targets: Map<InferredTargetName, TargetConfiguration>, subject: CacheSubject, context: CacheContext, options?: CacheOptions): void;
|
|
147
|
+
/** The warnings that concern a project, for its crate's manifest path or its workspace's root manifest. */
|
|
148
|
+
export declare function projectWarnings(subject: CacheSubject, context: CacheContext): string[];
|