@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,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.suggestedBuildDirSetting = void 0;
|
|
4
|
+
exports.initReport = initReport;
|
|
5
|
+
const real_path_1 = require("../../graph/real-path");
|
|
6
|
+
const optional_tools_1 = require("../../tools/optional-tools");
|
|
7
|
+
/** The `build.build-dir` setting that the caching guidance suggests. */
|
|
8
|
+
exports.suggestedBuildDirSetting = [
|
|
9
|
+
"[build]",
|
|
10
|
+
'build-dir = "{cargo-cache-home}/build/{workspace-path-hash}"',
|
|
11
|
+
];
|
|
12
|
+
const cachingGuide = "https://github.com/convesoft/nx-rust/blob/main/nx-rust/docs/caching.mara.md#cargos-two-directories";
|
|
13
|
+
/**
|
|
14
|
+
* The report of step 3 of `init`: the tools of the table that are missing,
|
|
15
|
+
* as warnings where the configuration needs them and on one line otherwise,
|
|
16
|
+
* the workspaces whose build directory lies inside the repository, and how
|
|
17
|
+
* to create a crate where there is none. The warnings that graph creation
|
|
18
|
+
* gives are printed by the check itself.
|
|
19
|
+
*
|
|
20
|
+
* @param env The environment whose `PATH` and `CARGO_HOME` say where tools are installed.
|
|
21
|
+
*/
|
|
22
|
+
// @mara implements DES-GENERATORS
|
|
23
|
+
function initReport(check, workspaceRoot, env, tools = optional_tools_1.optionalTools) {
|
|
24
|
+
var _a, _b;
|
|
25
|
+
const report = { warnings: [], info: [] };
|
|
26
|
+
const nextest = new Set((_a = check.nextestWorkspaces) !== null && _a !== void 0 ? _a : []);
|
|
27
|
+
const affectedTests = new Set((_b = check.affectedTestsWorkspaces) !== null && _b !== void 0 ? _b : []);
|
|
28
|
+
const context = {
|
|
29
|
+
workspaceRoot,
|
|
30
|
+
workspaces: check.workspaces.map((workspace) => {
|
|
31
|
+
var _a;
|
|
32
|
+
const featureUnification = (_a = check.strategies) === null || _a === void 0 ? void 0 : _a.get(workspace.root);
|
|
33
|
+
return Object.assign(Object.assign(Object.assign({ root: workspace.root,
|
|
34
|
+
// Which crates have an artifact target, for the rows of their tools.
|
|
35
|
+
members: workspace.members }, (featureUnification === undefined ? {} : { featureUnification })), (nextest.has(workspace.root) ? { testRunner: "nextest" } : {})), (affectedTests.has(workspace.root) ? { affectedTests: true } : {}));
|
|
36
|
+
}),
|
|
37
|
+
env,
|
|
38
|
+
};
|
|
39
|
+
const notNeeded = [];
|
|
40
|
+
for (const tool of tools) {
|
|
41
|
+
if (tool.installed(context)) {
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const neededBy = tool.neededBy(context);
|
|
45
|
+
if (neededBy.length === 0) {
|
|
46
|
+
notNeeded.push(tool.name);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
report.warnings.push((0, optional_tools_1.missingToolMessage)(tool, neededBy));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (notNeeded.length > 0) {
|
|
53
|
+
report.info.push(`Not installed and not needed by your settings: ${notNeeded.join(", ")}. A task that runs one of them fails and says how to get it.`);
|
|
54
|
+
}
|
|
55
|
+
const inside = check.workspaces.flatMap((workspace) => {
|
|
56
|
+
const buildDirectory = buildDirectoryInside(workspace, workspaceRoot);
|
|
57
|
+
return buildDirectory === undefined
|
|
58
|
+
? []
|
|
59
|
+
: [` ${(0, optional_tools_1.describeFolder)(workspace.root)}: ${buildDirectory}`];
|
|
60
|
+
});
|
|
61
|
+
if (inside.length > 0) {
|
|
62
|
+
report.info.push([
|
|
63
|
+
"Cargo keeps the build directory of these Cargo workspaces inside the repository:",
|
|
64
|
+
...inside,
|
|
65
|
+
`To keep it outside, as ${cachingGuide} suggests, set build.build-dir in .cargo/config.toml at the repository root or in the workspace's folder:`,
|
|
66
|
+
...exports.suggestedBuildDirSetting.map((line) => ` ${line}`),
|
|
67
|
+
"nx-rust does not write this setting.",
|
|
68
|
+
].join("\n"));
|
|
69
|
+
}
|
|
70
|
+
if (check.manifests.length === 0) {
|
|
71
|
+
report.info.push([
|
|
72
|
+
"The repository has no Cargo.toml yet. Create your first crate with",
|
|
73
|
+
" nx g @convesoft/nx-rust:library <directory>",
|
|
74
|
+
"or with `cargo new --vcs none <directory>`: nx-rust finds every crate that Cargo knows.",
|
|
75
|
+
].join("\n"));
|
|
76
|
+
}
|
|
77
|
+
return report;
|
|
78
|
+
}
|
|
79
|
+
// The build directory, if the folder that cargo writes to lies inside the
|
|
80
|
+
// repository: that folder relative to the repository root, with the path that
|
|
81
|
+
// cargo reports where symbolic links make the two differ (`folderInside`).
|
|
82
|
+
// Cargo reports it from 1.91 on.
|
|
83
|
+
function buildDirectoryInside(workspace, workspaceRoot) {
|
|
84
|
+
const directory = workspace.report.build_directory;
|
|
85
|
+
const folder = typeof directory === "string" ? (0, real_path_1.folderInside)(directory, workspaceRoot) : undefined;
|
|
86
|
+
if (folder === undefined) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
return folder.written === undefined
|
|
90
|
+
? folder.path
|
|
91
|
+
: `${folder.path} (reached through ${folder.written})`;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../../../nx-rust/src/generators/init/report.ts"],"names":[],"mappings":";;;AAoCA,gCAoEC;AAvGD,qDAAqD;AACrD,+DAMoC;AASpC,wEAAwE;AAC3D,QAAA,wBAAwB,GAAG;IACtC,SAAS;IACT,8DAA8D;CAC/D,CAAC;AAEF,MAAM,YAAY,GAChB,oGAAoG,CAAC;AAEvG;;;;;;;;GAQG;AACH,kCAAkC;AAClC,SAAgB,UAAU,CACxB,KAAiB,EACjB,aAAqB,EACrB,GAAsB,EACtB,QAAiC,8BAAa;;IAE9C,MAAM,MAAM,GAAe,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IACtD,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,MAAA,KAAK,CAAC,iBAAiB,mCAAI,EAAE,C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E,iCAAiC;AACjC,SAAS,oBAAoB,CAC3B,SAAyB,EACzB,aAAqB;IAErB,MAAM,SAAS,GAAG,SAAS,CAAC,MAAM,CAAC,eAAe,CAAC;IACnD,MAAM,MAAM,GAAG,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAA,wBAAY,EAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAClG,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,KAAK,SAAS;QACjC,CAAC,CAAC,MAAM,CAAC,IAAI;QACb,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,qBAAqB,MAAM,CAAC,OAAO,GAAG,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "NxRustInit",
|
|
4
|
+
"title": "Set up nx-rust",
|
|
5
|
+
"description": "Registers @convesoft/nx-rust in nx.json after checking that Nx can create the project graph with it, adds empty targetDefaults entries for its executors where nx.json has none, and reports missing tools and Cargo build directories inside the repository. `nx add @convesoft/nx-rust` runs it.",
|
|
6
|
+
"cli": "nx",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {}
|
|
9
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { CargoPackage } from "../cargo/metadata";
|
|
2
|
+
import type { ArtifactKind } from "./settings";
|
|
3
|
+
/** What the inference reads of a project to tell whether it produces an artifact. */
|
|
4
|
+
export interface ArtifactSubject {
|
|
5
|
+
/** The crate; absent for a workspace project without a crate. */
|
|
6
|
+
pkg?: CargoPackage;
|
|
7
|
+
/** The project's settings, of which the crate's `artifacts` replace the inference. */
|
|
8
|
+
settings?: {
|
|
9
|
+
artifacts?: readonly ArtifactKind[];
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Whether a crate produces an artifact of the kind (`DES-ARTIFACT-STEPS`):
|
|
14
|
+
* its library target has the crate type `cdylib` and it depends directly,
|
|
15
|
+
* through a normal dependency, on `napi` for a Node addon or on
|
|
16
|
+
* `wasm-bindgen` for a wasm package, also one declared for one platform
|
|
17
|
+
* only. An `artifacts` list in the crate's `[package.metadata.nx]` replaces
|
|
18
|
+
* the inference.
|
|
19
|
+
*/
|
|
20
|
+
export declare function producesArtifact(subject: ArtifactSubject, kind: ArtifactKind): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The `artifacts` of a crate's `[package.metadata.nx]` as the `cargo
|
|
23
|
+
* metadata` report gives them, for code that reads a member without its
|
|
24
|
+
* settings, such as `init`'s table of tools: the strings of the list, or
|
|
25
|
+
* `undefined` where the table names none.
|
|
26
|
+
*/
|
|
27
|
+
export declare function reportedArtifacts(pkg: CargoPackage): ArtifactKind[] | undefined;
|
|
28
|
+
/** Quotes a value for `sh`, for the commands of `runtime` inputs. */
|
|
29
|
+
export declare function shellQuote(value: string): string;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.producesArtifact = producesArtifact;
|
|
4
|
+
exports.reportedArtifacts = reportedArtifacts;
|
|
5
|
+
exports.shellQuote = shellQuote;
|
|
6
|
+
/** The package that a crate depends on directly when it produces each kind of artifact. */
|
|
7
|
+
const artifactPackages = {
|
|
8
|
+
napi: "napi",
|
|
9
|
+
wasm: "wasm-bindgen",
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Whether a crate produces an artifact of the kind (`DES-ARTIFACT-STEPS`):
|
|
13
|
+
* its library target has the crate type `cdylib` and it depends directly,
|
|
14
|
+
* through a normal dependency, on `napi` for a Node addon or on
|
|
15
|
+
* `wasm-bindgen` for a wasm package, also one declared for one platform
|
|
16
|
+
* only. An `artifacts` list in the crate's `[package.metadata.nx]` replaces
|
|
17
|
+
* the inference.
|
|
18
|
+
*/
|
|
19
|
+
// @mara implements DES-ARTIFACT-STEPS
|
|
20
|
+
function producesArtifact(subject, kind) {
|
|
21
|
+
var _a;
|
|
22
|
+
const { pkg } = subject;
|
|
23
|
+
if (pkg === undefined) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
const artifacts = (_a = subject.settings) === null || _a === void 0 ? void 0 : _a.artifacts;
|
|
27
|
+
if (artifacts !== undefined) {
|
|
28
|
+
return artifacts.includes(kind);
|
|
29
|
+
}
|
|
30
|
+
return (pkg.targets.some((target) => target.kind.includes("cdylib")) &&
|
|
31
|
+
pkg.dependencies.some((dependency) => dependency.name === artifactPackages[kind] && dependency.kind === null));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The `artifacts` of a crate's `[package.metadata.nx]` as the `cargo
|
|
35
|
+
* metadata` report gives them, for code that reads a member without its
|
|
36
|
+
* settings, such as `init`'s table of tools: the strings of the list, or
|
|
37
|
+
* `undefined` where the table names none.
|
|
38
|
+
*/
|
|
39
|
+
function reportedArtifacts(pkg) {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
const artifacts = (_b = (_a = pkg.metadata) === null || _a === void 0 ? void 0 : _a.nx) === null || _b === void 0 ? void 0 : _b.artifacts;
|
|
42
|
+
return Array.isArray(artifacts)
|
|
43
|
+
? artifacts.filter((kind) => kind === "napi" || kind === "wasm")
|
|
44
|
+
: undefined;
|
|
45
|
+
}
|
|
46
|
+
/** Quotes a value for `sh`, for the commands of `runtime` inputs. */
|
|
47
|
+
function shellQuote(value) {
|
|
48
|
+
return `'${value.split("'").join(`'"'"'`)}'`;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=artifact-kinds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact-kinds.js","sourceRoot":"","sources":["../../../../nx-rust/src/graph/artifact-kinds.ts"],"names":[],"mappings":";;AA0BA,4CAeC;AAQD,8CAK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;IACtC,OAAO,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { CargoPackage } from "../cargo/metadata";
|
|
2
|
+
import type { ReportedWorkspace } from "./discovery";
|
|
3
|
+
/**
|
|
4
|
+
* Which crates' targets the plugin leaves uncached because another crate
|
|
5
|
+
* puts a file of the same name into their artifact directory, and the
|
|
6
|
+
* warnings that say so (`DES-OUTPUTS`, "Files of one name").
|
|
7
|
+
*/
|
|
8
|
+
export interface SharedArtifactNames {
|
|
9
|
+
/** Why the plugin leaves a crate's `build` uncached, by the crate's manifest path. */
|
|
10
|
+
build: ReadonlyMap<string, string>;
|
|
11
|
+
/** Why the plugin leaves a crate's `test` uncached, by the crate's manifest path. */
|
|
12
|
+
test: ReadonlyMap<string, string>;
|
|
13
|
+
/**
|
|
14
|
+
* For each crate whose library has the file name of another crate's
|
|
15
|
+
* `cdylib`, `dylib`, proc-macro or `staticlib` file, by the crate's manifest
|
|
16
|
+
* path: the shared name and the other crates, for the message with which
|
|
17
|
+
* its `napi-build` or `wasm-build` fails before cargo runs (`DES-NAPI`,
|
|
18
|
+
* "Library names"; `DES-WASM`).
|
|
19
|
+
*/
|
|
20
|
+
libraries: ReadonlyMap<string, string>;
|
|
21
|
+
/**
|
|
22
|
+
* One warning for each file name that crates of one artifact directory
|
|
23
|
+
* share, with the manifest paths of the crates that it names, in whose
|
|
24
|
+
* projects' warnings it belongs (`DES-DIAGNOSTICS`).
|
|
25
|
+
*/
|
|
26
|
+
warnings: readonly {
|
|
27
|
+
message: string;
|
|
28
|
+
manifests: readonly string[];
|
|
29
|
+
}[];
|
|
30
|
+
}
|
|
31
|
+
/** A final artifact that a crate's target puts into the folders of its artifact directory. */
|
|
32
|
+
export interface NamedArtifact {
|
|
33
|
+
/** The file's name on Linux, such as `cli`, `libshared.so` or `libshared.a`. */
|
|
34
|
+
file: string;
|
|
35
|
+
kind: "binary" | "library";
|
|
36
|
+
/** Whether the crate's `build` declares the file as an output (`targetOutputs` in `outputs.ts`). */
|
|
37
|
+
declared: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The final artifacts that each crate puts into the folders of its
|
|
41
|
+
* artifact directory under a name of its target, not of the crate
|
|
42
|
+
* (`EVD-CARGO-ARTIFACT-WRITERS`): the executable of each binary, named
|
|
43
|
+
* after the binary; and the file of a library, `lib<name>` with each `-` as
|
|
44
|
+
* `_`, `.so` on Linux and `.dylib` on macOS for a `cdylib`, a `dylib` and a
|
|
45
|
+
* proc macro, and `.a` for a `staticlib`. Only the executables and the
|
|
46
|
+
* `cdylib` and `staticlib` files are outputs of `build`; cargo copies a
|
|
47
|
+
* `dylib` there also where it builds it as another crate's dependency, and a
|
|
48
|
+
* proc macro where a command selects its crate. A binary's name holds no
|
|
49
|
+
* `.`, which rustc refuses in a crate name, so it is never the name of a
|
|
50
|
+
* library's file. The file of a dynamic library is named here by its Linux
|
|
51
|
+
* name alone: its macOS name is shared exactly where that one is.
|
|
52
|
+
*/
|
|
53
|
+
export declare function namedArtifacts(pkg: CargoPackage): NamedArtifact[];
|
|
54
|
+
/**
|
|
55
|
+
* A file's name as a file system that ignores case and Unicode
|
|
56
|
+
* normalisation, such as macOS's default one, compares it, erring towards
|
|
57
|
+
* taking two names for one: upper case and then lower case, so that `ß`
|
|
58
|
+
* and `ss` agree, in one normal form.
|
|
59
|
+
*/
|
|
60
|
+
export declare function foldedFileName(name: string): string;
|
|
61
|
+
/**
|
|
62
|
+
* Finds the crates whose final artifacts share a file name in one artifact
|
|
63
|
+
* directory (`DES-OUTPUTS`, "Files of one name"). Cargo writes one file
|
|
64
|
+
* for them in every folder that both crates build into, that of the crate it
|
|
65
|
+
* wrote last, and warns of an output filename collision only where one
|
|
66
|
+
* call builds both (`EVD-CARGO-ARTIFACT-WRITERS`).
|
|
67
|
+
*
|
|
68
|
+
* The workspaces that share an artifact directory, as `sharers` gives them
|
|
69
|
+
* for `doc`, also through a third, are compared as one, with every member of
|
|
70
|
+
* each, those without a project too: workspaces whose artifact directory is
|
|
71
|
+
* the same folder, and those whose artifact directory lies inside
|
|
72
|
+
* another's, since a folder of a triple or a profile in one can be the
|
|
73
|
+
* other. Those of other entries of the plugin count as well. Names count as one where they differ
|
|
74
|
+
* only in case or Unicode normalisation ({@link foldedFileName}), on every
|
|
75
|
+
* host, so that the graph is the same on Linux and macOS. Triples and
|
|
76
|
+
* profiles play no part: the outputs interpolate the task's `targetTriple`
|
|
77
|
+
* and `profile` options, so that two crates of one artifact directory can
|
|
78
|
+
* always build into one folder. Two targets of one crate do not count: one
|
|
79
|
+
* command writes both, and a restore puts back what it left.
|
|
80
|
+
*
|
|
81
|
+
* Every crate that declares such a file as an output of its `build` gets
|
|
82
|
+
* that `build` left uncached, as a whole, because one cargo command writes
|
|
83
|
+
* all of its files; and so does its `test` where the file is the executable
|
|
84
|
+
* of a binary and `cargo test` builds the crate's binaries
|
|
85
|
+
* ({@link testReplacesExecutables}), because its tests run that file as
|
|
86
|
+
* `CARGO_BIN_EXE_<name>`, which another crate's command can replace first.
|
|
87
|
+
*
|
|
88
|
+
* @param directoryOf The artifact directory that a workspace's warnings name.
|
|
89
|
+
* @param repositoryRoot The repository root, against which the warnings name
|
|
90
|
+
* the crates' folders.
|
|
91
|
+
*/
|
|
92
|
+
export declare function sharedArtifactNames(workspaces: readonly ReportedWorkspace[], sharers: ReadonlyMap<ReportedWorkspace, readonly ReportedWorkspace[]>, directoryOf: (workspace: ReportedWorkspace) => string, repositoryRoot: string): SharedArtifactNames;
|
|
93
|
+
/**
|
|
94
|
+
* The workspaces that share an artifact directory, each group once: those
|
|
95
|
+
* that `sharers` links, also through a third.
|
|
96
|
+
*/
|
|
97
|
+
export declare function directoryGroups(workspaces: readonly ReportedWorkspace[], sharers: ReadonlyMap<ReportedWorkspace, readonly ReportedWorkspace[]>): ReportedWorkspace[][];
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.namedArtifacts = namedArtifacts;
|
|
4
|
+
exports.foldedFileName = foldedFileName;
|
|
5
|
+
exports.sharedArtifactNames = sharedArtifactNames;
|
|
6
|
+
exports.directoryGroups = directoryGroups;
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
|
+
const real_path_1 = require("./real-path");
|
|
9
|
+
const targets_1 = require("./targets");
|
|
10
|
+
/**
|
|
11
|
+
* The final artifacts that each crate puts into the folders of its
|
|
12
|
+
* artifact directory under a name of its target, not of the crate
|
|
13
|
+
* (`EVD-CARGO-ARTIFACT-WRITERS`): the executable of each binary, named
|
|
14
|
+
* after the binary; and the file of a library, `lib<name>` with each `-` as
|
|
15
|
+
* `_`, `.so` on Linux and `.dylib` on macOS for a `cdylib`, a `dylib` and a
|
|
16
|
+
* proc macro, and `.a` for a `staticlib`. Only the executables and the
|
|
17
|
+
* `cdylib` and `staticlib` files are outputs of `build`; cargo copies a
|
|
18
|
+
* `dylib` there also where it builds it as another crate's dependency, and a
|
|
19
|
+
* proc macro where a command selects its crate. A binary's name holds no
|
|
20
|
+
* `.`, which rustc refuses in a crate name, so it is never the name of a
|
|
21
|
+
* library's file. The file of a dynamic library is named here by its Linux
|
|
22
|
+
* name alone: its macOS name is shared exactly where that one is.
|
|
23
|
+
*/
|
|
24
|
+
function namedArtifacts(pkg) {
|
|
25
|
+
return pkg.targets.flatMap((target) => {
|
|
26
|
+
if (target.kind.includes("bin")) {
|
|
27
|
+
return [{ file: target.name, kind: "binary", declared: true }];
|
|
28
|
+
}
|
|
29
|
+
const library = `lib${target.name.replace(/-/g, "_")}`;
|
|
30
|
+
const artifacts = [];
|
|
31
|
+
if (["cdylib", "dylib", "proc-macro"].some((kind) => target.kind.includes(kind))) {
|
|
32
|
+
artifacts.push({
|
|
33
|
+
file: `${library}.so`,
|
|
34
|
+
kind: "library",
|
|
35
|
+
declared: target.kind.includes("cdylib"),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
if (target.kind.includes("staticlib")) {
|
|
39
|
+
artifacts.push({ file: `${library}.a`, kind: "library", declared: true });
|
|
40
|
+
}
|
|
41
|
+
return artifacts;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A file's name as a file system that ignores case and Unicode
|
|
46
|
+
* normalisation, such as macOS's default one, compares it, erring towards
|
|
47
|
+
* taking two names for one: upper case and then lower case, so that `ß`
|
|
48
|
+
* and `ss` agree, in one normal form.
|
|
49
|
+
*/
|
|
50
|
+
function foldedFileName(name) {
|
|
51
|
+
return name.normalize("NFD").toUpperCase().toLowerCase().normalize("NFD");
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Finds the crates whose final artifacts share a file name in one artifact
|
|
55
|
+
* directory (`DES-OUTPUTS`, "Files of one name"). Cargo writes one file
|
|
56
|
+
* for them in every folder that both crates build into, that of the crate it
|
|
57
|
+
* wrote last, and warns of an output filename collision only where one
|
|
58
|
+
* call builds both (`EVD-CARGO-ARTIFACT-WRITERS`).
|
|
59
|
+
*
|
|
60
|
+
* The workspaces that share an artifact directory, as `sharers` gives them
|
|
61
|
+
* for `doc`, also through a third, are compared as one, with every member of
|
|
62
|
+
* each, those without a project too: workspaces whose artifact directory is
|
|
63
|
+
* the same folder, and those whose artifact directory lies inside
|
|
64
|
+
* another's, since a folder of a triple or a profile in one can be the
|
|
65
|
+
* other. Those of other entries of the plugin count as well. Names count as one where they differ
|
|
66
|
+
* only in case or Unicode normalisation ({@link foldedFileName}), on every
|
|
67
|
+
* host, so that the graph is the same on Linux and macOS. Triples and
|
|
68
|
+
* profiles play no part: the outputs interpolate the task's `targetTriple`
|
|
69
|
+
* and `profile` options, so that two crates of one artifact directory can
|
|
70
|
+
* always build into one folder. Two targets of one crate do not count: one
|
|
71
|
+
* command writes both, and a restore puts back what it left.
|
|
72
|
+
*
|
|
73
|
+
* Every crate that declares such a file as an output of its `build` gets
|
|
74
|
+
* that `build` left uncached, as a whole, because one cargo command writes
|
|
75
|
+
* all of its files; and so does its `test` where the file is the executable
|
|
76
|
+
* of a binary and `cargo test` builds the crate's binaries
|
|
77
|
+
* ({@link testReplacesExecutables}), because its tests run that file as
|
|
78
|
+
* `CARGO_BIN_EXE_<name>`, which another crate's command can replace first.
|
|
79
|
+
*
|
|
80
|
+
* @param directoryOf The artifact directory that a workspace's warnings name.
|
|
81
|
+
* @param repositoryRoot The repository root, against which the warnings name
|
|
82
|
+
* the crates' folders.
|
|
83
|
+
*/
|
|
84
|
+
// @mara implements DES-OUTPUTS
|
|
85
|
+
function sharedArtifactNames(workspaces, sharers, directoryOf, repositoryRoot) {
|
|
86
|
+
var _a;
|
|
87
|
+
const build = new Map();
|
|
88
|
+
const test = new Map();
|
|
89
|
+
const libraries = new Map();
|
|
90
|
+
const warnings = [];
|
|
91
|
+
const folderOf = (pkg) => repositoryFolder((0, node_path_1.dirname)(pkg.manifest_path), repositoryRoot);
|
|
92
|
+
for (const group of directoryGroups(workspaces, sharers)) {
|
|
93
|
+
const byName = new Map();
|
|
94
|
+
for (const workspace of group) {
|
|
95
|
+
for (const pkg of workspace.report.packages) {
|
|
96
|
+
for (const artifact of namedArtifacts(pkg)) {
|
|
97
|
+
const name = foldedFileName(artifact.file);
|
|
98
|
+
byName.set(name, [...((_a = byName.get(name)) !== null && _a !== void 0 ? _a : []), Object.assign(Object.assign({}, artifact), { pkg, workspace })]);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
for (const [, writers] of [...byName].sort(([a], [b]) => compare(a, b))) {
|
|
103
|
+
const crates = uniqueCrates(writers).sort((a, b) => compare(folderOf(a), folderOf(b)));
|
|
104
|
+
if (crates.length < 2) {
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
const label = crateLabels(crates, folderOf);
|
|
108
|
+
const builds = crates.filter((pkg) => writers.some((writer) => writer.pkg === pkg && writer.declared));
|
|
109
|
+
const binary = writers[0].kind === "binary";
|
|
110
|
+
const tests = binary ? builds.filter(targets_1.testReplacesExecutables) : [];
|
|
111
|
+
if (!binary) {
|
|
112
|
+
for (const pkg of crates) {
|
|
113
|
+
add(libraries, pkg.manifest_path, sharedClause(pkg, writers, crates, folderOf));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
for (const pkg of builds) {
|
|
117
|
+
const clause = sharedClause(pkg, writers, crates, folderOf);
|
|
118
|
+
add(build, pkg.manifest_path, clause);
|
|
119
|
+
if (tests.includes(pkg)) {
|
|
120
|
+
add(test, pkg.manifest_path, clause);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
warnings.push({
|
|
124
|
+
message: sharedNameWarning({
|
|
125
|
+
crates: crates.map((pkg) => `${pkg.name} in ${folderOf(pkg)}`),
|
|
126
|
+
files: [...new Set(writers.map((writer) => writer.file))].sort(compare),
|
|
127
|
+
binary,
|
|
128
|
+
directories: [
|
|
129
|
+
...new Set(group
|
|
130
|
+
.filter((workspace) => writers.some((writer) => writer.workspace === workspace))
|
|
131
|
+
.map(directoryOf)),
|
|
132
|
+
].sort(compare),
|
|
133
|
+
builds: builds.map(label),
|
|
134
|
+
tests: tests.map(label),
|
|
135
|
+
workspaces: new Set(writers
|
|
136
|
+
.filter((writer) => crates.includes(writer.pkg))
|
|
137
|
+
.map((writer) => writer.workspace)).size,
|
|
138
|
+
}),
|
|
139
|
+
manifests: crates.map((pkg) => pkg.manifest_path),
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return {
|
|
144
|
+
build: new Map([...build].map(([manifest, clauses]) => [
|
|
145
|
+
manifest,
|
|
146
|
+
`files that its build writes can lie at the paths of files that other crates write, in the same artifact directory or in one inside the other, where cargo keeps the file that it wrote last, so that a stored result could hold another crate's file: ${clauses.join("; ")}`,
|
|
147
|
+
])),
|
|
148
|
+
test: new Map([...test].map(([manifest, clauses]) => [
|
|
149
|
+
manifest,
|
|
150
|
+
`its integration tests or benches run its executables as CARGO_BIN_EXE_<name>, which can lie at the paths of files that other crates write, in the same artifact directory or in one inside the other, so that the tests could run another crate's executable: ${clauses.join("; ")}`,
|
|
151
|
+
])),
|
|
152
|
+
libraries: new Map([...libraries].map(([manifest, clauses]) => [manifest, clauses.join("; ")])),
|
|
153
|
+
warnings,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* The workspaces that share an artifact directory, each group once: those
|
|
158
|
+
* that `sharers` links, also through a third.
|
|
159
|
+
*/
|
|
160
|
+
function directoryGroups(workspaces, sharers) {
|
|
161
|
+
var _a;
|
|
162
|
+
const seen = new Set();
|
|
163
|
+
const groups = [];
|
|
164
|
+
for (const workspace of workspaces) {
|
|
165
|
+
if (seen.has(workspace)) {
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
seen.add(workspace);
|
|
169
|
+
const group = [];
|
|
170
|
+
const queue = [workspace];
|
|
171
|
+
while (queue.length > 0) {
|
|
172
|
+
const next = queue.shift();
|
|
173
|
+
group.push(next);
|
|
174
|
+
for (const other of (_a = sharers.get(next)) !== null && _a !== void 0 ? _a : []) {
|
|
175
|
+
if (!seen.has(other)) {
|
|
176
|
+
seen.add(other);
|
|
177
|
+
queue.push(other);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
groups.push(group);
|
|
182
|
+
}
|
|
183
|
+
return groups;
|
|
184
|
+
}
|
|
185
|
+
// The crates of the writers, each once, by manifest path.
|
|
186
|
+
function uniqueCrates(writers) {
|
|
187
|
+
const crates = new Map();
|
|
188
|
+
for (const { pkg } of writers) {
|
|
189
|
+
if (!crates.has(pkg.manifest_path)) {
|
|
190
|
+
crates.set(pkg.manifest_path, pkg);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return [...crates.values()];
|
|
194
|
+
}
|
|
195
|
+
// How the warning names each crate in its list of targets: by package name,
|
|
196
|
+
// and with its folder where two crates of the list share the name.
|
|
197
|
+
function crateLabels(crates, folderOf) {
|
|
198
|
+
var _a;
|
|
199
|
+
const counts = new Map();
|
|
200
|
+
for (const pkg of crates) {
|
|
201
|
+
counts.set(pkg.name, ((_a = counts.get(pkg.name)) !== null && _a !== void 0 ? _a : 0) + 1);
|
|
202
|
+
}
|
|
203
|
+
return (pkg) => { var _a; return (((_a = counts.get(pkg.name)) !== null && _a !== void 0 ? _a : 0) > 1 ? `${pkg.name} in ${folderOf(pkg)}` : pkg.name); };
|
|
204
|
+
}
|
|
205
|
+
// The crate's files of one shared name and the other crates that write it,
|
|
206
|
+
// for the reasons in the targets' metadata.
|
|
207
|
+
function sharedClause(pkg, writers, crates, folderOf) {
|
|
208
|
+
const own = [
|
|
209
|
+
...new Set(writers.filter((writer) => writer.pkg === pkg).map((writer) => writer.file)),
|
|
210
|
+
];
|
|
211
|
+
const others = crates.filter((other) => other !== pkg);
|
|
212
|
+
return `${list(own)}, which ${list(others.map((other) => `${other.name} in ${folderOf(other)}`))} ${others.length > 1 ? "write" : "writes"} too`;
|
|
213
|
+
}
|
|
214
|
+
// The warning of `DES-DIAGNOSTICS` for one file name that crates of one
|
|
215
|
+
// artifact directory share.
|
|
216
|
+
// @mara implements DES-DIAGNOSTICS
|
|
217
|
+
function sharedNameWarning(shared) {
|
|
218
|
+
const { crates, files, binary, directories, builds, tests, workspaces } = shared;
|
|
219
|
+
const what = binary
|
|
220
|
+
? `executables called ${list(files)}`
|
|
221
|
+
: files.every((file) => file.endsWith(".so"))
|
|
222
|
+
? `library files called ${list(files)}, ${list(files.map((file) => `${file.slice(0, -3)}.dylib`))} on macOS`
|
|
223
|
+
: `library files called ${list(files)}`;
|
|
224
|
+
const oneFile = files.length > 1
|
|
225
|
+
? ", which a file system that ignores case, as macOS's does by default, takes for one file,"
|
|
226
|
+
: "";
|
|
227
|
+
const uncached = [
|
|
228
|
+
builds.length === 0
|
|
229
|
+
? undefined
|
|
230
|
+
: `The build ${builds.length > 1 ? "targets" : "target"} of ${list(builds)} ${builds.length > 1 ? "run" : "runs"} uncached`,
|
|
231
|
+
tests.length === 0
|
|
232
|
+
? undefined
|
|
233
|
+
: `${tests.length > 1 ? "so do the test targets" : "so does the test target"} of ${list(tests)}, whose integration tests or benches run that executable`,
|
|
234
|
+
]
|
|
235
|
+
.filter((part) => part !== undefined)
|
|
236
|
+
.join(", and ");
|
|
237
|
+
const where = directories.length > 1
|
|
238
|
+
? `Cargo's artifact directories ${list(directories)}, which lie one inside the other, so that the folders of a triple or a profile in one can be those of the other, and where`
|
|
239
|
+
: `Cargo's artifact directory ${list(directories)}, where`;
|
|
240
|
+
const rename = binary
|
|
241
|
+
? "give one of the binaries another name, with the name key of its [[bin]] table in Cargo.toml"
|
|
242
|
+
: "give one of the libraries another name, with the name key of its [lib] table in Cargo.toml";
|
|
243
|
+
return [
|
|
244
|
+
`nx-rust: the crates ${list(crates)} put ${what}${oneFile} into ${where} cargo keeps the file of the crate that it wrote last, so that a cached build of one crate could hold another crate's file.`,
|
|
245
|
+
`${uncached}; their other targets stay cached.`,
|
|
246
|
+
workspaces > 1
|
|
247
|
+
? `To cache them, ${rename}, or give each Cargo workspace an artifact directory of its own, none inside another, with build.target-dir in its .cargo/config.toml.`
|
|
248
|
+
: `To cache them, ${rename}.`,
|
|
249
|
+
].join(" ");
|
|
250
|
+
}
|
|
251
|
+
// A folder relative to the repository root, `.` for the root itself, also
|
|
252
|
+
// where cargo reports it through the repository's real path; absolute
|
|
253
|
+
// outside the repository.
|
|
254
|
+
function repositoryFolder(folder, repositoryRoot) {
|
|
255
|
+
for (const root of [repositoryRoot, (0, real_path_1.realPath)(repositoryRoot)]) {
|
|
256
|
+
const path = (0, node_path_1.relative)(root, folder);
|
|
257
|
+
if (!path.startsWith("..") && !(0, node_path_1.isAbsolute)(path)) {
|
|
258
|
+
return path || ".";
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return folder;
|
|
262
|
+
}
|
|
263
|
+
function add(map, key, value) {
|
|
264
|
+
var _a;
|
|
265
|
+
map.set(key, [...((_a = map.get(key)) !== null && _a !== void 0 ? _a : []), value]);
|
|
266
|
+
}
|
|
267
|
+
function list(items) {
|
|
268
|
+
var _a;
|
|
269
|
+
return items.length <= 1
|
|
270
|
+
? ((_a = items[0]) !== null && _a !== void 0 ? _a : "")
|
|
271
|
+
: `${items.slice(0, -1).join(", ")} and ${items[items.length - 1]}`;
|
|
272
|
+
}
|
|
273
|
+
function compare(a, b) {
|
|
274
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
275
|
+
}
|
|
276
|
+
//# sourceMappingURL=artifact-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifact-names.js","sourceRoot":"","sources":["../../../../nx-rust/src/graph/artifact-names.ts"],"names":[],"mappings":";;AA6DA,wCAmBC;AAQD,wCAEC;AAkCD,kDAqFC;AAMD,0CA0BC;AAjPD,yCAA0D;AAG1D,2CAAuC;AACvC,uCAAoD;AA2CpD;;;;;;;;;;;;;GAaG;AACH,SAAgB,cAAc,CAAC,GAAiB;IAC9C,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAmB,EAAE;QACrD,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAChC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;QACjE,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC;QACvD,MAAM,SAAS,GAAoB,EAAE,CAAC;QACtC,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,QA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