@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,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ACxB,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IACD,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,oBAAU,EAAC,IAAA,gBAAI,EAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACpF,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,CAAC,WAAW,EAAE,gBAAgB,EAAE,mBAAmB,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CACxE,IAAA,oBAAU,EAAC,IAAA,gBAAI,EAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CACtC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CargoGraph } from "./projects";
|
|
2
|
+
import { type OptionPlace, type TargetDefaultsContext, type TargetDefaultsInternals } from "./target-defaults-layers";
|
|
3
|
+
/** A `pluginVersion` on an inferred target that the plugin did not give it. */
|
|
4
|
+
export interface StrayPluginVersion extends OptionPlace {
|
|
5
|
+
/** The project's name in the merged graph. */
|
|
6
|
+
projectName: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Fails graph creation where {@link strayPluginVersions} finds a value, with
|
|
10
|
+
* one paragraph per place it comes from: the `project.json` or `package.json`
|
|
11
|
+
* in the project's folder or the `targetDefaults` entry, where the layers
|
|
12
|
+
* that the plugin rebuilds with Nx's own code show it ({@link optionOrigins}),
|
|
13
|
+
* and otherwise the command that shows Nx's own record.
|
|
14
|
+
*
|
|
15
|
+
* @param plugin Nx's copy of the plugin for the entry, whose `name` Nx set
|
|
16
|
+
* to the name it knows the entry by.
|
|
17
|
+
* @param loadInternals Loads Nx's internal parts, only when a value is found.
|
|
18
|
+
* @throws {Error} Naming each place, target and project.
|
|
19
|
+
*/
|
|
20
|
+
export declare function failOnPluginVersionOption(graph: CargoGraph, context: TargetDefaultsContext, plugin: unknown, loadInternals?: () => TargetDefaultsInternals): Promise<void>;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.failOnPluginVersionOption = failOnPluginVersionOption;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const node_util_1 = require("node:util");
|
|
6
|
+
const command_1 = require("../executors/command");
|
|
7
|
+
const target_defaults_layers_1 = require("./target-defaults-layers");
|
|
8
|
+
const target_defaults_report_1 = require("./target-defaults-report");
|
|
9
|
+
const targets_1 = require("./targets");
|
|
10
|
+
/**
|
|
11
|
+
* The places where, once Nx has merged `targetDefaults`, `project.json` and
|
|
12
|
+
* `package.json` over the plugin's projects, an inferred target that still
|
|
13
|
+
* runs the plugin's executor holds a `pluginVersion` that the plugin did not
|
|
14
|
+
* give it (`DES-PLUGIN-OPTIONS`): among its options a value other than the
|
|
15
|
+
* plugin's, also where the plugin set none because Nx has a node for its
|
|
16
|
+
* package, and any value in one of its configurations.
|
|
17
|
+
*
|
|
18
|
+
* @param projects The merged projects that `createDependencies` receives.
|
|
19
|
+
*/
|
|
20
|
+
function strayPluginVersions(graph, projects) {
|
|
21
|
+
var _a, _b, _c, _d;
|
|
22
|
+
const byRoot = new Map(Object.entries(projects).map(([name, project]) => [project.root, { name, project }]));
|
|
23
|
+
const stray = [];
|
|
24
|
+
for (const own of graph.projects) {
|
|
25
|
+
const merged = byRoot.get(own.root);
|
|
26
|
+
if (merged === undefined) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
for (const [target, inferred] of Object.entries(own.targets)) {
|
|
30
|
+
const configuration = (_a = merged.project.targets) === null || _a === void 0 ? void 0 : _a[target];
|
|
31
|
+
if (configuration === undefined ||
|
|
32
|
+
((_b = inferred.metadata) === null || _b === void 0 ? void 0 : _b[targets_1.targetCargoMetadataKey]) === undefined ||
|
|
33
|
+
configuration.executor !== inferred.executor) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
const place = { project: own, projectName: merged.name, target, option: command_1.pluginVersionOption };
|
|
37
|
+
if (differs(configuration.options, inferred.options)) {
|
|
38
|
+
stray.push(place);
|
|
39
|
+
}
|
|
40
|
+
for (const [name, values] of Object.entries((_c = configuration.configurations) !== null && _c !== void 0 ? _c : {})) {
|
|
41
|
+
if (differs(values, (_d = inferred.configurations) === null || _d === void 0 ? void 0 : _d[name])) {
|
|
42
|
+
stray.push(Object.assign(Object.assign({}, place), { configuration: name }));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return stray;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Fails graph creation where {@link strayPluginVersions} finds a value, with
|
|
51
|
+
* one paragraph per place it comes from: the `project.json` or `package.json`
|
|
52
|
+
* in the project's folder or the `targetDefaults` entry, where the layers
|
|
53
|
+
* that the plugin rebuilds with Nx's own code show it ({@link optionOrigins}),
|
|
54
|
+
* and otherwise the command that shows Nx's own record.
|
|
55
|
+
*
|
|
56
|
+
* @param plugin Nx's copy of the plugin for the entry, whose `name` Nx set
|
|
57
|
+
* to the name it knows the entry by.
|
|
58
|
+
* @param loadInternals Loads Nx's internal parts, only when a value is found.
|
|
59
|
+
* @throws {Error} Naming each place, target and project.
|
|
60
|
+
*/
|
|
61
|
+
// @mara implements DES-PLUGIN-OPTIONS
|
|
62
|
+
function failOnPluginVersionOption(graph_1, context_1, plugin_1) {
|
|
63
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (graph, context, plugin, loadInternals = () => (0, target_defaults_layers_1.loadTargetDefaultsInternals)(context.workspaceRoot)) {
|
|
64
|
+
const stray = strayPluginVersions(graph, context.projects);
|
|
65
|
+
if (stray.length === 0) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const origins = yield (0, target_defaults_layers_1.optionOrigins)(stray, context, (0, target_defaults_layers_1.pluginEntryName)(plugin), loadInternals());
|
|
69
|
+
throw new Error(describeStrayPluginVersions(stray, origins));
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
const reason = "Only nx-rust sets this option: it carries the plugin's version into the cache key, and another value would take its place, so that Nx could restore results of another version of the plugin.";
|
|
73
|
+
/**
|
|
74
|
+
* The message for {@link failOnPluginVersionOption}: one paragraph per
|
|
75
|
+
* origin, listing the targets it reaches by project, and one paragraph for
|
|
76
|
+
* the targets whose origin the plugin cannot tell.
|
|
77
|
+
*
|
|
78
|
+
* @param origins The origin of each value, in the order of `stray`.
|
|
79
|
+
*/
|
|
80
|
+
function describeStrayPluginVersions(stray, origins) {
|
|
81
|
+
var _a, _b;
|
|
82
|
+
const groups = new Map();
|
|
83
|
+
stray.forEach((place, index) => {
|
|
84
|
+
var _a;
|
|
85
|
+
const origin = origins[index];
|
|
86
|
+
const id = origin === undefined ? "" : JSON.stringify(origin);
|
|
87
|
+
const group = (_a = groups.get(id)) !== null && _a !== void 0 ? _a : { origin, places: [] };
|
|
88
|
+
group.places.push(place);
|
|
89
|
+
groups.set(id, group);
|
|
90
|
+
});
|
|
91
|
+
const known = [...groups.values()]
|
|
92
|
+
.filter((group) => Boolean(group.origin))
|
|
93
|
+
.map(({ origin, places }) => ({ name: originName(origin), places }))
|
|
94
|
+
.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0))
|
|
95
|
+
.map(({ name, places }) => [
|
|
96
|
+
`${name} sets the option "pluginVersion" on targets that nx-rust infers. ${reason} Remove it there. It reaches:`,
|
|
97
|
+
...byProject(places),
|
|
98
|
+
].join("\n"));
|
|
99
|
+
const unknown = (_b = (_a = groups.get("")) === null || _a === void 0 ? void 0 : _a.places) !== null && _b !== void 0 ? _b : [];
|
|
100
|
+
return [
|
|
101
|
+
...known,
|
|
102
|
+
...(unknown.length === 0
|
|
103
|
+
? []
|
|
104
|
+
: [
|
|
105
|
+
[
|
|
106
|
+
`These targets that nx-rust infers have the option "pluginVersion", and nx-rust cannot tell which configuration sets it, such as another plugin listed in nx.json. ${reason} For each, run the command given, look under "sourceMap" for the file and entry, and remove it there:`,
|
|
107
|
+
...unknown.map((place) => ` - ${targetName(place)} of ${projectName(place)}: \`nx show target ${place.projectName}:${place.target} --json\``),
|
|
108
|
+
].join("\n"),
|
|
109
|
+
]),
|
|
110
|
+
].join("\n\n");
|
|
111
|
+
}
|
|
112
|
+
// Whether `merged` holds a pluginVersion other than the one in `own`, which
|
|
113
|
+
// is what the plugin set at that place, if anything.
|
|
114
|
+
function differs(merged, own) {
|
|
115
|
+
return (merged !== undefined &&
|
|
116
|
+
merged !== null &&
|
|
117
|
+
Object.prototype.hasOwnProperty.call(merged, command_1.pluginVersionOption) &&
|
|
118
|
+
!(0, node_util_1.isDeepStrictEqual)(merged[command_1.pluginVersionOption], own === null || own === void 0 ? void 0 : own[command_1.pluginVersionOption]));
|
|
119
|
+
}
|
|
120
|
+
function originName(origin) {
|
|
121
|
+
if ("file" in origin) {
|
|
122
|
+
return `The file ${origin.file}`;
|
|
123
|
+
}
|
|
124
|
+
const name = (0, target_defaults_report_1.entryName)(origin);
|
|
125
|
+
return `${name.charAt(0).toUpperCase()}${name.slice(1)}`;
|
|
126
|
+
}
|
|
127
|
+
// `"test"`, or `"test" (configuration "ci")`.
|
|
128
|
+
function targetName({ target, configuration }) {
|
|
129
|
+
return configuration === undefined
|
|
130
|
+
? `"${target}"`
|
|
131
|
+
: `"${target}" (configuration "${configuration}")`;
|
|
132
|
+
}
|
|
133
|
+
// `api (rust/crates/api/Cargo.toml)`
|
|
134
|
+
function projectName({ projectName, project }) {
|
|
135
|
+
return `${projectName} (${project.manifest})`;
|
|
136
|
+
}
|
|
137
|
+
// One line per project, in the order found, that names its targets.
|
|
138
|
+
function byProject(places) {
|
|
139
|
+
var _a;
|
|
140
|
+
const projects = new Map();
|
|
141
|
+
for (const place of places) {
|
|
142
|
+
const id = projectName(place);
|
|
143
|
+
projects.set(id, [...((_a = projects.get(id)) !== null && _a !== void 0 ? _a : []), targetName(place)]);
|
|
144
|
+
}
|
|
145
|
+
return [...projects].map(([project, targets]) => ` - ${project}: ${list(targets)}`);
|
|
146
|
+
}
|
|
147
|
+
// "a", "a and b", "a, b and c"
|
|
148
|
+
function list(items) {
|
|
149
|
+
return items.length <= 1
|
|
150
|
+
? items.join("")
|
|
151
|
+
: `${items.slice(0, -1).join(", ")} and ${items[items.length - 1]}`;
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=plugin-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-version.js","sourceRoot":"","sources":["../../../../nx-rust/src/graph/plugin-version.ts"],"names":[],"mappings":";;AAiFA,8DAaC;;AA7FD,yCAA8C;AAC9C,kDAA2D;AAE3D,qEAQkC;AAClC,qEAAqD;AACrD,uCAAmD;AAQnD;;;;;;;;;GASG;AACH,SAAS,mBAAmB,CAC1B,KAAiB,EACjB,QAA+C;;IAE/C,MAAM,MAAM,GAAG,IAAI,GAAG,CACpB,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,CACrF,CAAC;IACF,MAAM,KAAK,GAAyB,EAAE,CAAC;IACvC,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,SAAS;QACX,CAAC;QACD,KAAK,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7D,MAAM,aAAa,GAAG,MAAA,MAAM,CAAC,OAAO,CAAC,OAAO,0CAAG,MA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E,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,OAAO,KAAK,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AACvF,CAAC;AAED,+BAA+B;AAC/B,SAAS,IAAI,CAAC,KAAwB;IACpC,OAAO,KAAK,CAAC,MAAM,IAAI,CAAC;QACtB,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QAChB,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { CreateNodesResultArray, TargetConfiguration } from "@nx/devkit";
|
|
2
|
+
import type { CargoPackage } from "../cargo/metadata";
|
|
3
|
+
import { CacheContext } from "./caching";
|
|
4
|
+
import type { CargoDiscovery, CargoWorkspace } from "./discovery";
|
|
5
|
+
import { DeclaredPattern } from "./declared-files";
|
|
6
|
+
import { Input } from "./inputs";
|
|
7
|
+
import type { GraphSettings, ProjectSettings } from "./settings";
|
|
8
|
+
import type { WorkspaceStrategy } from "./unification";
|
|
9
|
+
/**
|
|
10
|
+
* A project that the plugin creates: a crate, or the workspace project of a
|
|
11
|
+
* workspace whose root manifest defines no crate.
|
|
12
|
+
*
|
|
13
|
+
* Commands address a crate by {@link CargoProject.pkg}'s real name and by
|
|
14
|
+
* {@link CargoProject.manifest}, never by {@link CargoProject.name}, which a
|
|
15
|
+
* user can override and Nx can replace.
|
|
16
|
+
*/
|
|
17
|
+
export interface CargoProject {
|
|
18
|
+
/**
|
|
19
|
+
* The name the plugin gives the project ({@link projectName}). Where the
|
|
20
|
+
* folder also is a JS project, Nx names the project after its
|
|
21
|
+
* `package.json` or `project.json` instead, so the graph is searched by
|
|
22
|
+
* {@link CargoProject.root}, not by this name.
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
/** The project's folder, relative to the repository root: `.` for the root itself. */
|
|
26
|
+
root: string;
|
|
27
|
+
/**
|
|
28
|
+
* The manifest the project comes from, relative to the repository root:
|
|
29
|
+
* the crate's own, or the workspace's root manifest for a workspace
|
|
30
|
+
* project without a crate.
|
|
31
|
+
*/
|
|
32
|
+
manifest: string;
|
|
33
|
+
/** The workspace the project belongs to, in whose root folder its cargo commands run. */
|
|
34
|
+
workspace: CargoWorkspace;
|
|
35
|
+
/** The crate, with its real package name; absent for a workspace project without a crate. */
|
|
36
|
+
pkg?: CargoPackage;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the project hosts the workspace's own tasks and depends on every
|
|
39
|
+
* member: the workspace project, or the crate of a root manifest that
|
|
40
|
+
* defines one, as for a standalone crate.
|
|
41
|
+
*/
|
|
42
|
+
isWorkspaceProject: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* The inferred targets, under the names that `targetNames` gives them,
|
|
45
|
+
* with the target tables of the metadata tables laid over them.
|
|
46
|
+
*/
|
|
47
|
+
targets: Record<string, TargetConfiguration>;
|
|
48
|
+
/** What the plugin options and the metadata tables give the project. */
|
|
49
|
+
settings: ProjectSettings;
|
|
50
|
+
/**
|
|
51
|
+
* The project's named inputs, which its targets and its dependents hash
|
|
52
|
+
* (`DES-INPUTS`), and, once {@link withWarningsInputs} has added it, the
|
|
53
|
+
* one that holds the digest of its warnings where it has any
|
|
54
|
+
* (`warningsInput` in `warnings.ts`).
|
|
55
|
+
*/
|
|
56
|
+
namedInputs: Record<string, Input[]>;
|
|
57
|
+
/**
|
|
58
|
+
* The warnings found while creating the graph that concern the project,
|
|
59
|
+
* which the executor prints again at the start of each of its tasks, and
|
|
60
|
+
* which the project's keys hold through a digest (`DES-DIAGNOSTICS`).
|
|
61
|
+
*/
|
|
62
|
+
warnings: string[];
|
|
63
|
+
/** Its own `fileInputs` patterns, as resolved (`declaredFiles` in `declared-files.ts`). */
|
|
64
|
+
declaredPatterns: DeclaredPattern[];
|
|
65
|
+
/**
|
|
66
|
+
* The feature-unification strategy of its workspace, which the executor
|
|
67
|
+
* reads from the project's metadata (`cargoMetadata` in `collisions.ts`);
|
|
68
|
+
* absent where it is `workspace-build` without being checked.
|
|
69
|
+
*/
|
|
70
|
+
strategy?: WorkspaceStrategy;
|
|
71
|
+
}
|
|
72
|
+
/** What one `createNodes` call of a plugin entry found, kept for its `createDependencies`. */
|
|
73
|
+
export interface CargoGraph {
|
|
74
|
+
discovery: CargoDiscovery;
|
|
75
|
+
projects: CargoProject[];
|
|
76
|
+
/**
|
|
77
|
+
* The `fileInputs` patterns of the projects and of the crates whose
|
|
78
|
+
* folders their inputs name, as resolved, which `createDependencies`
|
|
79
|
+
* checks against the projects of every plugin
|
|
80
|
+
* (`failOnUncoveredProjectFolders` in `declared-files.ts`); absent in a
|
|
81
|
+
* graph of discovery alone.
|
|
82
|
+
*/
|
|
83
|
+
declaredPatterns?: DeclaredPattern[];
|
|
84
|
+
/**
|
|
85
|
+
* The feature-unification strategy of each workspace, by its root folder
|
|
86
|
+
* (`workspaceStrategies` in `unification.ts`); absent in a graph of
|
|
87
|
+
* discovery alone.
|
|
88
|
+
*/
|
|
89
|
+
strategies?: ReadonlyMap<string, WorkspaceStrategy>;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The projects for the workspaces that discovery found: one per member whose
|
|
93
|
+
* manifest Nx handed to the plugin, rooted at the crate, and one workspace
|
|
94
|
+
* project per workspace whose root manifest defines no crate and was handed
|
|
95
|
+
* to the plugin, rooted at the workspace folder. Where the root manifest
|
|
96
|
+
* defines a crate, that crate's project has the workspace project's role.
|
|
97
|
+
* Each has the targets of its shape (`inferTargets` in `targets.ts`), with
|
|
98
|
+
* the target tables of its settings laid over them (`applyTargetTables` in
|
|
99
|
+
* `target-tables.ts`), and is named by its settings.
|
|
100
|
+
*
|
|
101
|
+
* Two of them may get one name: whether they keep it is known only once Nx
|
|
102
|
+
* has applied `package.json` and `project.json`, so `createDependencies`
|
|
103
|
+
* checks it (`failOnNameCollisions` in `collisions.ts`).
|
|
104
|
+
*
|
|
105
|
+
* @param settings The settings of the plugin options and metadata tables (`readSettings` in `settings.ts`).
|
|
106
|
+
* @param context What the caching of the projects shares (`cacheContext` in `caching.ts`).
|
|
107
|
+
* @throws {Error} Naming every `fileInputs` pattern that Nx cannot hash, of
|
|
108
|
+
* the projects and of the crates whose folders their inputs name
|
|
109
|
+
* (`declaredFiles` in `declared-files.ts`); when `targetNames` gives two targets of one
|
|
110
|
+
* project the same name, or a target table breaks a rule of
|
|
111
|
+
* `applyTargetTables`.
|
|
112
|
+
*/
|
|
113
|
+
export declare function inferProjects(discovery: CargoDiscovery, settings: GraphSettings, context: CacheContext): CargoProject[];
|
|
114
|
+
/**
|
|
115
|
+
* The projects, each with the named input that holds the digest of its
|
|
116
|
+
* warnings and of the `targetDefaults` causes of the warnings that only
|
|
117
|
+
* `createDependencies` finds, where it has any (`DES-DIAGNOSTICS`,
|
|
118
|
+
* "Warnings where they are seen").
|
|
119
|
+
*
|
|
120
|
+
* @param repositoryRoot The absolute path of the repository root.
|
|
121
|
+
* @param causes By project root (`targetDefaultCauses` in `target-defaults.ts`).
|
|
122
|
+
*/
|
|
123
|
+
export declare function withWarningsInputs(projects: readonly CargoProject[], repositoryRoot: string, causes: ReadonlyMap<string, readonly string[]>): CargoProject[];
|
|
124
|
+
/**
|
|
125
|
+
* The module that Nx release loads as a crate's version actions
|
|
126
|
+
* (`DES-RELEASE`, "Registration"), named through the plugin's package, so
|
|
127
|
+
* that Nx resolves it from the repository root and every checkout gives the
|
|
128
|
+
* project the same configuration.
|
|
129
|
+
*/
|
|
130
|
+
export declare const versionActionsModule = "@convesoft/nx-rust/src/release/version-actions";
|
|
131
|
+
/**
|
|
132
|
+
* The result of `createNodes` for the projects: each project under the
|
|
133
|
+
* manifest it comes from, with its name, its tags, its implicit
|
|
134
|
+
* dependencies, its named inputs, its targets, for a crate the version
|
|
135
|
+
* actions that Nx release runs for it, and, in its metadata, what
|
|
136
|
+
* another entry of the plugin needs to recognise it ({@link cargoMetadata})
|
|
137
|
+
* and the warnings that concern it, among them, apart from the others, those
|
|
138
|
+
* about its workspace's Cargo configuration that Nx does not hash, which stay
|
|
139
|
+
* out of every key, as project metadata does (`EVD-NX-24-WARNING-CHANNELS`).
|
|
140
|
+
*/
|
|
141
|
+
export declare function projectNodes(projects: readonly CargoProject[]): CreateNodesResultArray;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.versionActionsModule = void 0;
|
|
4
|
+
exports.inferProjects = inferProjects;
|
|
5
|
+
exports.withWarningsInputs = withWarningsInputs;
|
|
6
|
+
exports.projectNodes = projectNodes;
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
|
+
const caching_1 = require("./caching");
|
|
9
|
+
const collisions_1 = require("./collisions");
|
|
10
|
+
const declared_files_1 = require("./declared-files");
|
|
11
|
+
const inputs_1 = require("./inputs");
|
|
12
|
+
const names_1 = require("./names");
|
|
13
|
+
const plugin_package_1 = require("./plugin-package");
|
|
14
|
+
const target_tables_1 = require("./target-tables");
|
|
15
|
+
const targets_1 = require("./targets");
|
|
16
|
+
const warnings_1 = require("./warnings");
|
|
17
|
+
/**
|
|
18
|
+
* The projects for the workspaces that discovery found: one per member whose
|
|
19
|
+
* manifest Nx handed to the plugin, rooted at the crate, and one workspace
|
|
20
|
+
* project per workspace whose root manifest defines no crate and was handed
|
|
21
|
+
* to the plugin, rooted at the workspace folder. Where the root manifest
|
|
22
|
+
* defines a crate, that crate's project has the workspace project's role.
|
|
23
|
+
* Each has the targets of its shape (`inferTargets` in `targets.ts`), with
|
|
24
|
+
* the target tables of its settings laid over them (`applyTargetTables` in
|
|
25
|
+
* `target-tables.ts`), and is named by its settings.
|
|
26
|
+
*
|
|
27
|
+
* Two of them may get one name: whether they keep it is known only once Nx
|
|
28
|
+
* has applied `package.json` and `project.json`, so `createDependencies`
|
|
29
|
+
* checks it (`failOnNameCollisions` in `collisions.ts`).
|
|
30
|
+
*
|
|
31
|
+
* @param settings The settings of the plugin options and metadata tables (`readSettings` in `settings.ts`).
|
|
32
|
+
* @param context What the caching of the projects shares (`cacheContext` in `caching.ts`).
|
|
33
|
+
* @throws {Error} Naming every `fileInputs` pattern that Nx cannot hash, of
|
|
34
|
+
* the projects and of the crates whose folders their inputs name
|
|
35
|
+
* (`declaredFiles` in `declared-files.ts`); when `targetNames` gives two targets of one
|
|
36
|
+
* project the same name, or a target table breaks a rule of
|
|
37
|
+
* `applyTargetTables`.
|
|
38
|
+
*/
|
|
39
|
+
// @mara implements DES-PROJECT-GRAPH
|
|
40
|
+
function inferProjects(discovery, settings, context) {
|
|
41
|
+
const projects = [];
|
|
42
|
+
const strategyOf = (workspace) => { var _a; return (_a = context.strategies) === null || _a === void 0 ? void 0 : _a.get(workspace.root); };
|
|
43
|
+
for (const workspace of discovery.workspaces) {
|
|
44
|
+
const rootManifest = (0, node_path_1.join)(workspace.report.workspace_root, "Cargo.toml");
|
|
45
|
+
for (const pkg of workspace.members) {
|
|
46
|
+
const own = settings.crate(pkg);
|
|
47
|
+
projects.push(Object.assign({ name: (0, names_1.projectName)({
|
|
48
|
+
kind: "crate",
|
|
49
|
+
pkg,
|
|
50
|
+
workspace,
|
|
51
|
+
name: own.name,
|
|
52
|
+
namePrefix: own.workspace.namePrefix,
|
|
53
|
+
}), root: (0, node_path_1.relative)(discovery.workspaceRoot, (0, node_path_1.dirname)(pkg.manifest_path)) || ".", manifest: (0, node_path_1.relative)(discovery.workspaceRoot, pkg.manifest_path), workspace,
|
|
54
|
+
pkg, isWorkspaceProject: pkg.manifest_path === rootManifest, settings: own }, withStrategy(strategyOf(workspace))));
|
|
55
|
+
}
|
|
56
|
+
const rootIsCrate = workspace.report.packages.some((pkg) => pkg.manifest_path === rootManifest);
|
|
57
|
+
if (!rootIsCrate && workspace.rootManifestHanded) {
|
|
58
|
+
const own = settings.workspaceProject(workspace);
|
|
59
|
+
projects.push(Object.assign({ name: (0, names_1.projectName)({ kind: "workspace", workspace, name: own.name }), root: workspace.root, manifest: workspace.rootManifest, workspace, isWorkspaceProject: true, settings: own }, withStrategy(strategyOf(workspace))));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const projectRoots = (0, declared_files_1.pluginProjectRoots)(discovery);
|
|
63
|
+
const cargoDirectories = (0, declared_files_1.knownCargoDirectories)(discovery);
|
|
64
|
+
const declared = new Map(projects.map((project) => {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
return [
|
|
67
|
+
project,
|
|
68
|
+
(0, declared_files_1.declaredFiles)(project.settings.fileInputs, project.workspace, discovery.workspaceRoot, {
|
|
69
|
+
crate: (_b = (_a = project.pkg) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : project.name,
|
|
70
|
+
projectRoots,
|
|
71
|
+
cargoDirectories,
|
|
72
|
+
}),
|
|
73
|
+
];
|
|
74
|
+
}));
|
|
75
|
+
const problems = new Set([
|
|
76
|
+
...context.declaredFileProblems,
|
|
77
|
+
...[...declared.values()].flatMap((files) => files.problems),
|
|
78
|
+
]);
|
|
79
|
+
if (problems.size > 0) {
|
|
80
|
+
throw new Error([...problems].join("\n"));
|
|
81
|
+
}
|
|
82
|
+
const fileInputs = (project) => { var _a, _b; return (_b = (_a = declared.get(project)) === null || _a === void 0 ? void 0 : _a.filesets) !== null && _b !== void 0 ? _b : []; };
|
|
83
|
+
const named = (0, targets_1.nameTargets)(projects.map((project) => {
|
|
84
|
+
var _a, _b;
|
|
85
|
+
return ({
|
|
86
|
+
project,
|
|
87
|
+
targets: (0, targets_1.inferTargets)(project, context, settings.options.locked, {
|
|
88
|
+
settings: inputSettings(project.settings, fileInputs(project), project.strategy),
|
|
89
|
+
targetTables: (target) => { var _a; return targetTables(project.settings, (_a = settings.options.targetNames[target]) !== null && _a !== void 0 ? _a : target); },
|
|
90
|
+
lockfileTarget: (_a = settings.options.targetNames.lockfile) !== null && _a !== void 0 ? _a : "lockfile",
|
|
91
|
+
hakariCheckTarget: (_b = settings.options.targetNames["hakari-check"]) !== null && _b !== void 0 ? _b : "hakari-check",
|
|
92
|
+
}, settings.options.targetNames),
|
|
93
|
+
});
|
|
94
|
+
}), settings.options.targetNames);
|
|
95
|
+
const targets = (0, target_tables_1.applyTargetTables)(projects.map((project, index) => ({ project, targets: named[index] })), discovery.workspaceRoot, settings.options.targetNames);
|
|
96
|
+
return projects.map((project, index) => {
|
|
97
|
+
var _a, _b;
|
|
98
|
+
return (Object.assign(Object.assign({}, project), { targets: targets[index], namedInputs: (0, inputs_1.namedInputs)(project, context, inputSettings(project.settings, fileInputs(project), project.strategy)), warnings: (0, caching_1.projectWarnings)(project, context), declaredPatterns: (_b = (_a = declared.get(project)) === null || _a === void 0 ? void 0 : _a.patterns) !== null && _b !== void 0 ? _b : [] }));
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The projects, each with the named input that holds the digest of its
|
|
103
|
+
* warnings and of the `targetDefaults` causes of the warnings that only
|
|
104
|
+
* `createDependencies` finds, where it has any (`DES-DIAGNOSTICS`,
|
|
105
|
+
* "Warnings where they are seen").
|
|
106
|
+
*
|
|
107
|
+
* @param repositoryRoot The absolute path of the repository root.
|
|
108
|
+
* @param causes By project root (`targetDefaultCauses` in `target-defaults.ts`).
|
|
109
|
+
*/
|
|
110
|
+
function withWarningsInputs(projects, repositoryRoot, causes) {
|
|
111
|
+
return projects.map((project) => (Object.assign(Object.assign({}, project), { namedInputs: Object.assign(Object.assign({}, project.namedInputs), (0, warnings_1.warningsInput)(project.warnings, repositoryRoot, causes.get(project.root))) })));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The settings that change a project's inputs: the variables and commands
|
|
115
|
+
* that the plugin options and the metadata tables add, the filesets for the
|
|
116
|
+
* patterns of `fileInputs` in both tables (`DES-PLUGIN-OPTIONS`, "Added
|
|
117
|
+
* inputs"), the workspace's test runner, and the feature-unification
|
|
118
|
+
* strategy that its workspace uses, with the files of cargo-hakari under
|
|
119
|
+
* `hakari` (`DES-INPUTS`, "Hack crate").
|
|
120
|
+
*
|
|
121
|
+
* @param fileInputs The filesets of `declaredFiles` in `declared-files.ts`.
|
|
122
|
+
* @param strategy The workspace's strategy; `workspace-build` where absent.
|
|
123
|
+
*/
|
|
124
|
+
function inputSettings(settings, fileInputs, strategy) {
|
|
125
|
+
var _a;
|
|
126
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({ featureUnification: (_a = strategy === null || strategy === void 0 ? void 0 : strategy.featureUnification) !== null && _a !== void 0 ? _a : "workspace-build" }, ((strategy === null || strategy === void 0 ? void 0 : strategy.hakari) === undefined
|
|
127
|
+
? {}
|
|
128
|
+
: {
|
|
129
|
+
hakari: {
|
|
130
|
+
configFile: strategy.hakari.configFile,
|
|
131
|
+
hackManifest: strategy.hakari.hackManifest,
|
|
132
|
+
},
|
|
133
|
+
})), { testRunner: settings.workspace.testRunner }), (settings.workspace.affectedTests ? { affectedTests: true } : {})), { added: { envInputs: settings.envInputs, runtimeInputs: settings.runtimeInputs, fileInputs } });
|
|
134
|
+
}
|
|
135
|
+
// The strategy of a project's workspace, where it is one that was checked or set.
|
|
136
|
+
function withStrategy(strategy) {
|
|
137
|
+
return strategy === undefined ? {} : { strategy };
|
|
138
|
+
}
|
|
139
|
+
// The target tables of the project for the target of this final name, in
|
|
140
|
+
// the order in which they are laid over it.
|
|
141
|
+
function targetTables(settings, name) {
|
|
142
|
+
return settings.targets.filter((table) => table.name === name).map((table) => table.target);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* The module that Nx release loads as a crate's version actions
|
|
146
|
+
* (`DES-RELEASE`, "Registration"), named through the plugin's package, so
|
|
147
|
+
* that Nx resolves it from the repository root and every checkout gives the
|
|
148
|
+
* project the same configuration.
|
|
149
|
+
*/
|
|
150
|
+
exports.versionActionsModule = `${plugin_package_1.pluginPackageName}/src/release/version-actions`;
|
|
151
|
+
/**
|
|
152
|
+
* The result of `createNodes` for the projects: each project under the
|
|
153
|
+
* manifest it comes from, with its name, its tags, its implicit
|
|
154
|
+
* dependencies, its named inputs, its targets, for a crate the version
|
|
155
|
+
* actions that Nx release runs for it, and, in its metadata, what
|
|
156
|
+
* another entry of the plugin needs to recognise it ({@link cargoMetadata})
|
|
157
|
+
* and the warnings that concern it, among them, apart from the others, those
|
|
158
|
+
* about its workspace's Cargo configuration that Nx does not hash, which stay
|
|
159
|
+
* out of every key, as project metadata does (`EVD-NX-24-WARNING-CHANNELS`).
|
|
160
|
+
*/
|
|
161
|
+
// @mara implements DES-RELEASE
|
|
162
|
+
function projectNodes(projects) {
|
|
163
|
+
return projects.map((project) => {
|
|
164
|
+
return [
|
|
165
|
+
project.manifest,
|
|
166
|
+
{
|
|
167
|
+
projects: {
|
|
168
|
+
[project.root]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ name: project.name }, (project.settings.tags.length > 0 ? { tags: [...project.settings.tags] } : {})), (project.settings.implicitDependencies.length > 0
|
|
169
|
+
? { implicitDependencies: [...project.settings.implicitDependencies] }
|
|
170
|
+
: {})), { namedInputs: project.namedInputs, targets: project.targets }), (project.pkg === undefined
|
|
171
|
+
? {}
|
|
172
|
+
: { release: { version: { versionActions: exports.versionActionsModule } } })), { metadata: {
|
|
173
|
+
[collisions_1.cargoMetadataKey]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0, collisions_1.cargoMetadata)(project)), (project.warnings.length > 0 ? { warnings: project.warnings } : {})), (project.workspace.configurationWarnings.length > 0
|
|
174
|
+
? { configurationWarnings: project.workspace.configurationWarnings }
|
|
175
|
+
: {})), formattingWarnings(project)),
|
|
176
|
+
} }),
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
];
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
// The warning about a rustfmt configuration file outside the repository
|
|
183
|
+
// that rustfmt takes for the project's crate, which its `fmt-check` and
|
|
184
|
+
// `fmt` tasks print and no key holds, as `formattingWarnings` of the
|
|
185
|
+
// project's metadata, or nothing.
|
|
186
|
+
function formattingWarnings(project) {
|
|
187
|
+
var _a;
|
|
188
|
+
const warning = project.pkg === undefined
|
|
189
|
+
? undefined
|
|
190
|
+
: (_a = project.workspace.formattingWarnings) === null || _a === void 0 ? void 0 : _a.get(project.pkg.manifest_path);
|
|
191
|
+
return warning === undefined ? {} : { formattingWarnings: [warning] };
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=projects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../../../nx-rust/src/graph/projects.ts"],"names":[],"mappings":";;;AAgIA,sCAoGC;AAWD,gDAYC;AAgED,oCAgCC;AA1VD,yCAAoD;AAEpD,uCAA0D;AAC1D,6CAA+D;AAE/D,qDAK0B;AAC1B,qCAA8E;AAC9E,mCAAsC;AACtC,qDAAqD;AAErD,mDAAoD;AACpD,uCAAsD;AAEtD,yCAA2C;AAsF3C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qCAAqC;AACrC,SAAgB,aAAa,CAC3B,SAAyB,EACzB,QAAuB,EACvB,OAAqB;IAErB,MAAM,QAAQ,GAGR,EAAE,CAAC;IACT,MAAM,UAAU,GAAG,CAAC,SAAyB,EAAE,EAAE,WAAC,OAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA,EAAA,CAAC;IAC1F,KAAK,MAAM,SAAS,IAAI,SAAS,CAAC,UAAU,EAAE,CAAC;QAC7C,MAAM,YAAY,GAAG,IAAA,gBAAI,EAAC,SAAS,CAAC,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;QACzE,KAAK,MAAM,GAAG,IAAI,SAAS,CAAC,OAAO,EAAE,CAAC;YACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC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3
|
+
/**
|
|
4
|
+
* Every package that a report of the graph computation describes, by the
|
|
5
|
+
* real path of its folder: the members of each workspace and the crates
|
|
6
|
+
* without a project whose reports discovery requested.
|
|
7
|
+
*
|
|
8
|
+
* @param realPath Resolves symbolic links, as the caller compares folders.
|
|
9
|
+
*/
|
|
10
|
+
export declare function knownPackages(graph: CargoGraph, realPath: (path: string) => string): Map<string, CargoPackage>;
|
|
11
|
+
/**
|
|
12
|
+
* The crates with a project that `crate` reaches by path, by the real paths
|
|
13
|
+
* of their folders (DES-PROJECT-GRAPH, "Edges"): its own path dependencies
|
|
14
|
+
* on crates with a project, of every kind, and the crates with a project
|
|
15
|
+
* that it reaches only through path dependencies on crates without a
|
|
16
|
+
* project, through any number of them.
|
|
17
|
+
*
|
|
18
|
+
* A path names the crate at the real path of its folder, symbolic links
|
|
19
|
+
* resolved, as cargo builds the crate it finds there. The walk takes the
|
|
20
|
+
* crate's own path dependencies of every kind, and from each crate without
|
|
21
|
+
* a project only its normal and build dependencies: cargo builds the
|
|
22
|
+
* dev-dependencies of the crate it tests, never those of a crate it builds
|
|
23
|
+
* for that one. It stops at a crate with a project, whose own edges carry
|
|
24
|
+
* on from there, and at a crate that no report describes, such as one whose
|
|
25
|
+
* folder holds `.cargo-checksum.json` or whose report failed: what that one
|
|
26
|
+
* depends on is unknown and gives nothing. The crate itself is never among
|
|
27
|
+
* them, also where a dev-dependency leads back to it.
|
|
28
|
+
*
|
|
29
|
+
* @param hasProject Whether the crate in a folder, a real path, is an Nx project.
|
|
30
|
+
* @param known The packages that a report describes ({@link knownPackages}).
|
|
31
|
+
* @param realPath Resolves symbolic links, as `known` and `hasProject` do.
|
|
32
|
+
*/
|
|
33
|
+
export declare function projectsReachedByPath(crate: CargoPackage, hasProject: (folder: string) => boolean, known: ReadonlyMap<string, CargoPackage>, realPath: (path: string) => string): string[];
|
|
34
|
+
/**
|
|
35
|
+
* The crates with a project behind `crate`, a crate without a project that
|
|
36
|
+
* cargo builds as a dependency, such as one that a `[patch]`, `[replace]`
|
|
37
|
+
* or `paths` entry puts in place of a registry or git dependency
|
|
38
|
+
* (DES-PROJECT-GRAPH, "Redirected crates"): those that it reaches through
|
|
39
|
+
* its normal and build path dependencies, through any number of crates
|
|
40
|
+
* without a project, by the real paths of their folders.
|
|
41
|
+
*
|
|
42
|
+
* It walks as {@link projectsReachedByPath} does from a crate without a
|
|
43
|
+
* project behind the one it starts from, so it takes no dev-dependency of
|
|
44
|
+
* `crate` either: cargo builds those only where it tests `crate`.
|
|
45
|
+
*/
|
|
46
|
+
export declare function projectsBehindDependency(crate: CargoPackage, hasProject: (folder: string) => boolean, known: ReadonlyMap<string, CargoPackage>, realPath: (path: string) => string): string[];
|