@convesoft/nx-rust 0.0.0 → 1.0.0-rc.1
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/README.md +47 -1
- package/executors.json +35 -0
- package/generators.json +19 -0
- package/package.json +17 -4
- package/src/cargo/build-settings.d.ts +54 -0
- package/src/cargo/build-settings.js +93 -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 +112 -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 +87 -0
- package/src/cargo/redirections.js +195 -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/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 +54 -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 +212 -0
- package/src/executors/cargo-output.js +646 -0
- package/src/executors/cargo-output.js.map +1 -0
- package/src/executors/command.d.ts +318 -0
- package/src/executors/command.js +517 -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/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 +591 -0
- package/src/executors/group-run.js.map +1 -0
- package/src/executors/groups.d.ts +113 -0
- package/src/executors/groups.js +285 -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 +185 -0
- package/src/executors/nextest.js +498 -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 +430 -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 +520 -0
- package/src/executors/task.js.map +1 -0
- package/src/executors/test-mode.d.ts +182 -0
- package/src/executors/test-mode.js +391 -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 +109 -0
- package/src/executors/test-steps.js +535 -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 +676 -0
- package/src/graph/caching.js.map +1 -0
- package/src/graph/collisions.d.ts +106 -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 +175 -0
- package/src/graph/discovery.js +656 -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 +420 -0
- package/src/graph/inputs.js +746 -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 +182 -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/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 +367 -0
- package/src/graph/targets.js +404 -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,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.targetFieldProblems = targetFieldProblems;
|
|
4
|
+
/**
|
|
5
|
+
* What is wrong with the structure of one `targets.<name>` table of a
|
|
6
|
+
* metadata table, which `DES-PLUGIN-OPTIONS` and `DES-METADATA-TABLES` shape
|
|
7
|
+
* like an Nx target: each field that an Nx 24 target has is checked against
|
|
8
|
+
* the type that Nx's project schema (`nx/schemas/project-schema.json`) gives
|
|
9
|
+
* it, before the table is merged. A field that an Nx target does not have is
|
|
10
|
+
* left as it is, because the items reject unknown keys only at the top level
|
|
11
|
+
* of a table. Whether an option is known to the target's executor is another
|
|
12
|
+
* check (`REQ-UNKNOWN-METADATA-OPTIONS`).
|
|
13
|
+
*
|
|
14
|
+
* @param target The table as `cargo metadata` reports it.
|
|
15
|
+
* @param where The start of each message: the manifest, the field and the
|
|
16
|
+
* table, such as `rust/Cargo.toml: "options" in [workspace.metadata.nx.targets.test]`.
|
|
17
|
+
* @returns One message per field of the wrong shape.
|
|
18
|
+
*/
|
|
19
|
+
// @mara implements DES-PLUGIN-OPTIONS
|
|
20
|
+
function targetFieldProblems(target, where) {
|
|
21
|
+
var _a;
|
|
22
|
+
const problems = [];
|
|
23
|
+
for (const [field, value] of Object.entries(target)) {
|
|
24
|
+
const expected = (_a = fields[field]) === null || _a === void 0 ? void 0 : _a.call(fields, value);
|
|
25
|
+
if (expected !== undefined && expected !== true) {
|
|
26
|
+
problems.push(`${where(field)} has to be ${expected}, not ${JSON.stringify(value)}.`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return problems;
|
|
30
|
+
}
|
|
31
|
+
const isTable = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
32
|
+
const isString = (value) => typeof value === "string";
|
|
33
|
+
const isStrings = (value) => Array.isArray(value) && value.every(isString);
|
|
34
|
+
const string = (value) => isString(value) || "a string";
|
|
35
|
+
const boolean = (value) => typeof value === "boolean" || "true or false";
|
|
36
|
+
const table = (value) => isTable(value) || "a table";
|
|
37
|
+
const strings = (value) => isStrings(value) || "a list of strings";
|
|
38
|
+
const oneOf = (...values) => (value) => values.includes(value) || values.map((text) => JSON.stringify(text)).join(" or ");
|
|
39
|
+
const stringOrStrings = (value) => isString(value) || isStrings(value) || "a string or a list of strings";
|
|
40
|
+
const positiveInteger = (value) => (Number.isInteger(value) && value >= 1) || "a whole number of at least 1";
|
|
41
|
+
/**
|
|
42
|
+
* Whether `value` is a table that has exactly one of `kinds`' defining keys,
|
|
43
|
+
* and only the keys that its kind allows, each of its type.
|
|
44
|
+
*/
|
|
45
|
+
function tableOfKind(value, kinds) {
|
|
46
|
+
if (!isTable(value)) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
const matching = kinds.filter((kind) => kind.key in value);
|
|
50
|
+
if (matching.length !== 1) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
const { keys } = matching[0];
|
|
54
|
+
return Object.entries(value).every(([key, item]) => { var _a; return ((_a = keys[key]) === null || _a === void 0 ? void 0 : _a.call(keys, item)) === true; });
|
|
55
|
+
}
|
|
56
|
+
// The kinds of input table of Nx's schema, each by its defining key.
|
|
57
|
+
const inputKinds = [
|
|
58
|
+
{
|
|
59
|
+
key: "fileset",
|
|
60
|
+
keys: { fileset: string, dependencies: boolean, includeIgnored: boolean, always: boolean },
|
|
61
|
+
},
|
|
62
|
+
{ key: "runtime", keys: { runtime: string } },
|
|
63
|
+
{ key: "env", keys: { env: string } },
|
|
64
|
+
{ key: "externalDependencies", keys: { externalDependencies: strings } },
|
|
65
|
+
{
|
|
66
|
+
key: "dependentTasksOutputFiles",
|
|
67
|
+
keys: { dependentTasksOutputFiles: string, transitive: boolean },
|
|
68
|
+
},
|
|
69
|
+
{ key: "json", keys: { json: string, fields: strings, excludeFields: strings, always: boolean } },
|
|
70
|
+
{
|
|
71
|
+
key: "input",
|
|
72
|
+
keys: { input: string, projects: stringOrStrings, dependencies: boolean, always: boolean },
|
|
73
|
+
},
|
|
74
|
+
];
|
|
75
|
+
const input = (value) => isString(value) ||
|
|
76
|
+
(tableOfKind(value, inputKinds) &&
|
|
77
|
+
!("projects" in value && "dependencies" in value));
|
|
78
|
+
const dependency = (value) => isString(value) ||
|
|
79
|
+
(tableOfKind(value, [
|
|
80
|
+
{
|
|
81
|
+
key: "target",
|
|
82
|
+
keys: {
|
|
83
|
+
target: string,
|
|
84
|
+
projects: stringOrStrings,
|
|
85
|
+
dependencies: boolean,
|
|
86
|
+
params: oneOf("ignore", "forward"),
|
|
87
|
+
options: oneOf("ignore", "forward"),
|
|
88
|
+
inputs: boolean,
|
|
89
|
+
waitFor: oneOf("started", "ready"),
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
]) &&
|
|
93
|
+
!("projects" in value && "dependencies" in value));
|
|
94
|
+
const readyWhenOptions = { timeout: positiveInteger, interval: positiveInteger };
|
|
95
|
+
const readyWhen = (value) => (isTable(value) && value["..."] === true && Object.keys(value).length === 1) ||
|
|
96
|
+
tableOfKind(value, [
|
|
97
|
+
{ key: "url", keys: Object.assign({ url: string }, readyWhenOptions) },
|
|
98
|
+
{
|
|
99
|
+
key: "port",
|
|
100
|
+
keys: Object.assign({ port: (port) => isString(port) ||
|
|
101
|
+
(Number.isInteger(port) && port >= 0 && port <= 65535) ||
|
|
102
|
+
"a port", host: string }, readyWhenOptions),
|
|
103
|
+
},
|
|
104
|
+
{ key: "command", keys: Object.assign({ command: string }, readyWhenOptions) },
|
|
105
|
+
{ key: "logMatches", keys: Object.assign({ logMatches: stringOrStrings }, readyWhenOptions) },
|
|
106
|
+
{
|
|
107
|
+
key: "signal",
|
|
108
|
+
keys: { signal: (signal) => signal === true || "true", timeout: positiveInteger },
|
|
109
|
+
},
|
|
110
|
+
]) ||
|
|
111
|
+
'a table with one of the keys "url", "port", "command", "logMatches" and "signal", such as { port = 8080 }';
|
|
112
|
+
// Each field of an Nx 24 target, with what it has to be.
|
|
113
|
+
const fields = {
|
|
114
|
+
executor: string,
|
|
115
|
+
command: string,
|
|
116
|
+
defaultConfiguration: string,
|
|
117
|
+
cache: boolean,
|
|
118
|
+
continuous: boolean,
|
|
119
|
+
parallelism: boolean,
|
|
120
|
+
options: table,
|
|
121
|
+
metadata: table,
|
|
122
|
+
ultracache: table,
|
|
123
|
+
configurations: (value) => (isTable(value) && Object.values(value).every(isTable)) ||
|
|
124
|
+
"a table of configurations, each a table of options",
|
|
125
|
+
outputs: strings,
|
|
126
|
+
syncGenerators: strings,
|
|
127
|
+
inputs: (value) => (Array.isArray(value) && value.every(input)) ||
|
|
128
|
+
'a list of inputs, each a string or one of the input tables of Nx, such as { env = "NAME" }',
|
|
129
|
+
dependsOn: (value) => (Array.isArray(value) && value.every(dependency)) ||
|
|
130
|
+
'a list of dependencies, each a target name or a table with "target", such as { target = "build", projects = ["web"] }',
|
|
131
|
+
readyWhen,
|
|
132
|
+
"...": (value) => value === true || "true",
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=target-fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|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AAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,MAAM;CAC3C,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { CreateDependenciesContext, TargetConfiguration } from "@nx/devkit";
|
|
2
|
+
import type { CargoGraph } from "./projects";
|
|
3
|
+
import { ProjectSettings } from "./settings";
|
|
4
|
+
import type { TargetNames } from "./options";
|
|
5
|
+
/** What laying the target tables over a project's targets needs to know about the project. */
|
|
6
|
+
export interface TableSubject {
|
|
7
|
+
settings: ProjectSettings;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Lays the `targets.<name>` tables of each project's metadata tables over
|
|
11
|
+
* its inferred targets, which already have the names that `targetNames`
|
|
12
|
+
* gives them, in the order of precedence: the workspace table's, then the
|
|
13
|
+
* crate's own. Each table is merged by Nx's own rule for laying one
|
|
14
|
+
* configuration of a target over another, as Nx lays a `project.json` over a
|
|
15
|
+
* plugin's target. A table under a name that no inferred target of the
|
|
16
|
+
* project has defines an extra target, apart from one in the workspace table
|
|
17
|
+
* under the final name of a target that the plugin infers for some projects
|
|
18
|
+
* (`inferredTargetNames`, after `targetNames`): that table applies only to
|
|
19
|
+
* the members that have the inferred target and creates nothing on the
|
|
20
|
+
* others, so that a workspace's `bench` table gives a crate without benches
|
|
21
|
+
* no target.
|
|
22
|
+
*
|
|
23
|
+
* Every table is checked against the target it lays itself over by
|
|
24
|
+
* {@link tableProblems} first.
|
|
25
|
+
*
|
|
26
|
+
* @param workspaceRoot The repository root, from which Nx's merge is loaded.
|
|
27
|
+
* @param targetNames The names that the plugin options give the inferred targets.
|
|
28
|
+
* @returns Each project's targets, in the order of `projects`.
|
|
29
|
+
* @throws {Error} Naming every manifest, target and field that breaks a rule.
|
|
30
|
+
*/
|
|
31
|
+
export declare function applyTargetTables(projects: readonly {
|
|
32
|
+
project: TableSubject;
|
|
33
|
+
targets: Record<string, TargetConfiguration>;
|
|
34
|
+
}[], workspaceRoot: string, targetNames: TargetNames): Record<string, TargetConfiguration>[];
|
|
35
|
+
/**
|
|
36
|
+
* Fails when, once Nx has merged `targetDefaults`, `project.json` and
|
|
37
|
+
* `package.json` over the plugin's targets, the `test` target of a crate
|
|
38
|
+
* sets `affectedTests` to true, among its options or in a configuration,
|
|
39
|
+
* in a workspace that does not use the selection of affected tests. The
|
|
40
|
+
* metadata tables are checked before, where the projects are created.
|
|
41
|
+
*
|
|
42
|
+
* @param projects The merged projects that `createDependencies` receives.
|
|
43
|
+
* @throws {Error} Naming each project and target concerned.
|
|
44
|
+
*/
|
|
45
|
+
export declare function failOnAffectedTestsOption(graph: CargoGraph, projects: CreateDependenciesContext["projects"]): void;
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyTargetTables = applyTargetTables;
|
|
4
|
+
exports.failOnAffectedTestsOption = failOnAffectedTestsOption;
|
|
5
|
+
const command_1 = require("../executors/command");
|
|
6
|
+
const declared_options_1 = require("../executors/declared-options");
|
|
7
|
+
const nx_internals_1 = require("./nx-internals");
|
|
8
|
+
const settings_1 = require("./settings");
|
|
9
|
+
const targets_1 = require("./targets");
|
|
10
|
+
/**
|
|
11
|
+
* Lays the `targets.<name>` tables of each project's metadata tables over
|
|
12
|
+
* its inferred targets, which already have the names that `targetNames`
|
|
13
|
+
* gives them, in the order of precedence: the workspace table's, then the
|
|
14
|
+
* crate's own. Each table is merged by Nx's own rule for laying one
|
|
15
|
+
* configuration of a target over another, as Nx lays a `project.json` over a
|
|
16
|
+
* plugin's target. A table under a name that no inferred target of the
|
|
17
|
+
* project has defines an extra target, apart from one in the workspace table
|
|
18
|
+
* under the final name of a target that the plugin infers for some projects
|
|
19
|
+
* (`inferredTargetNames`, after `targetNames`): that table applies only to
|
|
20
|
+
* the members that have the inferred target and creates nothing on the
|
|
21
|
+
* others, so that a workspace's `bench` table gives a crate without benches
|
|
22
|
+
* no target.
|
|
23
|
+
*
|
|
24
|
+
* Every table is checked against the target it lays itself over by
|
|
25
|
+
* {@link tableProblems} first.
|
|
26
|
+
*
|
|
27
|
+
* @param workspaceRoot The repository root, from which Nx's merge is loaded.
|
|
28
|
+
* @param targetNames The names that the plugin options give the inferred targets.
|
|
29
|
+
* @returns Each project's targets, in the order of `projects`.
|
|
30
|
+
* @throws {Error} Naming every manifest, target and field that breaks a rule.
|
|
31
|
+
*/
|
|
32
|
+
// @mara implements DES-PLUGIN-OPTIONS
|
|
33
|
+
// @mara implements DES-METADATA-TABLES
|
|
34
|
+
// @mara implements DES-OUTPUTS
|
|
35
|
+
function applyTargetTables(projects, workspaceRoot, targetNames) {
|
|
36
|
+
if (projects.every(({ project }) => project.settings.targets.length === 0)) {
|
|
37
|
+
return projects.map(({ targets }) => targets);
|
|
38
|
+
}
|
|
39
|
+
const { mergeTargetConfigurations } = (0, nx_internals_1.nxGraphInternals)(workspaceRoot);
|
|
40
|
+
const inferredNames = new Set(targets_1.inferredTargetNames.map((name) => { var _a; return (_a = targetNames[name]) !== null && _a !== void 0 ? _a : name; }));
|
|
41
|
+
// One message per problem, also for a workspace table that every member has.
|
|
42
|
+
const problems = new Set();
|
|
43
|
+
const merged = projects.map(({ project, targets }) => {
|
|
44
|
+
var _a, _b, _c;
|
|
45
|
+
const result = Object.assign({}, targets);
|
|
46
|
+
const applied = [];
|
|
47
|
+
// For each name, the tables whose fields the merged target still has. As
|
|
48
|
+
// in Nx's merge, a table that names another executor than the target has
|
|
49
|
+
// so far replaces the target, and what the tables before it gave is gone.
|
|
50
|
+
const kept = new Map();
|
|
51
|
+
for (const table of project.settings.targets) {
|
|
52
|
+
const inferred = targets[table.name];
|
|
53
|
+
if (inferred === undefined &&
|
|
54
|
+
table.table === "[workspace.metadata.nx]" &&
|
|
55
|
+
inferredNames.has(table.name)) {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const before = result[table.name];
|
|
59
|
+
const replaces = (before === null || before === void 0 ? void 0 : before.executor) !== undefined &&
|
|
60
|
+
table.target.executor !== undefined &&
|
|
61
|
+
table.target.executor !== before.executor;
|
|
62
|
+
kept.set(table.name, [...(replaces ? [] : ((_a = kept.get(table.name)) !== null && _a !== void 0 ? _a : [])), table]);
|
|
63
|
+
applied.push(table);
|
|
64
|
+
// A copy for each project, so that no two projects share an object Nx may change.
|
|
65
|
+
result[table.name] = mergeTargetConfigurations(structuredClone(table.target), before, undefined, undefined, undefined, false);
|
|
66
|
+
}
|
|
67
|
+
// A table that turns caching off for an inferred target is a reason why
|
|
68
|
+
// the plugin leaves it uncached in this project, which the executor
|
|
69
|
+
// reads, so that it fails a task that caches the target through another
|
|
70
|
+
// configuration (`DES-OUTPUTS`, "Per project").
|
|
71
|
+
for (const [name, tables] of kept) {
|
|
72
|
+
const before = targets[name];
|
|
73
|
+
const after = result[name];
|
|
74
|
+
const setter = [...tables].reverse().find((table) => table.target.cache !== undefined);
|
|
75
|
+
const metadata = (_b = after.metadata) === null || _b === void 0 ? void 0 : _b[targets_1.targetCargoMetadataKey];
|
|
76
|
+
if ((before === null || before === void 0 ? void 0 : before.cache) === true &&
|
|
77
|
+
after.cache !== true &&
|
|
78
|
+
setter !== undefined &&
|
|
79
|
+
metadata !== undefined &&
|
|
80
|
+
metadata.uncached === undefined) {
|
|
81
|
+
result[name] = Object.assign(Object.assign({}, after), { metadata: Object.assign(Object.assign({}, after.metadata), { [targets_1.targetCargoMetadataKey]: Object.assign(Object.assign({}, metadata), { uncached: `${(0, settings_1.targetHeader)(setter.table, name)} in ${setter.manifest} sets cache = false` }) }) });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// Checked once every table is merged, so that the options of an extra
|
|
85
|
+
// target meet the executor that another table gives it.
|
|
86
|
+
for (const table of applied) {
|
|
87
|
+
const target = result[table.name];
|
|
88
|
+
const runs = ((_c = kept.get(table.name)) === null || _c === void 0 ? void 0 : _c.includes(table)) && target.command === undefined
|
|
89
|
+
? target.executor
|
|
90
|
+
: undefined;
|
|
91
|
+
for (const problem of tableProblems(table, targets[table.name], runs, project.settings)) {
|
|
92
|
+
problems.add(problem);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return result;
|
|
96
|
+
});
|
|
97
|
+
if (problems.size > 0) {
|
|
98
|
+
throw new Error([...problems].join("\n"));
|
|
99
|
+
}
|
|
100
|
+
return merged;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* What is wrong with one target table, each problem a message that names
|
|
104
|
+
* the manifest and the table. This is the one place where a table is checked
|
|
105
|
+
* against the target it addresses.
|
|
106
|
+
*
|
|
107
|
+
* On an inferred target, a table may not set `inputs` without `"..."`, a
|
|
108
|
+
* different `executor` or a `command`, and `affectedTests = true` among the
|
|
109
|
+
* options or in a configuration of `test` requires a workspace that uses
|
|
110
|
+
* the selection of affected tests. A table under a name that the project
|
|
111
|
+
* has no inferred target for defines an extra target, which may run
|
|
112
|
+
* anything; one that names an executor of the plugin fails when its task
|
|
113
|
+
* starts (`DES-TARGETS`). On a target of one of the plugin's executors, the
|
|
114
|
+
* keys under `options` and `configurations` are checked as well
|
|
115
|
+
* ({@link optionProblems}).
|
|
116
|
+
*
|
|
117
|
+
* @param inferred The inferred target under the table's name, if the project has one.
|
|
118
|
+
* @param runs The executor of the target once every table of the project is
|
|
119
|
+
* merged, where the table's fields are part of it and it has no `command`.
|
|
120
|
+
*/
|
|
121
|
+
function tableProblems(table, inferred, runs, settings) {
|
|
122
|
+
var _a, _b, _c;
|
|
123
|
+
if (inferred === undefined) {
|
|
124
|
+
return optionProblems(table, undefined, runs);
|
|
125
|
+
}
|
|
126
|
+
const { target, manifest, name } = table;
|
|
127
|
+
const header = (0, settings_1.targetHeader)(table.table, name);
|
|
128
|
+
const problems = [];
|
|
129
|
+
if (target.inputs !== undefined &&
|
|
130
|
+
!(Array.isArray(target.inputs) && target.inputs.includes("..."))) {
|
|
131
|
+
problems.push(`${manifest}: ${header} sets "inputs" without "..." on the inferred target "${name}". The list would replace the inferred inputs, and the cache key would lose the toolchain, the environment and the files of the crate's dependencies. Put "..." where the inferred inputs belong, such as inputs = ["...", { env = "DATABASE_URL" }].`);
|
|
132
|
+
}
|
|
133
|
+
if (target.executor !== undefined && target.executor !== inferred.executor) {
|
|
134
|
+
problems.push(`${manifest}: ${header} sets "executor" to ${JSON.stringify(target.executor)} on the inferred target "${name}", which runs ${JSON.stringify(inferred.executor)}. Nx would use the table in place of the inferred target. To run something else, define a target under a name of its own.`);
|
|
135
|
+
}
|
|
136
|
+
if (target.command !== undefined) {
|
|
137
|
+
problems.push(`${manifest}: ${header} sets "command" on the inferred target "${name}". Nx would run the command in place of the inferred target. To run another command, define a target under a name of its own.`);
|
|
138
|
+
}
|
|
139
|
+
if (isInferredTest(inferred) && !settings.workspace.affectedTests) {
|
|
140
|
+
const places = [
|
|
141
|
+
...(((_a = target.options) === null || _a === void 0 ? void 0 : _a.affectedTests) === true
|
|
142
|
+
? [(0, settings_1.targetHeader)(table.table, name, "options")]
|
|
143
|
+
: []),
|
|
144
|
+
...Object.entries((_b = target.configurations) !== null && _b !== void 0 ? _b : {})
|
|
145
|
+
.filter(([, configuration]) => (configuration === null || configuration === void 0 ? void 0 : configuration.affectedTests) === true)
|
|
146
|
+
.map(([configuration]) => (0, settings_1.targetHeader)(table.table, name, "configurations", configuration)),
|
|
147
|
+
];
|
|
148
|
+
for (const place of places) {
|
|
149
|
+
problems.push(`${manifest}: ${place} sets "affectedTests" to true, but the Cargo workspace in ${settings.workspace.rootManifest} does not use the selection of affected tests, so the option can only turn it off. Remove it, or turn selection on with affectedTests = true under [workspace.metadata.nx] in ${settings.workspace.rootManifest}.`);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if (target.command === undefined &&
|
|
153
|
+
((_c = target.executor) !== null && _c !== void 0 ? _c : inferred.executor) === inferred.executor) {
|
|
154
|
+
problems.push(...optionProblems(table, inferred, inferred.executor));
|
|
155
|
+
}
|
|
156
|
+
return problems;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* What is wrong with the keys under `options` and under each configuration
|
|
160
|
+
* of a target table whose target runs one of the plugin's executors
|
|
161
|
+
* (`REQ-UNKNOWN-METADATA-OPTIONS`), each problem a message that names the
|
|
162
|
+
* manifest, the table, which names the target and the configuration, and
|
|
163
|
+
* the key.
|
|
164
|
+
*
|
|
165
|
+
* The executors' options are those that their schemas declare
|
|
166
|
+
* ({@link declaredExecutorOptions}), and on an inferred target only those
|
|
167
|
+
* that the target takes ({@link targetTakes}), which the cargo command uses
|
|
168
|
+
* as well. `pluginVersion`, which the plugin sets itself, is no table's to
|
|
169
|
+
* set, because a value set by hand would replace the plugin's version in the
|
|
170
|
+
* cache key (`GOAL-TRUSTED-CACHE`). On an extra target that runs one of
|
|
171
|
+
* the executors once the workspace's and the crate's tables are merged,
|
|
172
|
+
* whichever of them names it, and which fails when its task starts, a key is
|
|
173
|
+
* checked against the executor's schema alone, because the option reference
|
|
174
|
+
* gives options to inferred targets only. An extra target of another
|
|
175
|
+
* executor, or with a `command`, has Nx's options, which are not the
|
|
176
|
+
* plugin's to check, and so does an inferred target that the table gives
|
|
177
|
+
* another executor or a command, which is an error of its own
|
|
178
|
+
* ({@link tableProblems}).
|
|
179
|
+
*
|
|
180
|
+
* @param inferred The inferred target under the table's name, if the
|
|
181
|
+
* project has one and the table keeps its executor.
|
|
182
|
+
* @param executor The executor that the table's keys reach: the inferred
|
|
183
|
+
* target's, or the merged extra target's.
|
|
184
|
+
*/
|
|
185
|
+
// @mara implements REQ-UNKNOWN-METADATA-OPTIONS
|
|
186
|
+
// @mara implements DES-UNKNOWN-OPTIONS
|
|
187
|
+
function optionProblems(table, inferred, executor) {
|
|
188
|
+
var _a, _b, _c, _d;
|
|
189
|
+
const { target, manifest, name } = table;
|
|
190
|
+
const declared = executor === undefined ? undefined : (0, declared_options_1.declaredExecutorOptions)().get(executor);
|
|
191
|
+
if (executor === undefined || declared === undefined) {
|
|
192
|
+
return [];
|
|
193
|
+
}
|
|
194
|
+
const inferredName = (_b = (_a = inferred === null || inferred === void 0 ? void 0 : inferred.metadata) === null || _a === void 0 ? void 0 : _a[targets_1.targetCargoMetadataKey]) === null || _b === void 0 ? void 0 : _b.target;
|
|
195
|
+
const takes = (option) => option !== command_1.pluginVersionOption &&
|
|
196
|
+
declared.has(option) &&
|
|
197
|
+
(inferredName === undefined || (0, command_1.targetTakes)(inferredName, option));
|
|
198
|
+
const offered = [...declared].filter(takes);
|
|
199
|
+
const subject = inferredName === undefined
|
|
200
|
+
? `the target "${name}"`
|
|
201
|
+
: inferredName === name
|
|
202
|
+
? `the inferred target "${name}"`
|
|
203
|
+
: `the inferred target "${inferredName}", named "${name}" by targetNames`;
|
|
204
|
+
// The comma that closes the clause about targetNames before the verb.
|
|
205
|
+
const pause = inferredName !== undefined && inferredName !== name ? "," : "";
|
|
206
|
+
const offeredBy = inferredName === undefined ? `${executor} knows` : `"${name}" takes`;
|
|
207
|
+
const places = [
|
|
208
|
+
[(0, settings_1.targetHeader)(table.table, name, "options"), (_c = target.options) !== null && _c !== void 0 ? _c : {}],
|
|
209
|
+
...Object.entries((_d = target.configurations) !== null && _d !== void 0 ? _d : {}).map(([configuration, options]) => [
|
|
210
|
+
(0, settings_1.targetHeader)(table.table, name, "configurations", configuration),
|
|
211
|
+
options !== null && options !== void 0 ? options : {},
|
|
212
|
+
]),
|
|
213
|
+
];
|
|
214
|
+
const problems = [];
|
|
215
|
+
for (const [place, options] of places) {
|
|
216
|
+
for (const key of Object.keys(options)) {
|
|
217
|
+
if (takes(key)) {
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
const option = JSON.stringify(key);
|
|
221
|
+
if (key === command_1.pluginVersionOption && declared.has(key)) {
|
|
222
|
+
problems.push(`${manifest}: ${place} sets the option ${option}, which only the plugin sets: it carries the plugin's version into the cache key, and a value set by hand would replace it, so that Nx could restore results of another version of the plugin. Remove it.`);
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
const similar = offered.find((candidate) => looseName(candidate) === looseName(key));
|
|
226
|
+
problems.push([
|
|
227
|
+
declared.has(key)
|
|
228
|
+
? `${manifest}: ${place} sets the option ${option}, which ${subject}${pause} does not take.`
|
|
229
|
+
: `${manifest}: ${place} sets the option ${option}, which ${executor}, the executor of ${subject}, does not know.`,
|
|
230
|
+
similar === undefined ? undefined : `Did you mean "${similar}"?`,
|
|
231
|
+
`The options that ${offeredBy} are ${list(offered.map((candidate) => `"${candidate}"`))}.`,
|
|
232
|
+
inferredName === undefined
|
|
233
|
+
? `${executor} runs only the targets that nx-rust infers; to run another cargo command, define a target with a "command" instead.`
|
|
234
|
+
: undefined,
|
|
235
|
+
]
|
|
236
|
+
.filter((sentence) => sentence !== undefined)
|
|
237
|
+
.join(" "));
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
return problems;
|
|
241
|
+
}
|
|
242
|
+
// An option's name without case, dashes and underscores, so that
|
|
243
|
+
// `no-default-features` and `no_default_features` find `noDefaultFeatures`.
|
|
244
|
+
function looseName(name) {
|
|
245
|
+
return name.toLowerCase().replace(/[-_]/g, "");
|
|
246
|
+
}
|
|
247
|
+
// `a`, `a and b`, `a, b and c`
|
|
248
|
+
function list(items) {
|
|
249
|
+
return items.length <= 1
|
|
250
|
+
? items.join("")
|
|
251
|
+
: `${items.slice(0, -1).join(", ")} and ${items[items.length - 1]}`;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Fails when, once Nx has merged `targetDefaults`, `project.json` and
|
|
255
|
+
* `package.json` over the plugin's targets, the `test` target of a crate
|
|
256
|
+
* sets `affectedTests` to true, among its options or in a configuration,
|
|
257
|
+
* in a workspace that does not use the selection of affected tests. The
|
|
258
|
+
* metadata tables are checked before, where the projects are created.
|
|
259
|
+
*
|
|
260
|
+
* @param projects The merged projects that `createDependencies` receives.
|
|
261
|
+
* @throws {Error} Naming each project and target concerned.
|
|
262
|
+
*/
|
|
263
|
+
// @mara implements DES-PLUGIN-OPTIONS
|
|
264
|
+
function failOnAffectedTestsOption(graph, projects) {
|
|
265
|
+
var _a, _b, _c;
|
|
266
|
+
const byRoot = new Map(Object.entries(projects).map(([name, project]) => [project.root, { name, project }]));
|
|
267
|
+
const problems = [];
|
|
268
|
+
for (const own of graph.projects) {
|
|
269
|
+
const merged = byRoot.get(own.root);
|
|
270
|
+
if (own.pkg === undefined || merged === undefined || own.settings.workspace.affectedTests) {
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
for (const [target, configuration] of Object.entries((_a = merged.project.targets) !== null && _a !== void 0 ? _a : {})) {
|
|
274
|
+
if (!isInferredTest(configuration)) {
|
|
275
|
+
continue;
|
|
276
|
+
}
|
|
277
|
+
const where = [
|
|
278
|
+
...(((_b = configuration.options) === null || _b === void 0 ? void 0 : _b.affectedTests) === true ? ["among its options"] : []),
|
|
279
|
+
...Object.entries((_c = configuration.configurations) !== null && _c !== void 0 ? _c : {})
|
|
280
|
+
.filter(([, values]) => (values === null || values === void 0 ? void 0 : values.affectedTests) === true)
|
|
281
|
+
.map(([name]) => `in its configuration "${name}"`),
|
|
282
|
+
];
|
|
283
|
+
if (where.length > 0) {
|
|
284
|
+
const workspace = own.settings.workspace.rootManifest;
|
|
285
|
+
problems.push(`The target "${target}" of the project "${merged.name}" (${own.manifest}) sets "affectedTests" to true ${where.join(" and ")}, but the Cargo workspace in ${workspace} does not use the selection of affected tests, so the option can only turn it off. The value comes from a targetDefaults entry in nx.json, or from a project.json or package.json in ${own.root}: run \`nx show target ${merged.name}:${target} --json\` and look under sourceMap for the file. Remove it there, or turn selection on with affectedTests = true under [workspace.metadata.nx] in ${workspace}.`);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
if (problems.length > 0) {
|
|
290
|
+
throw new Error(problems.join("\n"));
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
// The inferred `test` target, under whatever name, while it still runs the plugin's executor.
|
|
294
|
+
function isInferredTest(target) {
|
|
295
|
+
var _a, _b;
|
|
296
|
+
return (target.executor === targets_1.cargoExecutor &&
|
|
297
|
+
((_b = (_a = target.metadata) === null || _a === void 0 ? void 0 : _a[targets_1.targetCargoMetadataKey]) === null || _b === void 0 ? void 0 : _b.target) === "test");
|
|
298
|
+
}
|
|
299
|
+
//# sourceMappingURL=target-tables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"target-tables.js","sourceRoot":"","sources":["../../../../nx-rust/src/graph/target-tables.ts"],"names":[],"mappings":";;AA6CA,8CA6FC;AAoMD,8DAkCC;AA/WD,kDAAwE;AACxE,oEAAwE;AACxE,iDAAkD;AAElD,yCAAwE;AAExE,uCAMmB;AAOnB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,sCAAsC;AACtC,uCAAuC;AACvC,+BAA+B;AAC/B,SAAgB,iBAAiB,CAC/B,QAA4F,EAC5F,aAAqB,EACrB,WAAwB;IAExB,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;QAC3E,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;IACD,MAAM,EAAE,yBAAyB,EAAE,GAAG,IAAA,+BAAgB,EAAC,aAAa,CAAC,CAAC;IACtE,MAAM,aAAa,GAAG,IAAI,GAAG,CAC3B,6BAAmB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,WAAC,OAAA,MAAA,WAAW,CAAC,IAAI,CAAC,mCAAI,IAAI,CAAA,EAAA,CAAC,CAC7D,CAAC;IACF,6EAA6E;IAC7E,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IACnC,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,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