@convesoft/nx-rust 0.0.0-stage → 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 +48 -2
- package/executors.json +35 -0
- package/generators.json +19 -0
- package/package.json +26 -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,535 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.attributeText = attributeText;
|
|
4
|
+
exports.notCompiled = notCompiled;
|
|
5
|
+
exports.failStopped = failStopped;
|
|
6
|
+
exports.readTestsBuildStep = readTestsBuildStep;
|
|
7
|
+
exports.readTestBinariesStep = readTestBinariesStep;
|
|
8
|
+
exports.readDoctestStep = readDoctestStep;
|
|
9
|
+
exports.splitLines = splitLines;
|
|
10
|
+
const node_fs_1 = require("node:fs");
|
|
11
|
+
const node_path_1 = require("node:path");
|
|
12
|
+
const cargo_output_1 = require("./cargo-output");
|
|
13
|
+
/**
|
|
14
|
+
* Splits text output into blocks that each start with a line of
|
|
15
|
+
* {@link startsBlock}, the lines before the first being a block of their own,
|
|
16
|
+
* and gives each to the crates it concerns: a block whose first line or a
|
|
17
|
+
* location line (` --> path:line:col`) names a crate of the group goes to that
|
|
18
|
+
* crate; one that concerns only a member outside the group is left out,
|
|
19
|
+
* unless it is an error, which can explain a failure and goes to every
|
|
20
|
+
* crate; every other block goes to every crate.
|
|
21
|
+
*/
|
|
22
|
+
function attributeText(lines, crates, scope) {
|
|
23
|
+
const outside = (0, cargo_output_1.outsideMembers)(crates, scope);
|
|
24
|
+
const parts = crates.map(() => []);
|
|
25
|
+
const blocks = [];
|
|
26
|
+
for (const line of lines) {
|
|
27
|
+
if (blocks.length === 0 || (0, cargo_output_1.startsBlock)(line)) {
|
|
28
|
+
blocks.push([line]);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
blocks[blocks.length - 1].push(line);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const folders = crates.map((crate) => crate.package === undefined ? undefined : (0, node_path_1.resolve)(crate.package.manifest_path, ".."));
|
|
35
|
+
for (const block of blocks) {
|
|
36
|
+
const [header] = block;
|
|
37
|
+
const owner = blockOwner(block, crates, folders, scope);
|
|
38
|
+
if (owner !== undefined) {
|
|
39
|
+
parts[owner].push(...block);
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
const location = block
|
|
43
|
+
.map((line) => { var _a; return (_a = /^\s*-->\s+(.+?):\d+:\d+$/.exec((0, cargo_output_1.plainLine)(line))) === null || _a === void 0 ? void 0 : _a[1]; })
|
|
44
|
+
.find((path) => path !== undefined);
|
|
45
|
+
const outsideOnly = outside.ownsLine(header) ||
|
|
46
|
+
(location !== undefined && outside.atPath(location) !== undefined);
|
|
47
|
+
if (outsideOnly && !(0, cargo_output_1.plainLine)(header).startsWith("error")) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
for (const part of parts) {
|
|
51
|
+
part.push(...block);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return parts;
|
|
55
|
+
}
|
|
56
|
+
// The crate of the group that a block of text concerns alone, if any.
|
|
57
|
+
function blockOwner(block, crates, folders, scope) {
|
|
58
|
+
var _a, _b, _c, _d;
|
|
59
|
+
const [header] = block;
|
|
60
|
+
const status = /^\s*[A-Z][a-z]+ (\S+) v\S+ \(([^)]+)\)/.exec((0, cargo_output_1.plainLine)(header));
|
|
61
|
+
if (status !== null) {
|
|
62
|
+
const index = crates.findIndex((crate, at) => crate.name === status[1] && folders[at] === (0, node_path_1.resolve)(status[2]));
|
|
63
|
+
return index === -1 ? undefined : index;
|
|
64
|
+
}
|
|
65
|
+
const named = (_b = (_a = /^error: could not compile `([^`]+)`/.exec((0, cargo_output_1.plainLine)(header))) !== null && _a !== void 0 ? _a : /^warning: `([^`]+)` \(/.exec((0, cargo_output_1.plainLine)(header))) !== null && _b !== void 0 ? _b : /^error: failed to run custom build command for `(\S+) v/.exec((0, cargo_output_1.plainLine)(header));
|
|
66
|
+
if (named !== null) {
|
|
67
|
+
const index = crates.findIndex((crate) => crate.name === named[1]);
|
|
68
|
+
return index === -1 ? undefined : index;
|
|
69
|
+
}
|
|
70
|
+
const location = block
|
|
71
|
+
.map((line) => { var _a; return (_a = /^\s*-->\s+(.+?):\d+:\d+$/.exec((0, cargo_output_1.plainLine)(line))) === null || _a === void 0 ? void 0 : _a[1]; })
|
|
72
|
+
.find((path) => path !== undefined);
|
|
73
|
+
if (location === undefined) {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
const file = (0, node_path_1.resolve)((_c = scope === null || scope === void 0 ? void 0 : scope.root) !== null && _c !== void 0 ? _c : ".", location);
|
|
77
|
+
// The deepest folder of a crate of the group that holds the file.
|
|
78
|
+
let best;
|
|
79
|
+
folders.forEach((folder, index) => {
|
|
80
|
+
if (folder !== undefined &&
|
|
81
|
+
(file.startsWith(`${folder}/`) || file === folder) &&
|
|
82
|
+
(best === undefined || folder.length > folders[best].length)) {
|
|
83
|
+
best = index;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
if (best === undefined) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
// A member nested in the crate's folder holds the file instead.
|
|
90
|
+
const nested = ((_d = scope === null || scope === void 0 ? void 0 : scope.members) !== null && _d !== void 0 ? _d : []).some((member) => {
|
|
91
|
+
const folder = (0, node_path_1.resolve)(member.manifest_path, "..");
|
|
92
|
+
return (folder.length > folders[best].length &&
|
|
93
|
+
(file.startsWith(`${folder}/`) || file === folder));
|
|
94
|
+
});
|
|
95
|
+
return nested ? undefined : best;
|
|
96
|
+
}
|
|
97
|
+
/** The crates that cargo's text says did not compile, each once, in order. */
|
|
98
|
+
function notCompiled(lines) {
|
|
99
|
+
return [
|
|
100
|
+
...new Set(lines.flatMap((line) => {
|
|
101
|
+
var _a, _b, _c;
|
|
102
|
+
const name = (_b = (_a = /^error: could not compile `([^`]+)`/.exec((0, cargo_output_1.plainLine)(line))) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : (_c = /^error: failed to run custom build command for `(\S+) v/.exec((0, cargo_output_1.plainLine)(line))) === null || _c === void 0 ? void 0 : _c[1];
|
|
103
|
+
return name === undefined ? [] : [name];
|
|
104
|
+
})),
|
|
105
|
+
];
|
|
106
|
+
}
|
|
107
|
+
// The crates that did not compile, as a message names them: each in
|
|
108
|
+
// backquotes, and those outside the group marked as such.
|
|
109
|
+
function describeNotCompiled(names, outsideNames) {
|
|
110
|
+
return (0, cargo_output_1.describeList)(names.map((name) => outsideNames.has(name)
|
|
111
|
+
? `\`${name}\`, which is outside the selection of this run (under workspace-build, cargo test compiles the tests and libraries of every crate of the workspace)`
|
|
112
|
+
: `\`${name}\``));
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Fails every crate because a test step stopped before any test ran, with a
|
|
116
|
+
* message that names the crates that did not compile, `what` being the
|
|
117
|
+
* command, and says which of them are outside the group (`DES-BATCH`, "Test
|
|
118
|
+
* runs").
|
|
119
|
+
*/
|
|
120
|
+
function failStopped(crates, parts, names, outsideNames, what) {
|
|
121
|
+
return crates.map((crate, index) => {
|
|
122
|
+
var _a;
|
|
123
|
+
return ({
|
|
124
|
+
passed: false,
|
|
125
|
+
output: (_a = parts[index]) !== null && _a !== void 0 ? _a : "",
|
|
126
|
+
message: names.length === 0
|
|
127
|
+
? `${crate.task}: ${what} failed before any test ran, and its output names no crate that did not compile, so it does not show that the tests of ${crate.name} passed.`
|
|
128
|
+
: `${crate.task}: the tests of ${crate.name} were not run: ${what} stopped before running any test, because ${describeNotCompiled(names, outsideNames)} did not compile. The tests of every crate of this run's group were not run. Fix the crate that does not compile and run the tasks again.`,
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Reads the build step of `test` under `workspace-build`, `cargo test
|
|
134
|
+
* --workspace --no-run` (`DES-TEST-RUN`, "Under `workspace-build`"): every
|
|
135
|
+
* crate passes the step where cargo exits with status 0, and every crate
|
|
136
|
+
* fails otherwise, since a compile error stops the step and no test can run;
|
|
137
|
+
* the message names the crates that did not compile, says which of them are
|
|
138
|
+
* outside the selection, and that the tests of the others were not run
|
|
139
|
+
* (`DES-BATCH`, "Test runs"). Each crate's output holds the compiler's
|
|
140
|
+
* messages about it and those that the output does not attribute to one
|
|
141
|
+
* crate ({@link attributeText}).
|
|
142
|
+
*/
|
|
143
|
+
// @mara implements DES-TEST-RUN
|
|
144
|
+
// @mara implements DES-BATCH
|
|
145
|
+
function readTestsBuildStep(output, end, crates, scope) {
|
|
146
|
+
var _a;
|
|
147
|
+
const lines = splitLines(output);
|
|
148
|
+
const parts = attributeText(lines.filter((line) => !/^\s+Executable /.test((0, cargo_output_1.plainLine)(line))), crates, scope);
|
|
149
|
+
// Cargo names each test executable that it built: a crate's output keeps
|
|
150
|
+
// the lines of the executables that its targets could have built.
|
|
151
|
+
for (const line of lines) {
|
|
152
|
+
const file = (_a = /^\s+Executable .*\(([^()]+)\)$/.exec((0, cargo_output_1.plainLine)(line))) === null || _a === void 0 ? void 0 : _a[1];
|
|
153
|
+
if (file === undefined) {
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
const stem = (0, node_path_1.basename)(file)
|
|
157
|
+
.replace(/\.exe$/, "")
|
|
158
|
+
.replace(/-[0-9a-f]{16}$/, "");
|
|
159
|
+
const owners = crates.flatMap((crate, index) => {
|
|
160
|
+
var _a, _b;
|
|
161
|
+
return ((_b = (_a = crate.package) === null || _a === void 0 ? void 0 : _a.targets) !== null && _b !== void 0 ? _b : []).some((target) => target.name.replace(/-/g, "_") === stem)
|
|
162
|
+
? [index]
|
|
163
|
+
: [];
|
|
164
|
+
});
|
|
165
|
+
for (const index of owners) {
|
|
166
|
+
parts[index].push(line);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
const texts = parts.map((part) => part.join("\n"));
|
|
170
|
+
return testsBuildOutcomes(texts, lines, end, crates, scope);
|
|
171
|
+
}
|
|
172
|
+
// What the build step's end shows for each crate, with its output.
|
|
173
|
+
function testsBuildOutcomes(parts, lines, end, crates, scope) {
|
|
174
|
+
if (end.kind === "succeeded") {
|
|
175
|
+
return crates.map((_, index) => ({ passed: true, output: parts[index] }));
|
|
176
|
+
}
|
|
177
|
+
if (end.kind === "unexplained") {
|
|
178
|
+
return (0, cargo_output_1.failEvery)(crates, parts, end.reason);
|
|
179
|
+
}
|
|
180
|
+
return failStopped(crates, parts, notCompiled(lines), (0, cargo_output_1.outsideMembers)(crates, scope).names, "cargo test --no-run");
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Reads the test binaries' step under `workspace-build` (`DES-TEST-RUN`,
|
|
184
|
+
* "Evidence for test binaries"), from cargo's JSON messages, the selecting
|
|
185
|
+
* runner's record and cargo's exit status only, never from a line that cargo
|
|
186
|
+
* writes for people or that a test writes.
|
|
187
|
+
*
|
|
188
|
+
* Every `compiler-artifact` message with `executable` and `profile.test`
|
|
189
|
+
* anywhere in the output, where a line holds `{"reason":`, adds an expected
|
|
190
|
+
* test executable of its `package_id`, so that a line that is not cargo's
|
|
191
|
+
* can add an expectation and never remove one. Every crate fails where cargo
|
|
192
|
+
* ended in a way that the reading cannot explain, where such a line is no
|
|
193
|
+
* JSON message, where a `build-finished` message reports a failure or none
|
|
194
|
+
* appears, where a test executable belongs to no member, where the record
|
|
195
|
+
* folder cannot be read or holds an error entry or a malformed line, and
|
|
196
|
+
* where cargo failed while no record explains it. Otherwise a crate passes
|
|
197
|
+
* only where every expected executable of its package has exactly one
|
|
198
|
+
* record, of that program by real path and of its package, ending with the
|
|
199
|
+
* status 0, and no record of its package ends otherwise.
|
|
200
|
+
*
|
|
201
|
+
* Each crate's output holds the output after cargo's `Running` line for one
|
|
202
|
+
* of its executables, which the JSON names, and the lines that the output
|
|
203
|
+
* does not attribute to one crate; the `Running` lines of the executables of
|
|
204
|
+
* other members, which the runner skipped, are left out.
|
|
205
|
+
*/
|
|
206
|
+
// @mara implements DES-TEST-RUN
|
|
207
|
+
// @mara implements DES-BATCH
|
|
208
|
+
// @mara implements DES-DIAGNOSTICS
|
|
209
|
+
function readTestBinariesStep(output, end, crates, scope, record, runner) {
|
|
210
|
+
var _a;
|
|
211
|
+
const lines = splitLines(output);
|
|
212
|
+
const messages = [];
|
|
213
|
+
let malformed;
|
|
214
|
+
for (const line of lines) {
|
|
215
|
+
const at = line.indexOf('{"reason":');
|
|
216
|
+
if (at === -1) {
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
try {
|
|
220
|
+
messages.push(JSON.parse(line.slice(at)));
|
|
221
|
+
}
|
|
222
|
+
catch (_b) {
|
|
223
|
+
malformed !== null && malformed !== void 0 ? malformed : (malformed = line);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
const memberIds = new Set(scope.members.map((member) => member.id));
|
|
227
|
+
const executables = messages.filter((message) => {
|
|
228
|
+
var _a;
|
|
229
|
+
return message.reason === "compiler-artifact" &&
|
|
230
|
+
typeof message.executable === "string" &&
|
|
231
|
+
message.executable !== "" &&
|
|
232
|
+
((_a = message.profile) === null || _a === void 0 ? void 0 : _a.test) === true;
|
|
233
|
+
});
|
|
234
|
+
const parts = attributeTestBinaries(lines, crates, scope, executables);
|
|
235
|
+
const texts = parts.map((part) => part.join("\n"));
|
|
236
|
+
if (end.kind === "unexplained") {
|
|
237
|
+
return (0, cargo_output_1.failEvery)(crates, texts, end.reason);
|
|
238
|
+
}
|
|
239
|
+
if (malformed !== undefined) {
|
|
240
|
+
return (0, cargo_output_1.failEvery)(crates, texts, `a line of the test binaries' step that holds a JSON message of cargo is cut short or malformed: ${JSON.stringify(malformed)}`);
|
|
241
|
+
}
|
|
242
|
+
const finished = messages.filter((message) => message.reason === "build-finished");
|
|
243
|
+
if (finished.some((message) => message.success !== true)) {
|
|
244
|
+
return failStopped(crates, texts, notCompiled(lines), (0, cargo_output_1.outsideMembers)(crates, scope).names, "cargo test");
|
|
245
|
+
}
|
|
246
|
+
if (finished.length === 0) {
|
|
247
|
+
return (0, cargo_output_1.failEvery)(crates, texts, "cargo's JSON messages of the test binaries' step hold no build-finished, which cargo prints when the build has ended");
|
|
248
|
+
}
|
|
249
|
+
const stranger = executables.find((message) => { var _a; return !memberIds.has((_a = message.package_id) !== null && _a !== void 0 ? _a : ""); });
|
|
250
|
+
if (stranger !== undefined) {
|
|
251
|
+
return (0, cargo_output_1.failEvery)(crates, texts, `cargo named the test executable ${stranger.executable} of ${JSON.stringify((_a = stranger.package_id) !== null && _a !== void 0 ? _a : null)}, which is no member of the workspace, while cargo runs the tests of members only`);
|
|
252
|
+
}
|
|
253
|
+
if ("unreadable" in record) {
|
|
254
|
+
return (0, cargo_output_1.failEvery)(crates, texts, `the record of @convesoft/nx-rust's test runner cannot be read: ${record.unreadable}`);
|
|
255
|
+
}
|
|
256
|
+
const broken = record.records.find((entry) => entry.malformed !== undefined || entry.start === undefined);
|
|
257
|
+
if (broken !== undefined) {
|
|
258
|
+
return (0, cargo_output_1.failEvery)(crates, texts, `the record ${broken.file} of @convesoft/nx-rust's test runner is malformed${broken.malformed === undefined ? "" : `: ${JSON.stringify(broken.malformed)}`}`);
|
|
259
|
+
}
|
|
260
|
+
const errors = record.records.flatMap((entry) => entry.after.flatMap((item) => ("error" in item ? [item.error] : [])));
|
|
261
|
+
if (errors.length > 0) {
|
|
262
|
+
return (0, cargo_output_1.failEvery)(crates, texts, `@convesoft/nx-rust's test runner refused to run a test executable: ${[...new Set(errors)].join("; ")}`);
|
|
263
|
+
}
|
|
264
|
+
const real = (path) => {
|
|
265
|
+
try {
|
|
266
|
+
return (0, node_fs_1.realpathSync)(path);
|
|
267
|
+
}
|
|
268
|
+
catch (_a) {
|
|
269
|
+
return (0, node_path_1.resolve)(path);
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
const records = record.records.map((entry) => (Object.assign(Object.assign({}, entry), { real: real(entry.start.program) })));
|
|
273
|
+
const ended = (entry) => { var _a; return (_a = entry.after.find((item) => "end" in item)) === null || _a === void 0 ? void 0 : _a.end; };
|
|
274
|
+
const recordFailed = (entry) => {
|
|
275
|
+
const last = ended(entry);
|
|
276
|
+
return (!entry.after.some((item) => "skip" in item) &&
|
|
277
|
+
(last === undefined || !("status" in last) || last.status !== 0));
|
|
278
|
+
};
|
|
279
|
+
const outcomes = crates.map((crate, index) => {
|
|
280
|
+
const expected = [
|
|
281
|
+
...new Set(executables
|
|
282
|
+
.filter((message) => message.package_id === crate.spec)
|
|
283
|
+
.map((message) => real(message.executable))),
|
|
284
|
+
];
|
|
285
|
+
const problems = [];
|
|
286
|
+
for (const executable of expected) {
|
|
287
|
+
const own = records.filter((entry) => entry.real === executable);
|
|
288
|
+
if (own.length === 0) {
|
|
289
|
+
problems.push(`${executable} has no record, so it never ran through the runner`);
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
if (own.length > 1) {
|
|
293
|
+
problems.push(`${executable} has ${own.length} records, where it should have one`);
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
const [only] = own;
|
|
297
|
+
const recordedPackage = only.start.package;
|
|
298
|
+
if (recordedPackage !== crate.name) {
|
|
299
|
+
problems.push(`the record of ${executable} names the package ${JSON.stringify(recordedPackage)}, not ${crate.name}`);
|
|
300
|
+
continue;
|
|
301
|
+
}
|
|
302
|
+
if (only.after.some((item) => "skip" in item)) {
|
|
303
|
+
problems.push(`the runner skipped ${executable}`);
|
|
304
|
+
continue;
|
|
305
|
+
}
|
|
306
|
+
const last = ended(only);
|
|
307
|
+
if (last === undefined) {
|
|
308
|
+
problems.push(`the record of ${executable} has no end: the runner started it and was stopped before it ended`);
|
|
309
|
+
}
|
|
310
|
+
else if ("signal" in last) {
|
|
311
|
+
problems.push(`${executable} was ended by ${last.signal}`);
|
|
312
|
+
}
|
|
313
|
+
else if (last.status !== 0) {
|
|
314
|
+
problems.push(`${executable} exited with status ${last.status}${last.status === 101 ? ", as a test binary does where a test failed" : last.status === 127 ? ", as a program that cannot be loaded or started does" : ""}`);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
for (const entry of records) {
|
|
318
|
+
if (entry.start.package === crate.name &&
|
|
319
|
+
!expected.includes(entry.real) &&
|
|
320
|
+
recordFailed(entry)) {
|
|
321
|
+
problems.push(`the runner ran ${entry.real}, which cargo's messages do not name, and it did not end with status 0`);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
if (problems.length === 0) {
|
|
325
|
+
return { passed: true, output: texts[index] };
|
|
326
|
+
}
|
|
327
|
+
const noRecords = record.records.length === 0;
|
|
328
|
+
return {
|
|
329
|
+
passed: false,
|
|
330
|
+
output: texts[index],
|
|
331
|
+
message: [
|
|
332
|
+
`${crate.task}: the record of @convesoft/nx-rust's test runner does not show that every test binary of ${crate.name} ran and passed: ${problems.join("; ")}.`,
|
|
333
|
+
...(noRecords
|
|
334
|
+
? [
|
|
335
|
+
`The runner left no record at all. Cargo starts it as ${runner.command.map((word) => JSON.stringify(word)).join(" ")} for each test executable: look at NODE_OPTIONS, whose options apply to the runner as to every Node process, and at what keeps Node from starting.`,
|
|
336
|
+
]
|
|
337
|
+
: []),
|
|
338
|
+
].join("\n"),
|
|
339
|
+
};
|
|
340
|
+
});
|
|
341
|
+
if (end.kind === "failed" &&
|
|
342
|
+
outcomes.every((outcome) => outcome.passed) &&
|
|
343
|
+
!records.some(recordFailed)) {
|
|
344
|
+
return (0, cargo_output_1.failEvery)(crates, texts, "cargo test exited with status 101, and neither a failed build nor the record of @convesoft/nx-rust's test runner explains why");
|
|
345
|
+
}
|
|
346
|
+
return outcomes;
|
|
347
|
+
}
|
|
348
|
+
// The output of the test binaries' step, per crate: the lines before the
|
|
349
|
+
// first `Running` line as compiler output, each block from a `Running` line
|
|
350
|
+
// to the crate whose test executable it names, a block of another member's
|
|
351
|
+
// executable left out, and cargo's closing list of failed targets to every
|
|
352
|
+
// crate. JSON lines before the first block are cargo's messages and shown to
|
|
353
|
+
// no one.
|
|
354
|
+
function attributeTestBinaries(lines, crates, scope, executables) {
|
|
355
|
+
const { body, list } = closingList(lines);
|
|
356
|
+
const firstBlock = body.findIndex((line) => /^\s+Running /.test((0, cargo_output_1.plainLine)(line)));
|
|
357
|
+
const prelude = (firstBlock === -1 ? body : body.slice(0, firstBlock)).filter((line) => !line.includes('{"reason":'));
|
|
358
|
+
const parts = attributeText(prelude, crates, scope);
|
|
359
|
+
const owners = executables.map((message) => {
|
|
360
|
+
var _a;
|
|
361
|
+
return ({
|
|
362
|
+
name: (0, node_path_1.basename)(message.executable).replace(/\.exe$/, ""),
|
|
363
|
+
id: (_a = message.package_id) !== null && _a !== void 0 ? _a : "",
|
|
364
|
+
});
|
|
365
|
+
});
|
|
366
|
+
const memberIds = new Set(scope.members.map((member) => member.id));
|
|
367
|
+
let target = crates.map((_, index) => index);
|
|
368
|
+
for (const line of firstBlock === -1 ? [] : body.slice(firstBlock)) {
|
|
369
|
+
if (/^\s+Running /.test((0, cargo_output_1.plainLine)(line))) {
|
|
370
|
+
const named = owners
|
|
371
|
+
.filter((owner) => (0, cargo_output_1.plainLine)(line).includes(owner.name))
|
|
372
|
+
.sort((a, b) => b.name.length - a.name.length)[0];
|
|
373
|
+
if (named === undefined) {
|
|
374
|
+
target = crates.map((_, index) => index);
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
const index = crates.findIndex((crate) => crate.spec === named.id);
|
|
378
|
+
target =
|
|
379
|
+
index !== -1 ? [index] : memberIds.has(named.id) ? "nobody" : crates.map((_, at) => at);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
if (target !== "nobody") {
|
|
383
|
+
for (const index of target) {
|
|
384
|
+
parts[index].push(line);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
const shown = shownList(list, crates);
|
|
389
|
+
for (const part of parts) {
|
|
390
|
+
part.push(...shown);
|
|
391
|
+
}
|
|
392
|
+
return parts;
|
|
393
|
+
}
|
|
394
|
+
// Cargo's closing list of failed targets as the tasks show it: whole where
|
|
395
|
+
// an entry names a crate of the group, and left out where every entry names
|
|
396
|
+
// a crate outside it, of which the warnings speak.
|
|
397
|
+
function shownList(list, crates) {
|
|
398
|
+
const names = new Set(crates.map((crate) => crate.name));
|
|
399
|
+
return list.slice(1).some((line) => {
|
|
400
|
+
var _a;
|
|
401
|
+
const name = (_a = /^\s+`-p (\S+) /.exec((0, cargo_output_1.plainLine)(line))) === null || _a === void 0 ? void 0 : _a[1];
|
|
402
|
+
return name === undefined || names.has(name);
|
|
403
|
+
})
|
|
404
|
+
? list
|
|
405
|
+
: [];
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Reads the doctest step under `workspace-build`, `cargo test --workspace
|
|
409
|
+
* --doc --no-fail-fast` (`DES-TEST-RUN`, "Doctest results"): cargo decides
|
|
410
|
+
* every doctest as for a plain `cargo test --doc`. Where cargo exits with 0,
|
|
411
|
+
* every crate passes; where it exits with 101, a crate passes where cargo's
|
|
412
|
+
* list of failed targets, the last one and only where it ends the output,
|
|
413
|
+
* names no target of its package; an entry without `-p` names the only
|
|
414
|
+
* member. Every crate fails where cargo exits otherwise, where it fails
|
|
415
|
+
* without a list that ends the output, where the list is not what its first
|
|
416
|
+
* line announces, and where it names a package that is no member. A failing
|
|
417
|
+
* doctest of a member outside the group fails no task: each crate gets a
|
|
418
|
+
* warning that names it (`DES-DIAGNOSTICS`).
|
|
419
|
+
*
|
|
420
|
+
* Each crate's output holds the block after a `Doc-tests` line that names
|
|
421
|
+
* its library, and the lines that the output does not attribute to one
|
|
422
|
+
* crate; the blocks of other members are left out.
|
|
423
|
+
*/
|
|
424
|
+
// @mara implements DES-TEST-RUN
|
|
425
|
+
// @mara implements DES-DIAGNOSTICS
|
|
426
|
+
function readDoctestStep(output, end, crates, scope) {
|
|
427
|
+
var _a;
|
|
428
|
+
const lines = splitLines(output);
|
|
429
|
+
const { body, list, listStart } = closingList(lines);
|
|
430
|
+
const libraryOf = (targets) => (targets !== null && targets !== void 0 ? targets : [])
|
|
431
|
+
.filter((target) => !target.kind.some((kind) => ["bin", "test", "example", "bench", "custom-build"].includes(kind)))
|
|
432
|
+
.map((target) => target.name.replace(/-/g, "_"));
|
|
433
|
+
const outside = (0, cargo_output_1.outsideMembers)(crates, scope);
|
|
434
|
+
const firstBlock = body.findIndex((line) => /^\s+Doc-tests \S+$/.test((0, cargo_output_1.plainLine)(line)));
|
|
435
|
+
const parts = attributeText(firstBlock === -1 ? body : body.slice(0, firstBlock), crates, scope);
|
|
436
|
+
let target = crates.map((_, index) => index);
|
|
437
|
+
for (const line of firstBlock === -1 ? [] : body.slice(firstBlock)) {
|
|
438
|
+
const header = /^\s+Doc-tests (\S+)$/.exec((0, cargo_output_1.plainLine)(line));
|
|
439
|
+
if (header !== null) {
|
|
440
|
+
const library = header[1].replace(/-/g, "_");
|
|
441
|
+
const owners = crates.flatMap((crate, index) => { var _a; return libraryOf((_a = crate.package) === null || _a === void 0 ? void 0 : _a.targets).includes(library) ? [index] : []; });
|
|
442
|
+
target =
|
|
443
|
+
owners.length > 0
|
|
444
|
+
? owners
|
|
445
|
+
: scope.members.some((member) => outside.ids.has(member.id) && libraryOf(member.targets).includes(library))
|
|
446
|
+
? []
|
|
447
|
+
: crates.map((_, index) => index);
|
|
448
|
+
}
|
|
449
|
+
for (const index of target) {
|
|
450
|
+
parts[index].push(line);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
const shown = shownList(list, crates);
|
|
454
|
+
for (const part of parts) {
|
|
455
|
+
part.push(...shown);
|
|
456
|
+
}
|
|
457
|
+
const texts = parts.map((part) => part.join("\n"));
|
|
458
|
+
if (end.kind === "succeeded") {
|
|
459
|
+
return crates.map((_, index) => ({ passed: true, output: texts[index] }));
|
|
460
|
+
}
|
|
461
|
+
if (end.kind === "unexplained") {
|
|
462
|
+
return (0, cargo_output_1.failEvery)(crates, texts, end.reason);
|
|
463
|
+
}
|
|
464
|
+
if (listStart === -1) {
|
|
465
|
+
const names = notCompiled(lines);
|
|
466
|
+
return crates.map((crate, index) => ({
|
|
467
|
+
passed: false,
|
|
468
|
+
output: texts[index],
|
|
469
|
+
message: names.length === 0
|
|
470
|
+
? `${crate.task}: cargo test --doc failed before it printed which doctests failed, so its output does not show whether the doctests of ${crate.name} passed.`
|
|
471
|
+
: `${crate.task}: the doctests of ${crate.name} were not run: cargo test --doc stopped, because ${describeNotCompiled(names, outside.names)} did not compile. Fix the crate that does not compile and run the tasks again.`,
|
|
472
|
+
}));
|
|
473
|
+
}
|
|
474
|
+
const entries = list
|
|
475
|
+
.slice(1)
|
|
476
|
+
.map(cargo_output_1.plainLine)
|
|
477
|
+
.filter((line) => line.trim() !== "");
|
|
478
|
+
const announced = Number((_a = /^error: (\d+)/.exec((0, cargo_output_1.plainLine)(list[0]))) === null || _a === void 0 ? void 0 : _a[1]);
|
|
479
|
+
const malformed = entries.find((line) => !/^\s+`(?:-p \S+ )?[^`]+`$/.test(line));
|
|
480
|
+
if (malformed !== undefined) {
|
|
481
|
+
return (0, cargo_output_1.failEvery)(crates, texts, `the list of failed doctest targets that ends cargo's output is malformed or does not end it: ${JSON.stringify(malformed)}`);
|
|
482
|
+
}
|
|
483
|
+
if (entries.length !== announced) {
|
|
484
|
+
return (0, cargo_output_1.failEvery)(crates, texts, `cargo announced ${announced} failed doctest ${announced === 1 ? "target" : "targets"} and listed ${entries.length}`);
|
|
485
|
+
}
|
|
486
|
+
const only = scope.members.length === 1 ? scope.members[0].name : undefined;
|
|
487
|
+
const failedNames = entries.map((line) => { var _a, _b; return (_b = (_a = /^\s+`-p (\S+) /.exec(line)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : only; });
|
|
488
|
+
if (failedNames.some((name) => name === undefined)) {
|
|
489
|
+
return (0, cargo_output_1.failEvery)(crates, texts, "cargo's list of failed doctest targets holds an entry without a package in a workspace of several members");
|
|
490
|
+
}
|
|
491
|
+
const names = failedNames;
|
|
492
|
+
const strangers = names.filter((name) => !scope.members.some((member) => member.name === name));
|
|
493
|
+
if (strangers.length > 0) {
|
|
494
|
+
return (0, cargo_output_1.failEvery)(crates, texts, `cargo reported failed doctests of ${(0, cargo_output_1.describeList)([...new Set(strangers)].map((name) => `\`${name}\``))}, which is no member of the workspace`);
|
|
495
|
+
}
|
|
496
|
+
const beyond = [...new Set(names.filter((name) => outside.names.has(name)))];
|
|
497
|
+
const warning = (crate) => beyond.length === 0
|
|
498
|
+
? []
|
|
499
|
+
: [
|
|
500
|
+
`${crate.task}: warning: the doctests of ${(0, cargo_output_1.describeList)(beyond.map((name) => `\`${name}\``))} failed. ${beyond.length === 1 ? "That crate is" : "Those crates are"} outside this run's tasks: under workspace-build, the doctest step runs the doctests of every crate of the workspace, and no task of this run fails for ${beyond.length === 1 ? "it" : "them"}.`,
|
|
501
|
+
];
|
|
502
|
+
return crates.map((crate, index) => {
|
|
503
|
+
const own = entries.filter((_, at) => names[at] === crate.name);
|
|
504
|
+
const notes = warning(crate);
|
|
505
|
+
if (own.length === 0) {
|
|
506
|
+
return Object.assign({ passed: true, output: texts[index] }, (notes.length === 0 ? {} : { message: notes.join("\n") }));
|
|
507
|
+
}
|
|
508
|
+
return {
|
|
509
|
+
passed: false,
|
|
510
|
+
output: texts[index],
|
|
511
|
+
message: [
|
|
512
|
+
`${crate.task}: ${own.length === 1 ? "a doctest target" : `${own.length} doctest targets`} of ${crate.name} failed: ${own.map((line) => line.trim()).join(", ")}.`,
|
|
513
|
+
...notes,
|
|
514
|
+
].join("\n"),
|
|
515
|
+
};
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
// Cargo's list of failed targets that ends the output, if the last line of
|
|
519
|
+
// that form starts one: the lines before it, the list, and where it starts.
|
|
520
|
+
function closingList(lines) {
|
|
521
|
+
const headers = lines.flatMap((line, index) => /^error: \d+ targets? failed:$/.test((0, cargo_output_1.plainLine)(line)) ? [index] : []);
|
|
522
|
+
const listStart = headers.length === 0 ? -1 : headers[headers.length - 1];
|
|
523
|
+
return listStart === -1
|
|
524
|
+
? { body: lines, list: [], listStart }
|
|
525
|
+
: { body: lines.slice(0, listStart), list: lines.slice(listStart), listStart };
|
|
526
|
+
}
|
|
527
|
+
/** The lines of a step's output, without the empty one after a last newline. */
|
|
528
|
+
function splitLines(output) {
|
|
529
|
+
const lines = output.split("\n");
|
|
530
|
+
if (lines.at(-1) === "") {
|
|
531
|
+
lines.pop();
|
|
532
|
+
}
|
|
533
|
+
return lines;
|
|
534
|
+
}
|
|
535
|
+
//# sourceMappingURL=test-steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-steps.js","sourceRoot":"","sources":["../../../../nx-rust/src/executors/test-steps.ts"],"names":[],"mappings":";;AAmDA,sCAuCC;AA0DD,kCAWC;AAoBD,kCAeC;AAeD,gDAiCC;AA6DD,oDAuMC;AAoFD,0CAgIC;AAmBD,gCAMC;AAnuBD,qCAAuC;AACvC,yCAA8C;AAC9C,iDAUwB;AA8BxB;;;;;;;;GAQG;AACH,SAAgB,aAAa,CAC3B,KAAwB,EACxB,MAA8B,EAC9B,KAA8B;IAE9B,MAAM,OAAO,GAAG,IAAA,6BAAc,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAc,CAAC,CAAC;IAC/C,MAA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AAS,GAAG,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC1E,OAAO,SAAS,KAAK,CAAC,CAAC;QACrB,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE;QACtC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC;AACnF,CAAC;AAED,gFAAgF;AAChF,SAAgB,UAAU,CAAC,MAAc;IACvC,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;QACxB,KAAK,CAAC,GAAG,EAAE,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { TargetCargoMetadata } from "../graph/targets";
|
|
2
|
+
import { type WasmTarget } from "../graph/wasm";
|
|
3
|
+
import { type GroupMember, type LiveOutput, type MemberResult } from "./group-run";
|
|
4
|
+
/** What a `wasm-build` task needs beyond a `build` task, from its checks before cargo. */
|
|
5
|
+
export interface WasmTask {
|
|
6
|
+
/** The absolute path of the crate's folder, which holds the package folder. */
|
|
7
|
+
crateFolder: string;
|
|
8
|
+
/** The absolute path of the `wasm-bindgen` CLI that the task runs. */
|
|
9
|
+
cli: string;
|
|
10
|
+
/** The CLI's version, which matches the `wasm-bindgen` crate in the lockfile. */
|
|
11
|
+
version: string;
|
|
12
|
+
/** The wasm target, the CLI's `--target`. */
|
|
13
|
+
wasmTarget: WasmTarget;
|
|
14
|
+
}
|
|
15
|
+
/** Thrown by {@link prepareWasmTask} with the message with which the task fails before cargo. */
|
|
16
|
+
export declare class WasmTaskError extends Error {
|
|
17
|
+
constructor(message: string);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The checks of a `wasm-build` task before cargo runs (`DES-WASM`, "What
|
|
21
|
+
* the step needs"; `DES-DIAGNOSTICS`), in this order:
|
|
22
|
+
*
|
|
23
|
+
* - the crate's library has the file name of another crate's file, which
|
|
24
|
+
* graph creation records ({@link TargetCargoMetadata.sharedLibrary}), so
|
|
25
|
+
* that cargo builds one `.wasm` file for both;
|
|
26
|
+
* - the `wasmTarget` option is none of `bundler`, `web` and `nodejs`;
|
|
27
|
+
* - the toolchain that the workspace root selects has no standard library
|
|
28
|
+
* for the wasm triple;
|
|
29
|
+
* - the `wasm-bindgen` CLI is not on the task's `PATH`, as cargo looks it
|
|
30
|
+
* up in the workspace root, or does not say its version;
|
|
31
|
+
* - the lockfile, which the lockfile task has brought up to date, reaches
|
|
32
|
+
* no `wasm-bindgen` crate from the crate's entry, or several versions, or
|
|
33
|
+
* one of another version than the CLI.
|
|
34
|
+
*
|
|
35
|
+
* The plugin installs nothing (`ADR-V1-SCOPE`).
|
|
36
|
+
*
|
|
37
|
+
* @param crateFolder The absolute path of the crate's folder.
|
|
38
|
+
* @param cwd The absolute path of the workspace root, where cargo runs.
|
|
39
|
+
* @param version The crate's version where graph creation recorded it.
|
|
40
|
+
* @throws {WasmTaskError} With the message of the first check that fails.
|
|
41
|
+
*/
|
|
42
|
+
export declare function prepareWasmTask(task: string, crate: string, metadata: TargetCargoMetadata, crateFolder: string, cwd: string, env: NodeJS.ProcessEnv, options: {
|
|
43
|
+
wasmTarget?: unknown;
|
|
44
|
+
}, repositoryRoot: string, version?: string): WasmTask;
|
|
45
|
+
/**
|
|
46
|
+
* Runs a group of `wasm-build` tasks (`DES-WASM`): the group's compile for
|
|
47
|
+
* the wasm triple, as a group of `build` runs it, with the checks after
|
|
48
|
+
* cargo of `build` ({@link runGroup}); then, for each task whose crate
|
|
49
|
+
* passed, the `wasm-bindgen` CLI on the `.wasm` file that cargo reported for
|
|
50
|
+
* the crate's `cdylib` in this compile, into the crate's package folder,
|
|
51
|
+
* which it empties first. A task fails where cargo reported no such file
|
|
52
|
+
* for its crate, or more than one, and where the CLI fails.
|
|
53
|
+
*
|
|
54
|
+
* @returns One result per member, in order.
|
|
55
|
+
*/
|
|
56
|
+
export declare function runWasmGroup(members: readonly GroupMember[], verbose?: boolean, live?: LiveOutput): Promise<MemberResult[]>;
|