@convesoft/nx-rust 0.0.0 → 1.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +21 -0
- package/PLUGIN.md +106 -0
- package/README.md +51 -1
- package/docs/artifacts.mara.md +374 -0
- package/docs/caching.mara.md +999 -0
- package/docs/ci.mara.md +308 -0
- package/docs/configuration.mara.md +508 -0
- package/docs/decisions.mara.md +3267 -0
- package/docs/execution.mara.md +533 -0
- package/docs/index.mara.md +51 -0
- package/docs/product.mara.md +366 -0
- package/docs/release.mara.md +493 -0
- package/docs/setup.mara.md +486 -0
- package/docs/targets.mara.md +704 -0
- package/docs/testing.mara.md +431 -0
- package/docs/verification.mara.md +465 -0
- package/docs/workspaces.mara.md +445 -0
- package/executors.json +35 -0
- package/generators.json +19 -0
- package/package.json +17 -4
- package/src/cargo/build-settings.d.ts +61 -0
- package/src/cargo/build-settings.js +103 -0
- package/src/cargo/build-settings.js.map +1 -0
- package/src/cargo/configured-runner.d.ts +36 -0
- package/src/cargo/configured-runner.js +99 -0
- package/src/cargo/configured-runner.js.map +1 -0
- package/src/cargo/configured-tools.d.ts +35 -0
- package/src/cargo/configured-tools.js +46 -0
- package/src/cargo/configured-tools.js.map +1 -0
- package/src/cargo/dep-info-basedir.d.ts +18 -0
- package/src/cargo/dep-info-basedir.js +38 -0
- package/src/cargo/dep-info-basedir.js.map +1 -0
- package/src/cargo/directories.d.ts +40 -0
- package/src/cargo/directories.js +89 -0
- package/src/cargo/directories.js.map +1 -0
- package/src/cargo/host-triple.d.ts +7 -0
- package/src/cargo/host-triple.js +21 -0
- package/src/cargo/host-triple.js.map +1 -0
- package/src/cargo/lockfile.d.ts +63 -0
- package/src/cargo/lockfile.js +157 -0
- package/src/cargo/lockfile.js.map +1 -0
- package/src/cargo/metadata.d.ts +114 -0
- package/src/cargo/metadata.js +37 -0
- package/src/cargo/metadata.js.map +1 -0
- package/src/cargo/package-specs.d.ts +54 -0
- package/src/cargo/package-specs.js +109 -0
- package/src/cargo/package-specs.js.map +1 -0
- package/src/cargo/paths-crates.d.ts +27 -0
- package/src/cargo/paths-crates.js +69 -0
- package/src/cargo/paths-crates.js.map +1 -0
- package/src/cargo/print-artifact-folders.d.ts +1 -0
- package/src/cargo/print-artifact-folders.js +58 -0
- package/src/cargo/print-artifact-folders.js.map +1 -0
- package/src/cargo/redirections.d.ts +90 -0
- package/src/cargo/redirections.js +200 -0
- package/src/cargo/redirections.js.map +1 -0
- package/src/cargo/run-cargo.d.ts +31 -0
- package/src/cargo/run-cargo.js +75 -0
- package/src/cargo/run-cargo.js.map +1 -0
- package/src/cargo/target-triples.d.ts +98 -0
- package/src/cargo/target-triples.js +265 -0
- package/src/cargo/target-triples.js.map +1 -0
- package/src/cargo/version-req.d.ts +12 -0
- package/src/cargo/version-req.js +122 -0
- package/src/cargo/version-req.js.map +1 -0
- package/src/cargo/warnings-setting.d.ts +24 -0
- package/src/cargo/warnings-setting.js +81 -0
- package/src/cargo/warnings-setting.js.map +1 -0
- package/src/compatibility/cargo-version.d.ts +43 -0
- package/src/compatibility/cargo-version.js +83 -0
- package/src/compatibility/cargo-version.js.map +1 -0
- package/src/compatibility/nx-bridge.d.ts +312 -0
- package/src/compatibility/nx-bridge.js +407 -0
- package/src/compatibility/nx-bridge.js.map +1 -0
- package/src/compatibility/nx-version.d.ts +104 -0
- package/src/compatibility/nx-version.js +272 -0
- package/src/compatibility/nx-version.js.map +1 -0
- package/src/executors/affected-inputs.d.ts +29 -0
- package/src/executors/affected-inputs.js +259 -0
- package/src/executors/affected-inputs.js.map +1 -0
- package/src/executors/affected-run.d.ts +54 -0
- package/src/executors/affected-run.js +394 -0
- package/src/executors/affected-run.js.map +1 -0
- package/src/executors/affected.d.ts +239 -0
- package/src/executors/affected.js +589 -0
- package/src/executors/affected.js.map +1 -0
- package/src/executors/baseline-context.d.ts +85 -0
- package/src/executors/baseline-context.js +227 -0
- package/src/executors/baseline-context.js.map +1 -0
- package/src/executors/baseline.d.ts +123 -0
- package/src/executors/baseline.js +356 -0
- package/src/executors/baseline.js.map +1 -0
- package/src/executors/batch.d.ts +75 -0
- package/src/executors/batch.js +434 -0
- package/src/executors/batch.js.map +1 -0
- package/src/executors/build-records.d.ts +110 -0
- package/src/executors/build-records.js +267 -0
- package/src/executors/build-records.js.map +1 -0
- package/src/executors/cargo/executor.d.ts +28 -0
- package/src/executors/cargo/executor.js +58 -0
- package/src/executors/cargo/executor.js.map +1 -0
- package/src/executors/cargo/schema.json +58 -0
- package/src/executors/cargo-invocation.d.ts +81 -0
- package/src/executors/cargo-invocation.js +109 -0
- package/src/executors/cargo-invocation.js.map +1 -0
- package/src/executors/cargo-output.d.ts +218 -0
- package/src/executors/cargo-output.js +660 -0
- package/src/executors/cargo-output.js.map +1 -0
- package/src/executors/command.d.ts +331 -0
- package/src/executors/command.js +547 -0
- package/src/executors/command.js.map +1 -0
- package/src/executors/coverage-baseline.d.ts +23 -0
- package/src/executors/coverage-baseline.js +284 -0
- package/src/executors/coverage-baseline.js.map +1 -0
- package/src/executors/declared-options.d.ts +21 -0
- package/src/executors/declared-options.js +58 -0
- package/src/executors/declared-options.js.map +1 -0
- package/src/executors/denied-warnings.d.ts +99 -0
- package/src/executors/denied-warnings.js +188 -0
- package/src/executors/denied-warnings.js.map +1 -0
- package/src/executors/digests.d.ts +94 -0
- package/src/executors/digests.js +190 -0
- package/src/executors/digests.js.map +1 -0
- package/src/executors/dotenv-check.d.ts +79 -0
- package/src/executors/dotenv-check.js +553 -0
- package/src/executors/dotenv-check.js.map +1 -0
- package/src/executors/group-invocations.d.ts +80 -0
- package/src/executors/group-invocations.js +253 -0
- package/src/executors/group-invocations.js.map +1 -0
- package/src/executors/group-run.d.ts +114 -0
- package/src/executors/group-run.js +601 -0
- package/src/executors/group-run.js.map +1 -0
- package/src/executors/groups.d.ts +118 -0
- package/src/executors/groups.js +304 -0
- package/src/executors/groups.js.map +1 -0
- package/src/executors/input-check.d.ts +52 -0
- package/src/executors/input-check.js +271 -0
- package/src/executors/input-check.js.map +1 -0
- package/src/executors/kept-files.d.ts +98 -0
- package/src/executors/kept-files.js +341 -0
- package/src/executors/kept-files.js.map +1 -0
- package/src/executors/lockfile/executor.d.ts +16 -0
- package/src/executors/lockfile/executor.js +37 -0
- package/src/executors/lockfile/executor.js.map +1 -0
- package/src/executors/lockfile/schema.json +50 -0
- package/src/executors/napi-build.d.ts +73 -0
- package/src/executors/napi-build.js +420 -0
- package/src/executors/napi-build.js.map +1 -0
- package/src/executors/nextest.d.ts +189 -0
- package/src/executors/nextest.js +504 -0
- package/src/executors/nextest.js.map +1 -0
- package/src/executors/nx-command.d.ts +95 -0
- package/src/executors/nx-command.js +205 -0
- package/src/executors/nx-command.js.map +1 -0
- package/src/executors/nx-task-files.d.ts +82 -0
- package/src/executors/nx-task-files.js +156 -0
- package/src/executors/nx-task-files.js.map +1 -0
- package/src/executors/print-test-mode.d.ts +1 -0
- package/src/executors/print-test-mode.js +25 -0
- package/src/executors/print-test-mode.js.map +1 -0
- package/src/executors/release-publish/executor.d.ts +24 -0
- package/src/executors/release-publish/executor.js +165 -0
- package/src/executors/release-publish/executor.js.map +1 -0
- package/src/executors/release-publish/schema.json +30 -0
- package/src/executors/run/executor.d.ts +12 -0
- package/src/executors/run/executor.js +27 -0
- package/src/executors/run/executor.js.map +1 -0
- package/src/executors/run/schema.json +45 -0
- package/src/executors/runner-script.d.ts +12 -0
- package/src/executors/runner-script.js +22 -0
- package/src/executors/runner-script.js.map +1 -0
- package/src/executors/runtime-input-check.d.ts +24 -0
- package/src/executors/runtime-input-check.js +87 -0
- package/src/executors/runtime-input-check.js.map +1 -0
- package/src/executors/shared-artifacts.d.ts +44 -0
- package/src/executors/shared-artifacts.js +132 -0
- package/src/executors/shared-artifacts.js.map +1 -0
- package/src/executors/split-words.d.ts +24 -0
- package/src/executors/split-words.js +111 -0
- package/src/executors/split-words.js.map +1 -0
- package/src/executors/stage.d.ts +163 -0
- package/src/executors/stage.js +526 -0
- package/src/executors/stage.js.map +1 -0
- package/src/executors/staged-run.d.ts +24 -0
- package/src/executors/staged-run.js +110 -0
- package/src/executors/staged-run.js.map +1 -0
- package/src/executors/task-env.d.ts +271 -0
- package/src/executors/task-env.js +494 -0
- package/src/executors/task-env.js.map +1 -0
- package/src/executors/task-execution.d.ts +61 -0
- package/src/executors/task-execution.js +122 -0
- package/src/executors/task-execution.js.map +1 -0
- package/src/executors/task-guards.d.ts +112 -0
- package/src/executors/task-guards.js +435 -0
- package/src/executors/task-guards.js.map +1 -0
- package/src/executors/task-options.d.ts +114 -0
- package/src/executors/task-options.js +258 -0
- package/src/executors/task-options.js.map +1 -0
- package/src/executors/task.d.ts +166 -0
- package/src/executors/task.js +527 -0
- package/src/executors/task.js.map +1 -0
- package/src/executors/test-mode.d.ts +185 -0
- package/src/executors/test-mode.js +397 -0
- package/src/executors/test-mode.js.map +1 -0
- package/src/executors/test-runner.d.ts +44 -0
- package/src/executors/test-runner.js +159 -0
- package/src/executors/test-runner.js.map +1 -0
- package/src/executors/test-steps.d.ts +121 -0
- package/src/executors/test-steps.js +566 -0
- package/src/executors/test-steps.js.map +1 -0
- package/src/executors/wasm-build.d.ts +56 -0
- package/src/executors/wasm-build.js +216 -0
- package/src/executors/wasm-build.js.map +1 -0
- package/src/generators/crate/binary.schema.json +28 -0
- package/src/generators/crate/crate.d.ts +24 -0
- package/src/generators/crate/crate.js +108 -0
- package/src/generators/crate/crate.js.map +1 -0
- package/src/generators/crate/enclosing-workspace.d.ts +25 -0
- package/src/generators/crate/enclosing-workspace.js +58 -0
- package/src/generators/crate/enclosing-workspace.js.map +1 -0
- package/src/generators/crate/library.schema.json +28 -0
- package/src/generators/init/graph-check.d.ts +81 -0
- package/src/generators/init/graph-check.js +299 -0
- package/src/generators/init/graph-check.js.map +1 -0
- package/src/generators/init/init.d.ts +23 -0
- package/src/generators/init/init.js +113 -0
- package/src/generators/init/init.js.map +1 -0
- package/src/generators/init/report.d.ts +19 -0
- package/src/generators/init/report.js +93 -0
- package/src/generators/init/report.js.map +1 -0
- package/src/generators/init/schema.json +9 -0
- package/src/graph/artifact-kinds.d.ts +29 -0
- package/src/graph/artifact-kinds.js +50 -0
- package/src/graph/artifact-kinds.js.map +1 -0
- package/src/graph/artifact-names.d.ts +97 -0
- package/src/graph/artifact-names.js +276 -0
- package/src/graph/artifact-names.js.map +1 -0
- package/src/graph/build-records.d.ts +74 -0
- package/src/graph/build-records.js +104 -0
- package/src/graph/build-records.js.map +1 -0
- package/src/graph/caching.d.ts +148 -0
- package/src/graph/caching.js +681 -0
- package/src/graph/caching.js.map +1 -0
- package/src/graph/clippy-input.d.ts +53 -0
- package/src/graph/clippy-input.js +107 -0
- package/src/graph/clippy-input.js.map +1 -0
- package/src/graph/collisions.d.ts +113 -0
- package/src/graph/collisions.js +156 -0
- package/src/graph/collisions.js.map +1 -0
- package/src/graph/computation-reports.d.ts +89 -0
- package/src/graph/computation-reports.js +216 -0
- package/src/graph/computation-reports.js.map +1 -0
- package/src/graph/declared-files.d.ts +190 -0
- package/src/graph/declared-files.js +600 -0
- package/src/graph/declared-files.js.map +1 -0
- package/src/graph/discovery.d.ts +190 -0
- package/src/graph/discovery.js +661 -0
- package/src/graph/discovery.js.map +1 -0
- package/src/graph/edges.d.ts +25 -0
- package/src/graph/edges.js +94 -0
- package/src/graph/edges.js.map +1 -0
- package/src/graph/entries.d.ts +83 -0
- package/src/graph/entries.js +259 -0
- package/src/graph/entries.js.map +1 -0
- package/src/graph/inputs.d.ts +422 -0
- package/src/graph/inputs.js +756 -0
- package/src/graph/inputs.js.map +1 -0
- package/src/graph/lockfile-task.d.ts +74 -0
- package/src/graph/lockfile-task.js +105 -0
- package/src/graph/lockfile-task.js.map +1 -0
- package/src/graph/names.d.ts +41 -0
- package/src/graph/names.js +34 -0
- package/src/graph/names.js.map +1 -0
- package/src/graph/napi.d.ts +107 -0
- package/src/graph/napi.js +206 -0
- package/src/graph/napi.js.map +1 -0
- package/src/graph/nx-glob.d.ts +36 -0
- package/src/graph/nx-glob.js +152 -0
- package/src/graph/nx-glob.js.map +1 -0
- package/src/graph/nx-internals.d.ts +57 -0
- package/src/graph/nx-internals.js +128 -0
- package/src/graph/nx-internals.js.map +1 -0
- package/src/graph/options.d.ts +32 -0
- package/src/graph/options.js +80 -0
- package/src/graph/options.js.map +1 -0
- package/src/graph/outputs.d.ts +75 -0
- package/src/graph/outputs.js +140 -0
- package/src/graph/outputs.js.map +1 -0
- package/src/graph/path-dependencies.d.ts +122 -0
- package/src/graph/path-dependencies.js +459 -0
- package/src/graph/path-dependencies.js.map +1 -0
- package/src/graph/plugin-package.d.ts +36 -0
- package/src/graph/plugin-package.js +132 -0
- package/src/graph/plugin-package.js.map +1 -0
- package/src/graph/plugin-version.d.ts +20 -0
- package/src/graph/plugin-version.js +153 -0
- package/src/graph/plugin-version.js.map +1 -0
- package/src/graph/projects.d.ts +141 -0
- package/src/graph/projects.js +193 -0
- package/src/graph/projects.js.map +1 -0
- package/src/graph/reached-projects.d.ts +46 -0
- package/src/graph/reached-projects.js +102 -0
- package/src/graph/reached-projects.js.map +1 -0
- package/src/graph/real-path.d.ts +47 -0
- package/src/graph/real-path.js +113 -0
- package/src/graph/real-path.js.map +1 -0
- package/src/graph/redirected-uses.d.ts +98 -0
- package/src/graph/redirected-uses.js +434 -0
- package/src/graph/redirected-uses.js.map +1 -0
- package/src/graph/registration.d.ts +121 -0
- package/src/graph/registration.js +233 -0
- package/src/graph/registration.js.map +1 -0
- package/src/graph/rustfmt-config.d.ts +42 -0
- package/src/graph/rustfmt-config.js +173 -0
- package/src/graph/rustfmt-config.js.map +1 -0
- package/src/graph/script-input.d.ts +46 -0
- package/src/graph/script-input.js +65 -0
- package/src/graph/script-input.js.map +1 -0
- package/src/graph/settings.d.ts +178 -0
- package/src/graph/settings.js +479 -0
- package/src/graph/settings.js.map +1 -0
- package/src/graph/target-defaults-causes.d.ts +33 -0
- package/src/graph/target-defaults-causes.js +202 -0
- package/src/graph/target-defaults-causes.js.map +1 -0
- package/src/graph/target-defaults-layers.d.ts +186 -0
- package/src/graph/target-defaults-layers.js +420 -0
- package/src/graph/target-defaults-layers.js.map +1 -0
- package/src/graph/target-defaults-meaning.d.ts +95 -0
- package/src/graph/target-defaults-meaning.js +292 -0
- package/src/graph/target-defaults-meaning.js.map +1 -0
- package/src/graph/target-defaults-report.d.ts +77 -0
- package/src/graph/target-defaults-report.js +242 -0
- package/src/graph/target-defaults-report.js.map +1 -0
- package/src/graph/target-defaults.d.ts +79 -0
- package/src/graph/target-defaults.js +425 -0
- package/src/graph/target-defaults.js.map +1 -0
- package/src/graph/target-fields.d.ts +16 -0
- package/src/graph/target-fields.js +134 -0
- package/src/graph/target-fields.js.map +1 -0
- package/src/graph/target-tables.d.ts +45 -0
- package/src/graph/target-tables.js +299 -0
- package/src/graph/target-tables.js.map +1 -0
- package/src/graph/targets.d.ts +371 -0
- package/src/graph/targets.js +408 -0
- package/src/graph/targets.js.map +1 -0
- package/src/graph/unification.d.ts +141 -0
- package/src/graph/unification.js +459 -0
- package/src/graph/unification.js.map +1 -0
- package/src/graph/unignored-directories.d.ts +25 -0
- package/src/graph/unignored-directories.js +89 -0
- package/src/graph/unignored-directories.js.map +1 -0
- package/src/graph/visibility.d.ts +17 -0
- package/src/graph/visibility.js +67 -0
- package/src/graph/visibility.js.map +1 -0
- package/src/graph/warnings.d.ts +38 -0
- package/src/graph/warnings.js +77 -0
- package/src/graph/warnings.js.map +1 -0
- package/src/graph/wasm.d.ts +56 -0
- package/src/graph/wasm.js +77 -0
- package/src/graph/wasm.js.map +1 -0
- package/src/index.d.ts +68 -0
- package/src/index.js +109 -0
- package/src/index.js.map +1 -0
- package/src/release/manifests.d.ts +95 -0
- package/src/release/manifests.js +164 -0
- package/src/release/manifests.js.map +1 -0
- package/src/release/places.d.ts +127 -0
- package/src/release/places.js +368 -0
- package/src/release/places.js.map +1 -0
- package/src/release/publish-cargo.d.ts +177 -0
- package/src/release/publish-cargo.js +351 -0
- package/src/release/publish-cargo.js.map +1 -0
- package/src/release/publish-crates.d.ts +124 -0
- package/src/release/publish-crates.js +242 -0
- package/src/release/publish-crates.js.map +1 -0
- package/src/release/publish-environments.d.ts +50 -0
- package/src/release/publish-environments.js +284 -0
- package/src/release/publish-environments.js.map +1 -0
- package/src/release/publish-messages.d.ts +66 -0
- package/src/release/publish-messages.js +273 -0
- package/src/release/publish-messages.js.map +1 -0
- package/src/release/publish-registry.d.ts +27 -0
- package/src/release/publish-registry.js +135 -0
- package/src/release/publish-registry.js.map +1 -0
- package/src/release/publish-settings.d.ts +26 -0
- package/src/release/publish-settings.js +56 -0
- package/src/release/publish-settings.js.map +1 -0
- package/src/release/publish.d.ts +59 -0
- package/src/release/publish.js +620 -0
- package/src/release/publish.js.map +1 -0
- package/src/release/repository.d.ts +73 -0
- package/src/release/repository.js +219 -0
- package/src/release/repository.js.map +1 -0
- package/src/release/requirements.d.ts +34 -0
- package/src/release/requirements.js +30 -0
- package/src/release/requirements.js.map +1 -0
- package/src/release/toml-edit.d.ts +67 -0
- package/src/release/toml-edit.js +453 -0
- package/src/release/toml-edit.js.map +1 -0
- package/src/release/version-actions.d.ts +133 -0
- package/src/release/version-actions.js +474 -0
- package/src/release/version-actions.js.map +1 -0
- package/src/release/version-checks.d.ts +21 -0
- package/src/release/version-checks.js +151 -0
- package/src/release/version-checks.js.map +1 -0
- package/src/release/version-lockfiles.d.ts +61 -0
- package/src/release/version-lockfiles.js +222 -0
- package/src/release/version-lockfiles.js.map +1 -0
- package/src/tools/napi-cli.d.ts +70 -0
- package/src/tools/napi-cli.js +63 -0
- package/src/tools/napi-cli.js.map +1 -0
- package/src/tools/optional-tools.d.ts +121 -0
- package/src/tools/optional-tools.js +303 -0
- package/src/tools/optional-tools.js.map +1 -0
- package/src/tools/print-napi-cli.d.ts +1 -0
- package/src/tools/print-napi-cli.js +24 -0
- package/src/tools/print-napi-cli.js.map +1 -0
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runBatch = runBatch;
|
|
4
|
+
exports.unreportedProblems = unreportedProblems;
|
|
5
|
+
exports.contextOf = contextOf;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const cargo_invocation_1 = require("./cargo-invocation");
|
|
8
|
+
const groups_1 = require("./groups");
|
|
9
|
+
const group_run_1 = require("./group-run");
|
|
10
|
+
const kept_files_1 = require("./kept-files");
|
|
11
|
+
const stage_1 = require("./stage");
|
|
12
|
+
const staged_run_1 = require("./staged-run");
|
|
13
|
+
const task_1 = require("./task");
|
|
14
|
+
const dotenv_check_1 = require("./dotenv-check");
|
|
15
|
+
const task_env_1 = require("./task-env");
|
|
16
|
+
/**
|
|
17
|
+
* The batch implementation of the plugin's cargo executors (`DES-BATCH`):
|
|
18
|
+
* Nx hands it the tasks of one executor that it runs together, and it
|
|
19
|
+
* reports one result for each of them, each with its own terminal output,
|
|
20
|
+
* as soon as the task's group has run, so that Nx prints it then.
|
|
21
|
+
*
|
|
22
|
+
* Every task first runs the checks that a task run on its own runs before
|
|
23
|
+
* cargo, with its own options, environment and executor context: the
|
|
24
|
+
* warnings of its project and the lines for the options it ignores, the
|
|
25
|
+
* cache guards, the lockfile dependency and the guard of `test` after
|
|
26
|
+
* `build` (`DES-TARGETS`, "Guard"). A task that fails one fails alone,
|
|
27
|
+
* before any cargo command of the batch runs. The others form groups
|
|
28
|
+
* ({@link formGroups}), which run one after another, a group only once the
|
|
29
|
+
* groups of the tasks it depends on have run; a task whose dependency in
|
|
30
|
+
* the batch failed is reported skipped, as Nx skips it outside a batch.
|
|
31
|
+
*
|
|
32
|
+
* Two `build` tasks of one crate whose files lie in one folder fail before
|
|
33
|
+
* any cargo command runs ({@link sharedBuildFolders}). A whole-workspace
|
|
34
|
+
* `build` and every compile of `napi-build` and `wasm-build` build in a
|
|
35
|
+
* stage of their own, from which a `build` moves only its own crates' final
|
|
36
|
+
* artifacts (`DES-BATCH`, "Staged builds"), so that no group writes another
|
|
37
|
+
* task's files and every group runs in this batch.
|
|
38
|
+
*
|
|
39
|
+
* The batch reports every task that it receives ({@link unreportedProblems})
|
|
40
|
+
* and throws for none (`EVD-NX-24-BATCHES`: a throw fails every task of the
|
|
41
|
+
* batch, and a task left out runs again in a new batch process). A failure of its own machinery fails the tasks it
|
|
42
|
+
* concerns, with a message that says so: no task is reported successful
|
|
43
|
+
* without cargo's output showing that its crate passed.
|
|
44
|
+
*
|
|
45
|
+
* @param inputs Each task's options, by task id, as Nx combines them for
|
|
46
|
+
* the task: the target's options, its configuration's and the command line's.
|
|
47
|
+
*/
|
|
48
|
+
// @mara implements DES-BATCH
|
|
49
|
+
// @mara implements REQ-BATCHING
|
|
50
|
+
function runBatch(executor, taskGraph, inputs, context) {
|
|
51
|
+
return tslib_1.__asyncGenerator(this, arguments, function* runBatch_1() {
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
53
|
+
const ids = Object.keys(taskGraph.tasks);
|
|
54
|
+
const reported = new Set();
|
|
55
|
+
const report = (id, result) => {
|
|
56
|
+
var _a;
|
|
57
|
+
reported.add(id);
|
|
58
|
+
// Ended by a newline, as the output of a task run on its own, so that
|
|
59
|
+
// what Nx prints next starts on a line of its own.
|
|
60
|
+
const output = result.terminalOutput;
|
|
61
|
+
return {
|
|
62
|
+
task: id,
|
|
63
|
+
result: Object.assign(Object.assign({}, result), { status: (_a = result.status) !== null && _a !== void 0 ? _a : (result.success ? "success" : "failure"), terminalOutput: output === "" || output.endsWith("\n") ? output : `${output}\n` }),
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
try {
|
|
67
|
+
const started = Date.now();
|
|
68
|
+
// Decided once for the batch, from the batch process's own environment,
|
|
69
|
+
// which Nx copies from the nx command's: never from a task's rebuilt
|
|
70
|
+
// environment, where a crate's .env can disagree with the run
|
|
71
|
+
// (`DES-INVOCATION`, "Printing the command").
|
|
72
|
+
const verbose = (0, cargo_invocation_1.batchRunsVerbosely)(process.env);
|
|
73
|
+
// What the batch shows of cargo while it runs, also decided once from
|
|
74
|
+
// the batch process's own environment, which Nx sets from the style.
|
|
75
|
+
const live = (0, group_run_1.batchLiveOutput)(process.env);
|
|
76
|
+
let environmentOf;
|
|
77
|
+
try {
|
|
78
|
+
if (context.projectGraph === undefined) {
|
|
79
|
+
throw new task_env_1.TaskEnvironmentError("Nx gave the batch no project graph");
|
|
80
|
+
}
|
|
81
|
+
const graph = context.projectGraph;
|
|
82
|
+
environmentOf = (0, task_env_1.taskEnvironments)(context.root, graph, (task) => (0, dotenv_check_1.dotenvDefinitions)(task, graph, context.root).filter((name) => Object.prototype.hasOwnProperty.call(task_env_1.runDependentVariables, name)));
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
if (!(error instanceof task_env_1.TaskEnvironmentError)) {
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
// Without each task's own environment, no task may run in the batch.
|
|
89
|
+
for (const id of ids) {
|
|
90
|
+
yield yield tslib_1.__await(report(id, {
|
|
91
|
+
success: false,
|
|
92
|
+
terminalOutput: `${taskLabel(taskGraph.tasks[id])}: @convesoft/nx-rust cannot rebuild this task's environment in a batch, because ${error.message}. The task does not run, so that Nx stores no result for it. Run the tasks with --batch=false, or use an Nx version that @convesoft/nx-rust supports.`,
|
|
93
|
+
startTime: started,
|
|
94
|
+
endTime: Date.now(),
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
return yield tslib_1.__await(void 0);
|
|
98
|
+
}
|
|
99
|
+
// The checks of every task before any cargo command of the batch runs.
|
|
100
|
+
// Each task is prepared on its own: whatever goes wrong while one is
|
|
101
|
+
// prepared, an unexpected error of the plugin's included, fails that
|
|
102
|
+
// task and no other, as it would fail the task run on its own.
|
|
103
|
+
const ready = new Map();
|
|
104
|
+
for (const id of ids) {
|
|
105
|
+
const task = taskGraph.tasks[id];
|
|
106
|
+
const start = Date.now();
|
|
107
|
+
let head = [];
|
|
108
|
+
try {
|
|
109
|
+
const taskContext = contextOf(task, context);
|
|
110
|
+
head = (0, task_1.projectWarnings)(taskContext);
|
|
111
|
+
refuseReadyUrl(task, context);
|
|
112
|
+
const env = environmentOf(task.projectRoot === undefined
|
|
113
|
+
? Object.assign(Object.assign({}, task), { projectRoot: (_c = (_b = (_a = context.projectsConfigurations) === null || _a === void 0 ? void 0 : _a.projects) === null || _b === void 0 ? void 0 : _b[task.target.project]) === null || _c === void 0 ? void 0 : _c.root }) : task);
|
|
114
|
+
const prepared = (0, task_1.prepareTask)(executor, (_d = inputs[id]) !== null && _d !== void 0 ? _d : {}, taskContext, env);
|
|
115
|
+
ready.set(id, Object.assign(Object.assign({}, prepared), { id, context: taskContext, head: [
|
|
116
|
+
...head,
|
|
117
|
+
...prepared.warnings,
|
|
118
|
+
...(((_e = prepared.testMode) === null || _e === void 0 ? void 0 : _e.note) === undefined ? [] : [prepared.testMode.note]),
|
|
119
|
+
] }));
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
const message = error instanceof task_1.TaskError || error instanceof task_env_1.TaskEnvironmentError
|
|
123
|
+
? error.message
|
|
124
|
+
: [
|
|
125
|
+
`${taskLabel(task)}: @convesoft/nx-rust could not prepare this task in its batch. The task does not run, so that Nx stores no result for it.`,
|
|
126
|
+
error instanceof Error ? ((_f = error.stack) !== null && _f !== void 0 ? _f : error.message) : String(error),
|
|
127
|
+
].join("\n");
|
|
128
|
+
yield yield tslib_1.__await(report(id, {
|
|
129
|
+
success: false,
|
|
130
|
+
terminalOutput: [...head, message].join("\n"),
|
|
131
|
+
startTime: start,
|
|
132
|
+
endTime: Date.now(),
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// Two builds of one crate into one folder, which no stage keeps apart,
|
|
137
|
+
// fail before any cargo command of the batch runs (`DES-BATCH`, "Files
|
|
138
|
+
// that a batch stores").
|
|
139
|
+
const refused = (0, stage_1.sharedBuildFolders)([...ready.values()].filter((task) => task.target === "build").map((task) => task.id), context);
|
|
140
|
+
for (const [id, problem] of refused) {
|
|
141
|
+
const task = ready.get(id);
|
|
142
|
+
ready.delete(id);
|
|
143
|
+
const now = Date.now();
|
|
144
|
+
yield yield tslib_1.__await(report(id, {
|
|
145
|
+
success: false,
|
|
146
|
+
terminalOutput: [...((_g = task === null || task === void 0 ? void 0 : task.head) !== null && _g !== void 0 ? _g : []), problem].join("\n"),
|
|
147
|
+
startTime: now,
|
|
148
|
+
endTime: now,
|
|
149
|
+
}));
|
|
150
|
+
}
|
|
151
|
+
// The groups, in waves of tasks whose dependencies in the batch have run.
|
|
152
|
+
const done = new Map(ids.filter((id) => !ready.has(id)).map((id) => [id, false]));
|
|
153
|
+
const dependencies = (id) => {
|
|
154
|
+
var _a, _b;
|
|
155
|
+
return ((_b = (_a = taskGraph.dependencies) === null || _a === void 0 ? void 0 : _a[id]) !== null && _b !== void 0 ? _b : []).flatMap((edge) => {
|
|
156
|
+
const dependency = typeof edge === "string" ? edge : edge === null || edge === void 0 ? void 0 : edge.id;
|
|
157
|
+
return dependency !== undefined && dependency in taskGraph.tasks ? [dependency] : [];
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
while (done.size < ids.length) {
|
|
161
|
+
const wave = [];
|
|
162
|
+
for (const [id, task] of ready) {
|
|
163
|
+
if (done.has(id)) {
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
const deps = dependencies(id);
|
|
167
|
+
const failed = deps.filter((dependency) => done.get(dependency) === false);
|
|
168
|
+
if (failed.length > 0) {
|
|
169
|
+
done.set(id, false);
|
|
170
|
+
const now = Date.now();
|
|
171
|
+
yield yield tslib_1.__await(report(id, {
|
|
172
|
+
success: false,
|
|
173
|
+
status: "skipped",
|
|
174
|
+
terminalOutput: `${task.task}: not run, because ${failed.join(" and ")}, on which it depends, failed.`,
|
|
175
|
+
startTime: now,
|
|
176
|
+
endTime: now,
|
|
177
|
+
}));
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
if (deps.every((dependency) => done.get(dependency) === true)) {
|
|
181
|
+
wave.push(task);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
if (wave.length === 0 && done.size >= ids.length) {
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
if (wave.length === 0) {
|
|
188
|
+
// Only a cycle, which Nx does not create, leaves tasks here.
|
|
189
|
+
for (const id of ids.filter((id) => !done.has(id))) {
|
|
190
|
+
done.set(id, false);
|
|
191
|
+
const now = Date.now();
|
|
192
|
+
yield yield tslib_1.__await(report(id, {
|
|
193
|
+
success: false,
|
|
194
|
+
terminalOutput: `${taskLabel(taskGraph.tasks[id])}: @convesoft/nx-rust found no order in which the tasks of this batch can run. The task does not run, so that Nx stores no result for it.`,
|
|
195
|
+
startTime: now,
|
|
196
|
+
endTime: now,
|
|
197
|
+
}));
|
|
198
|
+
}
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
// No group writes another task's files (`DES-BATCH`, "Staged
|
|
202
|
+
// builds"), so every group runs in this batch; the whole-workspace
|
|
203
|
+
// groups still come first.
|
|
204
|
+
for (const group of wholeWorkspaceFirst((0, groups_1.planGroups)((0, groups_1.formGroups)(wave)))) {
|
|
205
|
+
for (const entry of yield tslib_1.__await(runReadyGroup(group.tasks, group.selection, context.root, verbose, live))) {
|
|
206
|
+
done.set(entry.task, entry.result.success);
|
|
207
|
+
yield yield tslib_1.__await(report(entry.task, entry.result));
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
// Nx would start a task that the batch leaves unreported again in a new
|
|
212
|
+
// batch process: only a fault of the plugin can leave one.
|
|
213
|
+
const ended = Date.now();
|
|
214
|
+
for (const [id, problem] of unreportedProblems(ids, reported)) {
|
|
215
|
+
yield yield tslib_1.__await(report(id, {
|
|
216
|
+
success: false,
|
|
217
|
+
terminalOutput: `${taskLabel(taskGraph.tasks[id])}: @convesoft/nx-rust ${problem} The task fails without running, so that Nx stores no successful result for it. Run the tasks with --batch=false, and report this as a bug of @convesoft/nx-rust.`,
|
|
218
|
+
startTime: ended,
|
|
219
|
+
endTime: ended,
|
|
220
|
+
}));
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
catch (error) {
|
|
224
|
+
// A failure of the batch's own machinery: every task that has no result
|
|
225
|
+
// yet fails with it, and none is left out.
|
|
226
|
+
const message = error instanceof Error ? ((_h = error.stack) !== null && _h !== void 0 ? _h : error.message) : String(error);
|
|
227
|
+
const now = Date.now();
|
|
228
|
+
for (const id of ids.filter((id) => !reported.has(id))) {
|
|
229
|
+
yield yield tslib_1.__await(report(id, {
|
|
230
|
+
success: false,
|
|
231
|
+
terminalOutput: `${taskLabel(taskGraph.tasks[id])}: @convesoft/nx-rust could not run this task in its batch. The task does not run, so that Nx stores no result for it.\n${message}`,
|
|
232
|
+
startTime: now,
|
|
233
|
+
endTime: now,
|
|
234
|
+
}));
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
// Runs one group: completes its command, runs it and the checks after it,
|
|
240
|
+
// and gives each task its result, a task that failed before cargo included.
|
|
241
|
+
// A failure of the plugin's own code fails every task of the group.
|
|
242
|
+
function runReadyGroup(group, selection, root, verbose, live) {
|
|
243
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
244
|
+
var _a;
|
|
245
|
+
const start = Date.now();
|
|
246
|
+
// A group of one crate says why where its output names it.
|
|
247
|
+
const head = (task) => selection.kind === "alone" && selection.note !== undefined
|
|
248
|
+
? [...task.head, selection.note]
|
|
249
|
+
: task.head;
|
|
250
|
+
try {
|
|
251
|
+
const invocations = (0, task_1.groupInvocations)(group, root, selection);
|
|
252
|
+
const members = [];
|
|
253
|
+
const reports = [];
|
|
254
|
+
group.forEach((task, index) => {
|
|
255
|
+
const invocation = invocations[index];
|
|
256
|
+
if (typeof invocation === "string") {
|
|
257
|
+
reports.push({
|
|
258
|
+
task: task.id,
|
|
259
|
+
result: {
|
|
260
|
+
success: false,
|
|
261
|
+
status: "failure",
|
|
262
|
+
terminalOutput: [...head(task), invocation].join("\n"),
|
|
263
|
+
startTime: start,
|
|
264
|
+
endTime: Date.now(),
|
|
265
|
+
},
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
else {
|
|
269
|
+
members.push({ task, member: { prepared: task, invocation, context: task.context } });
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
// The files that the command's builds store, which the cargo commands
|
|
273
|
+
// of a `test` or `bench` group link again, kept so that they are as the
|
|
274
|
+
// builds left them afterwards (`DES-BATCH`, "Files that a test batch
|
|
275
|
+
// puts back").
|
|
276
|
+
const candidates = (0, kept_files_1.filesToKeep)(members.map(({ member }) => member), members.map(({ task }) => task.id), selection,
|
|
277
|
+
// Any task's context: its task graph is the command's.
|
|
278
|
+
group[0].context);
|
|
279
|
+
const keeping = "problem" in candidates ? candidates : (0, kept_files_1.keepFiles)(candidates.files, candidates.directories);
|
|
280
|
+
if ("problem" in keeping) {
|
|
281
|
+
const end = Date.now();
|
|
282
|
+
for (const { task } of members) {
|
|
283
|
+
reports.push({
|
|
284
|
+
task: task.id,
|
|
285
|
+
result: {
|
|
286
|
+
success: false,
|
|
287
|
+
status: "failure",
|
|
288
|
+
terminalOutput: [...head(task), keptFileMessage(task.task, [keeping.problem])].join("\n"),
|
|
289
|
+
startTime: start,
|
|
290
|
+
endTime: end,
|
|
291
|
+
},
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
return reports;
|
|
295
|
+
}
|
|
296
|
+
// `napi-build` runs its compile with variables of its own and its
|
|
297
|
+
// post-processing after it, and `wasm-build` the wasm-bindgen CLI after
|
|
298
|
+
// its compile (`DES-NAPI`, `DES-WASM`); a whole-workspace `build` and
|
|
299
|
+
// every such compile build in a stage of their own (`DES-BATCH`,
|
|
300
|
+
// "Staged builds").
|
|
301
|
+
let results;
|
|
302
|
+
let restored;
|
|
303
|
+
try {
|
|
304
|
+
results = yield (0, staged_run_1.runTargetGroup)(members.map(({ member }) => member), selection, verbose, live);
|
|
305
|
+
}
|
|
306
|
+
finally {
|
|
307
|
+
restored = (0, kept_files_1.putBack)(keeping.keeping);
|
|
308
|
+
}
|
|
309
|
+
const end = Date.now();
|
|
310
|
+
const { problems, warning } = restored;
|
|
311
|
+
const failed = problems.length > 0;
|
|
312
|
+
members.forEach(({ task }, index) => {
|
|
313
|
+
const { success, output } = results[index];
|
|
314
|
+
reports.push({
|
|
315
|
+
task: task.id,
|
|
316
|
+
result: {
|
|
317
|
+
success: success && !failed,
|
|
318
|
+
status: success && !failed ? "success" : "failure",
|
|
319
|
+
terminalOutput: [
|
|
320
|
+
...head(task),
|
|
321
|
+
...(output === "" ? [] : [output]),
|
|
322
|
+
...(failed ? [keptFileMessage(task.task, problems)] : []),
|
|
323
|
+
...(warning === undefined ? [] : [`${task.task}: warning: ${warning}.`]),
|
|
324
|
+
].join("\n"),
|
|
325
|
+
startTime: start,
|
|
326
|
+
endTime: end,
|
|
327
|
+
},
|
|
328
|
+
});
|
|
329
|
+
});
|
|
330
|
+
return reports;
|
|
331
|
+
}
|
|
332
|
+
catch (error) {
|
|
333
|
+
const message = error instanceof Error ? ((_a = error.stack) !== null && _a !== void 0 ? _a : error.message) : String(error);
|
|
334
|
+
const end = Date.now();
|
|
335
|
+
return group.map((task) => ({
|
|
336
|
+
task: task.id,
|
|
337
|
+
result: {
|
|
338
|
+
success: false,
|
|
339
|
+
status: "failure",
|
|
340
|
+
terminalOutput: [
|
|
341
|
+
...head(task),
|
|
342
|
+
`${task.task}: @convesoft/nx-rust could not run the cargo command of this task's group. The task does not run, so that Nx stores no result for it.`,
|
|
343
|
+
message,
|
|
344
|
+
].join("\n"),
|
|
345
|
+
startTime: start,
|
|
346
|
+
endTime: end,
|
|
347
|
+
},
|
|
348
|
+
}));
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* The message of a task whose `test` or `bench` group could not keep, or
|
|
354
|
+
* put back, the files that the command's builds store (`DES-BATCH`, "Files
|
|
355
|
+
* that a test batch puts back"; `DES-DIAGNOSTICS`).
|
|
356
|
+
*/
|
|
357
|
+
// @mara implements DES-DIAGNOSTICS
|
|
358
|
+
function keptFileMessage(task, problems) {
|
|
359
|
+
return `${task}: @convesoft/nx-rust ${problems.join("; ")}. The cargo commands of this task's group link again the files that builds of this command store, and the plugin keeps those files in a stage of the artifact directory and puts them back when the group ends, so that tasks that depend on the builds read what Nx stored for them; where it cannot, the tasks of the group fail. Check that the artifact directory can be written to and has space, and run the command again.`;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Fails a task of a batch, before cargo runs, where Nx gives the task run on
|
|
363
|
+
* its own an environment that a batch cannot give it (`DES-BATCH`): where an
|
|
364
|
+
* edge that waits for readiness (`waitFor: "ready"`) leads to a continuous
|
|
365
|
+
* task whose `readyWhen` reports ready by `signal`, the one check that
|
|
366
|
+
* reports a URL, which Nx then gives the task run on its own as
|
|
367
|
+
* `NX_READY_URL` and tells a batch nothing of (`EVD-NX-24-BATCHES`,
|
|
368
|
+
* "Continuous tasks"). Its tests could then pass or skip on a missing URL
|
|
369
|
+
* under the key that a run on its own fills in. Every other continuous
|
|
370
|
+
* dependency gives the task run on its own nothing that a batch lacks, and
|
|
371
|
+
* runs in the batch. The maintainer chose this on 15 November 2026.
|
|
372
|
+
*
|
|
373
|
+
* @throws {TaskError} Naming the producers and how to run the task on its
|
|
374
|
+
* own, for one command and for the repository (`DES-DIAGNOSTICS`).
|
|
375
|
+
*/
|
|
376
|
+
// @mara implements DES-BATCH
|
|
377
|
+
// @mara implements DES-DIAGNOSTICS
|
|
378
|
+
function refuseReadyUrl(task, context) {
|
|
379
|
+
const producers = context.taskGraph === undefined || context.projectGraph === undefined
|
|
380
|
+
? []
|
|
381
|
+
: (0, task_env_1.readyUrlProducers)(task.id, context.taskGraph, context.projectGraph);
|
|
382
|
+
if (producers.length === 0) {
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
const named = producers.join(" and ");
|
|
386
|
+
throw new task_1.TaskError(`${taskLabel(task)}: this task waits for ${named} to be ready, and ${producers.length === 1 ? "that continuous task reports" : "those continuous tasks report"} ready by signal (readyWhen: { "signal": true }), so Nx gives the task NX_READY_URL when it runs on its own, which a batch cannot give it. The task does not run in this batch, so that Nx stores no result for it under an environment that differs from the one a run on its own has. Run the command with --batch=false, or, to run every task of the repository on its own, set NX_BATCH_MODE=false in the root .env; that turns batching off for every task, of @convesoft/nx-rust and of every other plugin.`);
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* The groups of a wave with those that select the whole workspace first,
|
|
390
|
+
* each kind in the order in which they were formed, so that a group of one
|
|
391
|
+
* crate writes its crate's files after the whole-workspace group that
|
|
392
|
+
* writes them too (`DES-BATCH`, "Files that a batch stores").
|
|
393
|
+
*/
|
|
394
|
+
function wholeWorkspaceFirst(groups) {
|
|
395
|
+
return [
|
|
396
|
+
...groups.filter((group) => group.selection.kind === "workspace"),
|
|
397
|
+
...groups.filter((group) => group.selection.kind !== "workspace"),
|
|
398
|
+
];
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* The tasks that a batch did not report as it ends, each with the reason
|
|
402
|
+
* (`DES-BATCH`, "Every task in the batch that receives it"). Nx 24 runs
|
|
403
|
+
* again, in a new batch process, every task that a batch does not report,
|
|
404
|
+
* for as long as the batch leaves it out (`EVD-NX-24-BATCHES`, "Tasks left
|
|
405
|
+
* out"). The batch reports every task that it receives, so only a fault of
|
|
406
|
+
* the plugin leaves one; the batch then fails it instead of having Nx start
|
|
407
|
+
* it again, perhaps without end.
|
|
408
|
+
*
|
|
409
|
+
* @param ids The tasks of the batch.
|
|
410
|
+
* @param reported The tasks for which the batch has reported a result.
|
|
411
|
+
* @returns The reason for each task that has to fail, by task id, in the
|
|
412
|
+
* order of `ids`; empty where the batch reported every task.
|
|
413
|
+
*/
|
|
414
|
+
// @mara implements DES-BATCH
|
|
415
|
+
// @mara implements DES-DIAGNOSTICS
|
|
416
|
+
function unreportedProblems(ids, reported) {
|
|
417
|
+
return new Map(ids
|
|
418
|
+
.filter((id) => !reported.has(id))
|
|
419
|
+
.map((id) => [id, "ended this batch without a result for this task."]));
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* The executor context of one task of a batch, as Nx gives it to the task
|
|
423
|
+
* run on its own: the batch's context, whose task graph is the whole one,
|
|
424
|
+
* with the task's project, target, configuration and target configuration.
|
|
425
|
+
*/
|
|
426
|
+
function contextOf(task, context) {
|
|
427
|
+
var _a, _b, _c, _d;
|
|
428
|
+
const { project, target, configuration } = task.target;
|
|
429
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({}, context), { projectName: project, targetName: target }), (configuration === undefined ? {} : { configurationName: configuration })), { target: (_d = (_c = (_b = (_a = context.projectsConfigurations) === null || _a === void 0 ? void 0 : _a.projects) === null || _b === void 0 ? void 0 : _b[project]) === null || _c === void 0 ? void 0 : _c.targets) === null || _d === void 0 ? void 0 : _d[target] });
|
|
430
|
+
}
|
|
431
|
+
function taskLabel(task) {
|
|
432
|
+
return task === undefined ? "?" : `${task.target.project}:${task.target.target}`;
|
|
433
|
+
}
|
|
434
|
+
//# sourceMappingURL=batch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../../../nx-rust/src/executors/batch.ts"],"names":[],"mappings":";;AAwFA,4BA0NC;AAuMD,gDASC;AAOD,8BASC;;AAjhBD,yDAAwD;AAExD,qCAAuE;AACvE,2CAAiF;AACjF,6CAA+D;AAC/D,mCAA6C;AAC7C,6CAA8C;AAC9C,iCAOgB;AAChB,iDAAmD;AACnD,yCAKoB;AAgCpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,6BAA6B;AAC7B,gCAAgC;AAChC,SAAuB,QAAQ,CAC7B,Q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-0,0 +1,110 @@
|
|
|
1
|
+
import { type PickedTriples } from "../cargo/target-triples";
|
|
2
|
+
import { type BuildRecordSource } from "../graph/build-records";
|
|
3
|
+
/** What a `build` task's options say about the cargo call, as far as the records depend on it. */
|
|
4
|
+
export interface BuildSelection {
|
|
5
|
+
/** `--features`: features of the crate, or `<package>/<feature>` entries, each possibly a list. */
|
|
6
|
+
features?: readonly string[];
|
|
7
|
+
/** `--all-features`. */
|
|
8
|
+
allFeatures?: boolean;
|
|
9
|
+
/** `--no-default-features`. */
|
|
10
|
+
noDefaultFeatures?: boolean;
|
|
11
|
+
/** `--profile`; the default profile `dev` where absent. */
|
|
12
|
+
profile?: string;
|
|
13
|
+
/** `--target`. */
|
|
14
|
+
targetTriple?: string;
|
|
15
|
+
}
|
|
16
|
+
/** A dependency file that `cargo build -p <crate>` exports for one of the crate's targets. */
|
|
17
|
+
export interface NamedRecord {
|
|
18
|
+
/** The absolute path of the record. */
|
|
19
|
+
path: string;
|
|
20
|
+
/** Whether it belongs to the crate's library or to one of its binaries. */
|
|
21
|
+
kind: "library" | "binary";
|
|
22
|
+
/** The name of the library or binary. */
|
|
23
|
+
target: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The folder that cargo gives a profile's artifacts: `debug` for `dev` and
|
|
27
|
+
* `test`, `release` for `release` and `bench`, and the profile's own name for
|
|
28
|
+
* any other, also one that inherits from those four.
|
|
29
|
+
*/
|
|
30
|
+
export declare function profileFolder(profile: string | undefined): string;
|
|
31
|
+
/**
|
|
32
|
+
* The features of the crate that a selection turns on, as cargo resolves
|
|
33
|
+
* them: all of them with `--all-features`, otherwise `default` unless
|
|
34
|
+
* `--no-default-features`, and those that `--features` names, a
|
|
35
|
+
* `<package>/<feature>` entry for the crate itself included; then, to any
|
|
36
|
+
* depth, what each turned-on feature turns on. A plain entry turns on the
|
|
37
|
+
* feature it names. A `<dependency>/<feature>` entry also turns on the
|
|
38
|
+
* crate's feature of the dependency's name where the dependency is
|
|
39
|
+
* optional, as cargo does for the implicit feature of an optional
|
|
40
|
+
* dependency; `dep:<name>` and the weak `<dependency>?/<feature>` turn on
|
|
41
|
+
* no feature of the crate. An optional dependency that a platform limits
|
|
42
|
+
* counts as required, since cargo matches it only on that platform: a binary
|
|
43
|
+
* that only it would turn on then stays unnamed and unchecked rather than
|
|
44
|
+
* read from a record that cargo may not have written.
|
|
45
|
+
*
|
|
46
|
+
* @param optionalDependencies The names under which the crate lists its
|
|
47
|
+
* optional dependencies that no platform limits.
|
|
48
|
+
*/
|
|
49
|
+
export declare function enabledFeatures(packageName: string, table: Readonly<Record<string, readonly string[]>>, selection: BuildSelection, optionalDependencies?: readonly string[]): Set<string>;
|
|
50
|
+
/**
|
|
51
|
+
* The triples that the call builds for (`DES-BUILD-INPUT-CHECK`, point 1):
|
|
52
|
+
* the task's own triple, or else those that `build.target` in the
|
|
53
|
+
* configuration files that cargo reads in `workspaceRoot` and
|
|
54
|
+
* `CARGO_BUILD_TARGET` in the task's environment pick, read as for the
|
|
55
|
+
* outputs of `build` ({@link pickedTriples}, `DES-OUTPUTS`). Where `host`
|
|
56
|
+
* is given, `host-tuple`, in the option or the configuration, stands for
|
|
57
|
+
* it, as cargo replaces it.
|
|
58
|
+
*/
|
|
59
|
+
export declare function callTriples(selection: BuildSelection, env: Readonly<Record<string, string | undefined>>, workspaceRoot: string, host?: string): PickedTriples;
|
|
60
|
+
/**
|
|
61
|
+
* The records that `cargo build -p <crate>` exports for a call with this
|
|
62
|
+
* selection, named from what graph creation reported, without asking cargo
|
|
63
|
+
* (`DES-BUILD-INPUT-CHECK`, point 1): those of {@link libraryRecordNames}
|
|
64
|
+
* for the library and
|
|
65
|
+
* `<name>.d` for each binary whose required features are all features of the
|
|
66
|
+
* crate that the selection turns on ({@link enabledFeatures}), in `<artifact directory>/<profile folder>`,
|
|
67
|
+
* or in `<artifact directory>/<triple>/<profile folder>` for each triple that
|
|
68
|
+
* the call builds for ({@link callTriples}); a proc macro's library record
|
|
69
|
+
* stays in the profile folder whatever the triple. For an empty list of
|
|
70
|
+
* triples, cargo builds nothing, and no record is named.
|
|
71
|
+
*
|
|
72
|
+
* Left out are the records it cannot name with certainty (point 2): one whose
|
|
73
|
+
* name a target of another crate with the same artifact directory shares,
|
|
74
|
+
* and, where the configuration or the environment picks a triple whose
|
|
75
|
+
* folder the plugin cannot name, one whose folder depends on the triple
|
|
76
|
+
* while a record of the same name lies in any
|
|
77
|
+
* `<artifact directory>/<folder>/<profile folder>`, since the call's records
|
|
78
|
+
* may then lie there.
|
|
79
|
+
*
|
|
80
|
+
* @param artifactDirectory The absolute path of Cargo's artifact directory.
|
|
81
|
+
* @param workspaceRoot The absolute path of the workspace root, where cargo ran.
|
|
82
|
+
*/
|
|
83
|
+
export declare function nameRecords(source: BuildRecordSource, packageName: string, selection: BuildSelection, env: Readonly<Record<string, string | undefined>>, artifactDirectory: string, workspaceRoot: string): NamedRecord[];
|
|
84
|
+
/**
|
|
85
|
+
* One rule of a record: the artifact it describes and the paths that cargo
|
|
86
|
+
* would rebuild it for, unescaped.
|
|
87
|
+
*/
|
|
88
|
+
export interface RecordRule {
|
|
89
|
+
/** The artifact, as the record spells it. */
|
|
90
|
+
target: string;
|
|
91
|
+
/** The paths it depends on, as the record spells them. */
|
|
92
|
+
paths: string[];
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The rules of a record in Makefile syntax, as cargo writes it
|
|
96
|
+
* (`DES-BUILD-INPUT-CHECK`, point 3): `<artifact>: <path> <path> ...`, with a
|
|
97
|
+
* space inside a path escaped by a backslash. A line without a target is
|
|
98
|
+
* skipped, and so is a comment.
|
|
99
|
+
*/
|
|
100
|
+
export declare function parseRecord(text: string): RecordRule[];
|
|
101
|
+
/**
|
|
102
|
+
* The records that cargo exports for a library with these crate types built
|
|
103
|
+
* for `triple`, `undefined` for the host (`DES-BUILD-INPUT-CHECK`, point 1):
|
|
104
|
+
* `lib<name>.d`, and for a `cdylib` built for a wasm triple, whose file is
|
|
105
|
+
* `<name>.wasm` without the `lib` prefix, `<name>.d` in its place, beside
|
|
106
|
+
* `lib<name>.d` where the library has another crate type as well, as cargo
|
|
107
|
+
* 1.100.0 writes them for `wasm32-unknown-unknown` (`EVD-WASM-POSTPROCESS`).
|
|
108
|
+
* A graph that recorded no crate types names `lib<name>.d`.
|
|
109
|
+
*/
|
|
110
|
+
export declare function libraryRecordNames(name: string, crateTypes: readonly string[] | undefined, triple: string | undefined): string[];
|