@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.
Files changed (418) hide show
  1. package/LICENSE-APACHE +201 -0
  2. package/LICENSE-MIT +21 -0
  3. package/PLUGIN.md +106 -0
  4. package/README.md +51 -1
  5. package/docs/artifacts.mara.md +374 -0
  6. package/docs/caching.mara.md +999 -0
  7. package/docs/ci.mara.md +308 -0
  8. package/docs/configuration.mara.md +508 -0
  9. package/docs/decisions.mara.md +3267 -0
  10. package/docs/execution.mara.md +533 -0
  11. package/docs/index.mara.md +51 -0
  12. package/docs/product.mara.md +366 -0
  13. package/docs/release.mara.md +493 -0
  14. package/docs/setup.mara.md +486 -0
  15. package/docs/targets.mara.md +704 -0
  16. package/docs/testing.mara.md +431 -0
  17. package/docs/verification.mara.md +465 -0
  18. package/docs/workspaces.mara.md +445 -0
  19. package/executors.json +35 -0
  20. package/generators.json +19 -0
  21. package/package.json +17 -4
  22. package/src/cargo/build-settings.d.ts +61 -0
  23. package/src/cargo/build-settings.js +103 -0
  24. package/src/cargo/build-settings.js.map +1 -0
  25. package/src/cargo/configured-runner.d.ts +36 -0
  26. package/src/cargo/configured-runner.js +99 -0
  27. package/src/cargo/configured-runner.js.map +1 -0
  28. package/src/cargo/configured-tools.d.ts +35 -0
  29. package/src/cargo/configured-tools.js +46 -0
  30. package/src/cargo/configured-tools.js.map +1 -0
  31. package/src/cargo/dep-info-basedir.d.ts +18 -0
  32. package/src/cargo/dep-info-basedir.js +38 -0
  33. package/src/cargo/dep-info-basedir.js.map +1 -0
  34. package/src/cargo/directories.d.ts +40 -0
  35. package/src/cargo/directories.js +89 -0
  36. package/src/cargo/directories.js.map +1 -0
  37. package/src/cargo/host-triple.d.ts +7 -0
  38. package/src/cargo/host-triple.js +21 -0
  39. package/src/cargo/host-triple.js.map +1 -0
  40. package/src/cargo/lockfile.d.ts +63 -0
  41. package/src/cargo/lockfile.js +157 -0
  42. package/src/cargo/lockfile.js.map +1 -0
  43. package/src/cargo/metadata.d.ts +114 -0
  44. package/src/cargo/metadata.js +37 -0
  45. package/src/cargo/metadata.js.map +1 -0
  46. package/src/cargo/package-specs.d.ts +54 -0
  47. package/src/cargo/package-specs.js +109 -0
  48. package/src/cargo/package-specs.js.map +1 -0
  49. package/src/cargo/paths-crates.d.ts +27 -0
  50. package/src/cargo/paths-crates.js +69 -0
  51. package/src/cargo/paths-crates.js.map +1 -0
  52. package/src/cargo/print-artifact-folders.d.ts +1 -0
  53. package/src/cargo/print-artifact-folders.js +58 -0
  54. package/src/cargo/print-artifact-folders.js.map +1 -0
  55. package/src/cargo/redirections.d.ts +90 -0
  56. package/src/cargo/redirections.js +200 -0
  57. package/src/cargo/redirections.js.map +1 -0
  58. package/src/cargo/run-cargo.d.ts +31 -0
  59. package/src/cargo/run-cargo.js +75 -0
  60. package/src/cargo/run-cargo.js.map +1 -0
  61. package/src/cargo/target-triples.d.ts +98 -0
  62. package/src/cargo/target-triples.js +265 -0
  63. package/src/cargo/target-triples.js.map +1 -0
  64. package/src/cargo/version-req.d.ts +12 -0
  65. package/src/cargo/version-req.js +122 -0
  66. package/src/cargo/version-req.js.map +1 -0
  67. package/src/cargo/warnings-setting.d.ts +24 -0
  68. package/src/cargo/warnings-setting.js +81 -0
  69. package/src/cargo/warnings-setting.js.map +1 -0
  70. package/src/compatibility/cargo-version.d.ts +43 -0
  71. package/src/compatibility/cargo-version.js +83 -0
  72. package/src/compatibility/cargo-version.js.map +1 -0
  73. package/src/compatibility/nx-bridge.d.ts +312 -0
  74. package/src/compatibility/nx-bridge.js +407 -0
  75. package/src/compatibility/nx-bridge.js.map +1 -0
  76. package/src/compatibility/nx-version.d.ts +104 -0
  77. package/src/compatibility/nx-version.js +272 -0
  78. package/src/compatibility/nx-version.js.map +1 -0
  79. package/src/executors/affected-inputs.d.ts +29 -0
  80. package/src/executors/affected-inputs.js +259 -0
  81. package/src/executors/affected-inputs.js.map +1 -0
  82. package/src/executors/affected-run.d.ts +54 -0
  83. package/src/executors/affected-run.js +394 -0
  84. package/src/executors/affected-run.js.map +1 -0
  85. package/src/executors/affected.d.ts +239 -0
  86. package/src/executors/affected.js +589 -0
  87. package/src/executors/affected.js.map +1 -0
  88. package/src/executors/baseline-context.d.ts +85 -0
  89. package/src/executors/baseline-context.js +227 -0
  90. package/src/executors/baseline-context.js.map +1 -0
  91. package/src/executors/baseline.d.ts +123 -0
  92. package/src/executors/baseline.js +356 -0
  93. package/src/executors/baseline.js.map +1 -0
  94. package/src/executors/batch.d.ts +75 -0
  95. package/src/executors/batch.js +434 -0
  96. package/src/executors/batch.js.map +1 -0
  97. package/src/executors/build-records.d.ts +110 -0
  98. package/src/executors/build-records.js +267 -0
  99. package/src/executors/build-records.js.map +1 -0
  100. package/src/executors/cargo/executor.d.ts +28 -0
  101. package/src/executors/cargo/executor.js +58 -0
  102. package/src/executors/cargo/executor.js.map +1 -0
  103. package/src/executors/cargo/schema.json +58 -0
  104. package/src/executors/cargo-invocation.d.ts +81 -0
  105. package/src/executors/cargo-invocation.js +109 -0
  106. package/src/executors/cargo-invocation.js.map +1 -0
  107. package/src/executors/cargo-output.d.ts +218 -0
  108. package/src/executors/cargo-output.js +660 -0
  109. package/src/executors/cargo-output.js.map +1 -0
  110. package/src/executors/command.d.ts +331 -0
  111. package/src/executors/command.js +547 -0
  112. package/src/executors/command.js.map +1 -0
  113. package/src/executors/coverage-baseline.d.ts +23 -0
  114. package/src/executors/coverage-baseline.js +284 -0
  115. package/src/executors/coverage-baseline.js.map +1 -0
  116. package/src/executors/declared-options.d.ts +21 -0
  117. package/src/executors/declared-options.js +58 -0
  118. package/src/executors/declared-options.js.map +1 -0
  119. package/src/executors/denied-warnings.d.ts +99 -0
  120. package/src/executors/denied-warnings.js +188 -0
  121. package/src/executors/denied-warnings.js.map +1 -0
  122. package/src/executors/digests.d.ts +94 -0
  123. package/src/executors/digests.js +190 -0
  124. package/src/executors/digests.js.map +1 -0
  125. package/src/executors/dotenv-check.d.ts +79 -0
  126. package/src/executors/dotenv-check.js +553 -0
  127. package/src/executors/dotenv-check.js.map +1 -0
  128. package/src/executors/group-invocations.d.ts +80 -0
  129. package/src/executors/group-invocations.js +253 -0
  130. package/src/executors/group-invocations.js.map +1 -0
  131. package/src/executors/group-run.d.ts +114 -0
  132. package/src/executors/group-run.js +601 -0
  133. package/src/executors/group-run.js.map +1 -0
  134. package/src/executors/groups.d.ts +118 -0
  135. package/src/executors/groups.js +304 -0
  136. package/src/executors/groups.js.map +1 -0
  137. package/src/executors/input-check.d.ts +52 -0
  138. package/src/executors/input-check.js +271 -0
  139. package/src/executors/input-check.js.map +1 -0
  140. package/src/executors/kept-files.d.ts +98 -0
  141. package/src/executors/kept-files.js +341 -0
  142. package/src/executors/kept-files.js.map +1 -0
  143. package/src/executors/lockfile/executor.d.ts +16 -0
  144. package/src/executors/lockfile/executor.js +37 -0
  145. package/src/executors/lockfile/executor.js.map +1 -0
  146. package/src/executors/lockfile/schema.json +50 -0
  147. package/src/executors/napi-build.d.ts +73 -0
  148. package/src/executors/napi-build.js +420 -0
  149. package/src/executors/napi-build.js.map +1 -0
  150. package/src/executors/nextest.d.ts +189 -0
  151. package/src/executors/nextest.js +504 -0
  152. package/src/executors/nextest.js.map +1 -0
  153. package/src/executors/nx-command.d.ts +95 -0
  154. package/src/executors/nx-command.js +205 -0
  155. package/src/executors/nx-command.js.map +1 -0
  156. package/src/executors/nx-task-files.d.ts +82 -0
  157. package/src/executors/nx-task-files.js +156 -0
  158. package/src/executors/nx-task-files.js.map +1 -0
  159. package/src/executors/print-test-mode.d.ts +1 -0
  160. package/src/executors/print-test-mode.js +25 -0
  161. package/src/executors/print-test-mode.js.map +1 -0
  162. package/src/executors/release-publish/executor.d.ts +24 -0
  163. package/src/executors/release-publish/executor.js +165 -0
  164. package/src/executors/release-publish/executor.js.map +1 -0
  165. package/src/executors/release-publish/schema.json +30 -0
  166. package/src/executors/run/executor.d.ts +12 -0
  167. package/src/executors/run/executor.js +27 -0
  168. package/src/executors/run/executor.js.map +1 -0
  169. package/src/executors/run/schema.json +45 -0
  170. package/src/executors/runner-script.d.ts +12 -0
  171. package/src/executors/runner-script.js +22 -0
  172. package/src/executors/runner-script.js.map +1 -0
  173. package/src/executors/runtime-input-check.d.ts +24 -0
  174. package/src/executors/runtime-input-check.js +87 -0
  175. package/src/executors/runtime-input-check.js.map +1 -0
  176. package/src/executors/shared-artifacts.d.ts +44 -0
  177. package/src/executors/shared-artifacts.js +132 -0
  178. package/src/executors/shared-artifacts.js.map +1 -0
  179. package/src/executors/split-words.d.ts +24 -0
  180. package/src/executors/split-words.js +111 -0
  181. package/src/executors/split-words.js.map +1 -0
  182. package/src/executors/stage.d.ts +163 -0
  183. package/src/executors/stage.js +526 -0
  184. package/src/executors/stage.js.map +1 -0
  185. package/src/executors/staged-run.d.ts +24 -0
  186. package/src/executors/staged-run.js +110 -0
  187. package/src/executors/staged-run.js.map +1 -0
  188. package/src/executors/task-env.d.ts +271 -0
  189. package/src/executors/task-env.js +494 -0
  190. package/src/executors/task-env.js.map +1 -0
  191. package/src/executors/task-execution.d.ts +61 -0
  192. package/src/executors/task-execution.js +122 -0
  193. package/src/executors/task-execution.js.map +1 -0
  194. package/src/executors/task-guards.d.ts +112 -0
  195. package/src/executors/task-guards.js +435 -0
  196. package/src/executors/task-guards.js.map +1 -0
  197. package/src/executors/task-options.d.ts +114 -0
  198. package/src/executors/task-options.js +258 -0
  199. package/src/executors/task-options.js.map +1 -0
  200. package/src/executors/task.d.ts +166 -0
  201. package/src/executors/task.js +527 -0
  202. package/src/executors/task.js.map +1 -0
  203. package/src/executors/test-mode.d.ts +185 -0
  204. package/src/executors/test-mode.js +397 -0
  205. package/src/executors/test-mode.js.map +1 -0
  206. package/src/executors/test-runner.d.ts +44 -0
  207. package/src/executors/test-runner.js +159 -0
  208. package/src/executors/test-runner.js.map +1 -0
  209. package/src/executors/test-steps.d.ts +121 -0
  210. package/src/executors/test-steps.js +566 -0
  211. package/src/executors/test-steps.js.map +1 -0
  212. package/src/executors/wasm-build.d.ts +56 -0
  213. package/src/executors/wasm-build.js +216 -0
  214. package/src/executors/wasm-build.js.map +1 -0
  215. package/src/generators/crate/binary.schema.json +28 -0
  216. package/src/generators/crate/crate.d.ts +24 -0
  217. package/src/generators/crate/crate.js +108 -0
  218. package/src/generators/crate/crate.js.map +1 -0
  219. package/src/generators/crate/enclosing-workspace.d.ts +25 -0
  220. package/src/generators/crate/enclosing-workspace.js +58 -0
  221. package/src/generators/crate/enclosing-workspace.js.map +1 -0
  222. package/src/generators/crate/library.schema.json +28 -0
  223. package/src/generators/init/graph-check.d.ts +81 -0
  224. package/src/generators/init/graph-check.js +299 -0
  225. package/src/generators/init/graph-check.js.map +1 -0
  226. package/src/generators/init/init.d.ts +23 -0
  227. package/src/generators/init/init.js +113 -0
  228. package/src/generators/init/init.js.map +1 -0
  229. package/src/generators/init/report.d.ts +19 -0
  230. package/src/generators/init/report.js +93 -0
  231. package/src/generators/init/report.js.map +1 -0
  232. package/src/generators/init/schema.json +9 -0
  233. package/src/graph/artifact-kinds.d.ts +29 -0
  234. package/src/graph/artifact-kinds.js +50 -0
  235. package/src/graph/artifact-kinds.js.map +1 -0
  236. package/src/graph/artifact-names.d.ts +97 -0
  237. package/src/graph/artifact-names.js +276 -0
  238. package/src/graph/artifact-names.js.map +1 -0
  239. package/src/graph/build-records.d.ts +74 -0
  240. package/src/graph/build-records.js +104 -0
  241. package/src/graph/build-records.js.map +1 -0
  242. package/src/graph/caching.d.ts +148 -0
  243. package/src/graph/caching.js +681 -0
  244. package/src/graph/caching.js.map +1 -0
  245. package/src/graph/clippy-input.d.ts +53 -0
  246. package/src/graph/clippy-input.js +107 -0
  247. package/src/graph/clippy-input.js.map +1 -0
  248. package/src/graph/collisions.d.ts +113 -0
  249. package/src/graph/collisions.js +156 -0
  250. package/src/graph/collisions.js.map +1 -0
  251. package/src/graph/computation-reports.d.ts +89 -0
  252. package/src/graph/computation-reports.js +216 -0
  253. package/src/graph/computation-reports.js.map +1 -0
  254. package/src/graph/declared-files.d.ts +190 -0
  255. package/src/graph/declared-files.js +600 -0
  256. package/src/graph/declared-files.js.map +1 -0
  257. package/src/graph/discovery.d.ts +190 -0
  258. package/src/graph/discovery.js +661 -0
  259. package/src/graph/discovery.js.map +1 -0
  260. package/src/graph/edges.d.ts +25 -0
  261. package/src/graph/edges.js +94 -0
  262. package/src/graph/edges.js.map +1 -0
  263. package/src/graph/entries.d.ts +83 -0
  264. package/src/graph/entries.js +259 -0
  265. package/src/graph/entries.js.map +1 -0
  266. package/src/graph/inputs.d.ts +422 -0
  267. package/src/graph/inputs.js +756 -0
  268. package/src/graph/inputs.js.map +1 -0
  269. package/src/graph/lockfile-task.d.ts +74 -0
  270. package/src/graph/lockfile-task.js +105 -0
  271. package/src/graph/lockfile-task.js.map +1 -0
  272. package/src/graph/names.d.ts +41 -0
  273. package/src/graph/names.js +34 -0
  274. package/src/graph/names.js.map +1 -0
  275. package/src/graph/napi.d.ts +107 -0
  276. package/src/graph/napi.js +206 -0
  277. package/src/graph/napi.js.map +1 -0
  278. package/src/graph/nx-glob.d.ts +36 -0
  279. package/src/graph/nx-glob.js +152 -0
  280. package/src/graph/nx-glob.js.map +1 -0
  281. package/src/graph/nx-internals.d.ts +57 -0
  282. package/src/graph/nx-internals.js +128 -0
  283. package/src/graph/nx-internals.js.map +1 -0
  284. package/src/graph/options.d.ts +32 -0
  285. package/src/graph/options.js +80 -0
  286. package/src/graph/options.js.map +1 -0
  287. package/src/graph/outputs.d.ts +75 -0
  288. package/src/graph/outputs.js +140 -0
  289. package/src/graph/outputs.js.map +1 -0
  290. package/src/graph/path-dependencies.d.ts +122 -0
  291. package/src/graph/path-dependencies.js +459 -0
  292. package/src/graph/path-dependencies.js.map +1 -0
  293. package/src/graph/plugin-package.d.ts +36 -0
  294. package/src/graph/plugin-package.js +132 -0
  295. package/src/graph/plugin-package.js.map +1 -0
  296. package/src/graph/plugin-version.d.ts +20 -0
  297. package/src/graph/plugin-version.js +153 -0
  298. package/src/graph/plugin-version.js.map +1 -0
  299. package/src/graph/projects.d.ts +141 -0
  300. package/src/graph/projects.js +193 -0
  301. package/src/graph/projects.js.map +1 -0
  302. package/src/graph/reached-projects.d.ts +46 -0
  303. package/src/graph/reached-projects.js +102 -0
  304. package/src/graph/reached-projects.js.map +1 -0
  305. package/src/graph/real-path.d.ts +47 -0
  306. package/src/graph/real-path.js +113 -0
  307. package/src/graph/real-path.js.map +1 -0
  308. package/src/graph/redirected-uses.d.ts +98 -0
  309. package/src/graph/redirected-uses.js +434 -0
  310. package/src/graph/redirected-uses.js.map +1 -0
  311. package/src/graph/registration.d.ts +121 -0
  312. package/src/graph/registration.js +233 -0
  313. package/src/graph/registration.js.map +1 -0
  314. package/src/graph/rustfmt-config.d.ts +42 -0
  315. package/src/graph/rustfmt-config.js +173 -0
  316. package/src/graph/rustfmt-config.js.map +1 -0
  317. package/src/graph/script-input.d.ts +46 -0
  318. package/src/graph/script-input.js +65 -0
  319. package/src/graph/script-input.js.map +1 -0
  320. package/src/graph/settings.d.ts +178 -0
  321. package/src/graph/settings.js +479 -0
  322. package/src/graph/settings.js.map +1 -0
  323. package/src/graph/target-defaults-causes.d.ts +33 -0
  324. package/src/graph/target-defaults-causes.js +202 -0
  325. package/src/graph/target-defaults-causes.js.map +1 -0
  326. package/src/graph/target-defaults-layers.d.ts +186 -0
  327. package/src/graph/target-defaults-layers.js +420 -0
  328. package/src/graph/target-defaults-layers.js.map +1 -0
  329. package/src/graph/target-defaults-meaning.d.ts +95 -0
  330. package/src/graph/target-defaults-meaning.js +292 -0
  331. package/src/graph/target-defaults-meaning.js.map +1 -0
  332. package/src/graph/target-defaults-report.d.ts +77 -0
  333. package/src/graph/target-defaults-report.js +242 -0
  334. package/src/graph/target-defaults-report.js.map +1 -0
  335. package/src/graph/target-defaults.d.ts +79 -0
  336. package/src/graph/target-defaults.js +425 -0
  337. package/src/graph/target-defaults.js.map +1 -0
  338. package/src/graph/target-fields.d.ts +16 -0
  339. package/src/graph/target-fields.js +134 -0
  340. package/src/graph/target-fields.js.map +1 -0
  341. package/src/graph/target-tables.d.ts +45 -0
  342. package/src/graph/target-tables.js +299 -0
  343. package/src/graph/target-tables.js.map +1 -0
  344. package/src/graph/targets.d.ts +371 -0
  345. package/src/graph/targets.js +408 -0
  346. package/src/graph/targets.js.map +1 -0
  347. package/src/graph/unification.d.ts +141 -0
  348. package/src/graph/unification.js +459 -0
  349. package/src/graph/unification.js.map +1 -0
  350. package/src/graph/unignored-directories.d.ts +25 -0
  351. package/src/graph/unignored-directories.js +89 -0
  352. package/src/graph/unignored-directories.js.map +1 -0
  353. package/src/graph/visibility.d.ts +17 -0
  354. package/src/graph/visibility.js +67 -0
  355. package/src/graph/visibility.js.map +1 -0
  356. package/src/graph/warnings.d.ts +38 -0
  357. package/src/graph/warnings.js +77 -0
  358. package/src/graph/warnings.js.map +1 -0
  359. package/src/graph/wasm.d.ts +56 -0
  360. package/src/graph/wasm.js +77 -0
  361. package/src/graph/wasm.js.map +1 -0
  362. package/src/index.d.ts +68 -0
  363. package/src/index.js +109 -0
  364. package/src/index.js.map +1 -0
  365. package/src/release/manifests.d.ts +95 -0
  366. package/src/release/manifests.js +164 -0
  367. package/src/release/manifests.js.map +1 -0
  368. package/src/release/places.d.ts +127 -0
  369. package/src/release/places.js +368 -0
  370. package/src/release/places.js.map +1 -0
  371. package/src/release/publish-cargo.d.ts +177 -0
  372. package/src/release/publish-cargo.js +351 -0
  373. package/src/release/publish-cargo.js.map +1 -0
  374. package/src/release/publish-crates.d.ts +124 -0
  375. package/src/release/publish-crates.js +242 -0
  376. package/src/release/publish-crates.js.map +1 -0
  377. package/src/release/publish-environments.d.ts +50 -0
  378. package/src/release/publish-environments.js +284 -0
  379. package/src/release/publish-environments.js.map +1 -0
  380. package/src/release/publish-messages.d.ts +66 -0
  381. package/src/release/publish-messages.js +273 -0
  382. package/src/release/publish-messages.js.map +1 -0
  383. package/src/release/publish-registry.d.ts +27 -0
  384. package/src/release/publish-registry.js +135 -0
  385. package/src/release/publish-registry.js.map +1 -0
  386. package/src/release/publish-settings.d.ts +26 -0
  387. package/src/release/publish-settings.js +56 -0
  388. package/src/release/publish-settings.js.map +1 -0
  389. package/src/release/publish.d.ts +59 -0
  390. package/src/release/publish.js +620 -0
  391. package/src/release/publish.js.map +1 -0
  392. package/src/release/repository.d.ts +73 -0
  393. package/src/release/repository.js +219 -0
  394. package/src/release/repository.js.map +1 -0
  395. package/src/release/requirements.d.ts +34 -0
  396. package/src/release/requirements.js +30 -0
  397. package/src/release/requirements.js.map +1 -0
  398. package/src/release/toml-edit.d.ts +67 -0
  399. package/src/release/toml-edit.js +453 -0
  400. package/src/release/toml-edit.js.map +1 -0
  401. package/src/release/version-actions.d.ts +133 -0
  402. package/src/release/version-actions.js +474 -0
  403. package/src/release/version-actions.js.map +1 -0
  404. package/src/release/version-checks.d.ts +21 -0
  405. package/src/release/version-checks.js +151 -0
  406. package/src/release/version-checks.js.map +1 -0
  407. package/src/release/version-lockfiles.d.ts +61 -0
  408. package/src/release/version-lockfiles.js +222 -0
  409. package/src/release/version-lockfiles.js.map +1 -0
  410. package/src/tools/napi-cli.d.ts +70 -0
  411. package/src/tools/napi-cli.js +63 -0
  412. package/src/tools/napi-cli.js.map +1 -0
  413. package/src/tools/optional-tools.d.ts +121 -0
  414. package/src/tools/optional-tools.js +303 -0
  415. package/src/tools/optional-tools.js.map +1 -0
  416. package/src/tools/print-napi-cli.d.ts +1 -0
  417. package/src/tools/print-napi-cli.js +24 -0
  418. package/src/tools/print-napi-cli.js.map +1 -0
@@ -0,0 +1,547 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.nextestToolName = exports.maxFiltersetBytes = exports.workspaceUnificationFlags = exports.hakariCheckSteps = exports.pluginVersionOption = exports.optionTargets = void 0;
4
+ exports.selectedTestTarget = selectedTestTarget;
5
+ exports.targetTakes = targetTakes;
6
+ exports.selectsWorkspace = selectsWorkspace;
7
+ exports.cargoArguments = cargoArguments;
8
+ exports.sharedCommandFlags = sharedCommandFlags;
9
+ exports.reportsLibrary = reportsLibrary;
10
+ exports.selectsBySpecification = selectsBySpecification;
11
+ exports.crateSelection = crateSelection;
12
+ exports.nextestFiltersets = nextestFiltersets;
13
+ exports.withToolConfiguration = withToolConfiguration;
14
+ exports.compilingFlags = compilingFlags;
15
+ exports.nextestListArguments = nextestListArguments;
16
+ exports.cargoSteps = cargoSteps;
17
+ const targets_1 = require("../graph/targets");
18
+ const wasm_1 = require("../graph/wasm");
19
+ // The targets that take the feature and profile options, and those that
20
+ // also take `targetTriple`: not `test` and the coverage baseline, which runs
21
+ // the tests, and not `napi-build`, which build for the host only in v1
22
+ // (`ADR-V1-SCOPE`), nor `wasm-build`, which always builds for the wasm
23
+ // triple (`DES-WASM`).
24
+ const tripleTargets = targets_1.compilingTargets.filter((target) => target !== "test" &&
25
+ target !== "coverage-baseline" &&
26
+ target !== "napi-build" &&
27
+ target !== "wasm-build");
28
+ /**
29
+ * The targets that take each option, by their default names, as the option
30
+ * reference of `DES-PLUGIN-OPTIONS` gives them. A task of another target
31
+ * ignores the option, also where its executor's schema declares it, because
32
+ * one schema serves every target of the cargo executor, and a target table
33
+ * in Cargo metadata that sets it fails graph creation
34
+ * (`DES-UNKNOWN-OPTIONS`).
35
+ */
36
+ // @mara implements DES-PLUGIN-OPTIONS
37
+ exports.optionTargets = {
38
+ features: new Set(targets_1.compilingTargets),
39
+ allFeatures: new Set(targets_1.compilingTargets),
40
+ noDefaultFeatures: new Set(targets_1.compilingTargets),
41
+ profile: new Set(targets_1.compilingTargets),
42
+ targetTriple: new Set(tripleTargets),
43
+ allTargets: new Set(["check", "lint"]),
44
+ noDeps: new Set(["doc"]),
45
+ bin: new Set(["run"]),
46
+ args: new Set(["run"]),
47
+ test: new Set(["test"]),
48
+ affectedTests: new Set(["test"]),
49
+ wasmTarget: new Set(["wasm-build"]),
50
+ fullCollect: new Set(["coverage-baseline"]),
51
+ diffOnly: new Set(["coverage-baseline"]),
52
+ fullCollectThreshold: new Set(["coverage-baseline"]),
53
+ separateBuildDir: new Set(["coverage-baseline"]),
54
+ pluginVersion: new Set(targets_1.inferredTargetNames),
55
+ };
56
+ /**
57
+ * The option that the plugin sets itself, to carry its version into the
58
+ * cache key where Nx has no node for its package (`DES-PLUGIN-OPTIONS`). A
59
+ * target table in Cargo metadata may not set it.
60
+ */
61
+ exports.pluginVersionOption = "pluginVersion";
62
+ /**
63
+ * The test target that a task of `test` runs alone, from its `test` option
64
+ * (`DES-TEST-RUN`, "One test target"); `undefined` for every other target
65
+ * and where the option is not set. Such a task forms a group of one crate
66
+ * under every strategy ("Groups of one crate" in `DES-BATCH`), never selects
67
+ * affected tests (`DES-TEST-MODE`), and with nextest runs no doctest step.
68
+ */
69
+ // @mara implements DES-TEST-RUN
70
+ // @mara implements DES-BATCH
71
+ function selectedTestTarget(target, options) {
72
+ return target === "test" ? options.test : undefined;
73
+ }
74
+ /** Whether the target with this default name takes the option `name`. */
75
+ function targetTakes(target, name) {
76
+ return (Object.prototype.hasOwnProperty.call(exports.optionTargets, name) &&
77
+ exports.optionTargets[name].has(target));
78
+ }
79
+ // The per-crate targets whose commands compile the crate, and which select
80
+ // the whole workspace under `workspace-build`; `fmt` and `fmt-check` resolve
81
+ // no features and keep selecting their crates (`DES-TARGET-COMMANDS`).
82
+ const compilingCrateTargets = new Set([
83
+ "build",
84
+ "check",
85
+ "lint",
86
+ "test",
87
+ "napi-build",
88
+ "wasm-build",
89
+ ]);
90
+ /**
91
+ * Whether a group of tasks of the target with this default name selects the
92
+ * whole workspace with `--workspace` under `workspace-build` on the host:
93
+ * `build`, `check`, `lint` and `test`, whose commands compile their crates
94
+ * with features that the selection would otherwise narrow
95
+ * (`DES-UNIFICATION`). `bench` never joins a batch (`DES-TARGETS`), and
96
+ * `cargo fmt` resolves no features.
97
+ */
98
+ function selectsWorkspace(target) {
99
+ return compilingCrateTargets.has(target);
100
+ }
101
+ // The cargo subcommand of each per-crate target and its own flags, before the
102
+ // package selection (`DES-TARGET-COMMANDS`).
103
+ const crateCommands = {
104
+ build: ["build"],
105
+ // The compile steps of `napi-build` and `wasm-build`, plain `cargo build`
106
+ // commands (`DES-NAPI`, `DES-WASM`).
107
+ "napi-build": ["build"],
108
+ // `--lib`: a binary of the crate built for the wasm triple writes
109
+ // `<name>.wasm` too, over the library's (`EVD-WASM-POSTPROCESS`).
110
+ "wasm-build": ["build", "--lib"],
111
+ check: ["check"],
112
+ lint: ["clippy"],
113
+ test: ["test"],
114
+ "fmt-check": ["fmt", "--check"],
115
+ fmt: ["fmt"],
116
+ bench: ["bench"],
117
+ run: ["run"],
118
+ };
119
+ /**
120
+ * The arguments after `cargo` of the command that a task of an inferred
121
+ * target runs in its workspace's root folder.
122
+ *
123
+ * A crate's targets select it with `-p` as {@link crateSelection} says, and
124
+ * the workspace project's targets address the whole workspace. Apart from that,
125
+ * a flag comes only from an option that the target takes
126
+ * ({@link optionTargets}), so that the command is the one that a developer
127
+ * types in the workspace root (`DES-INVOCATION`); `run` passes the binary's
128
+ * arguments after `--`, and the lockfile task runs `cargo update
129
+ * --workspace` (`DES-LOCKFILE-HASHING`). In locked mode every command passes `--locked`,
130
+ * apart from `update`, whose purpose is to change `Cargo.lock`, `fmt` and
131
+ * `fmt-check`, because `cargo fmt` rejects the flag, and `audit`, because
132
+ * cargo-audit only reads the lockfile and has no such flag; cargo-deny takes
133
+ * it before its `check`.
134
+ *
135
+ * @throws {Error} When a crate's target has no crate, or no specification
136
+ * where its command takes one.
137
+ */
138
+ // @mara implements DES-INVOCATION
139
+ // @mara implements DES-TARGET-COMMANDS
140
+ // @mara implements DES-WORKSPACE-TARGETS
141
+ // @mara implements REQ-TEST-RUNNER
142
+ function cargoArguments(subject, options) {
143
+ var _a;
144
+ const { target, crates, locked } = subject;
145
+ const taken = Object.fromEntries(Object.entries(options).filter(([name]) => targetTakes(target, name)));
146
+ if (target === "test" && subject.testRunner === "nextest") {
147
+ return nextestArguments(subject, taken);
148
+ }
149
+ const crateCommand = crateCommands[target];
150
+ if (crateCommand !== undefined) {
151
+ if (crates === undefined || crates.length === 0) {
152
+ throw new Error(`The target "${target}" runs for a crate, and the project has none.`);
153
+ }
154
+ const formatting = target === "fmt" || target === "fmt-check";
155
+ const binaryArguments = target === "run" ? ((_a = subject.binaryArguments) !== null && _a !== void 0 ? _a : []) : [];
156
+ const workspace = subject.workspace === true && selectsWorkspace(target);
157
+ return [
158
+ ...crateCommand,
159
+ ...flag(taken.allTargets, "--all-targets"),
160
+ // The compiles of the artifact targets always print cargo's JSON
161
+ // messages, from which the plugin takes the library that it
162
+ // post-processes (`DES-NAPI`, `DES-WASM`).
163
+ ...(crates.length > 1 || workspace || reportsLibrary(target)
164
+ ? sharedCommandFlags(target)
165
+ : []),
166
+ ...(workspace ? ["--workspace"] : crateSelection(target, crates)),
167
+ ...(taken.test !== undefined ? ["--test", taken.test] : []),
168
+ ...compilingFlags(taken),
169
+ ...(target === "wasm-build" ? ["--target", wasm_1.wasmTriple] : []),
170
+ ...(formatting ? [] : unificationFlags(subject)),
171
+ ...(taken.bin !== undefined ? ["--bin", taken.bin] : []),
172
+ ...flag(locked && !formatting, "--locked"),
173
+ ...(binaryArguments.length > 0 ? ["--", ...binaryArguments] : []),
174
+ ];
175
+ }
176
+ switch (target) {
177
+ case "doc":
178
+ return [
179
+ "doc",
180
+ ...flag(taken.noDeps, "--no-deps"),
181
+ "--workspace",
182
+ ...compilingFlags(taken),
183
+ ...unificationFlags(subject),
184
+ ...flag(locked, "--locked"),
185
+ ];
186
+ case "hakari-check":
187
+ return [...exports.hakariCheckSteps[0]];
188
+ case "audit":
189
+ return ["audit"];
190
+ case "deny":
191
+ return ["deny", ...flag(locked, "--locked"), "check"];
192
+ case "update":
193
+ return ["update"];
194
+ case "lockfile":
195
+ return ["update", "--workspace", ...flag(locked, "--locked")];
196
+ }
197
+ throw new Error(`nx-rust has no command for the target "${target}".`);
198
+ }
199
+ /**
200
+ * The commands of `hakari-check`, after `cargo`, in the order in which it
201
+ * runs them (`DES-UNIFICATION`, "Drift"): neither writes a file, and
202
+ * cargo-hakari takes no `--locked`.
203
+ */
204
+ exports.hakariCheckSteps = [
205
+ ["hakari", "generate", "--diff"],
206
+ ["hakari", "manage-deps", "--dry-run"],
207
+ ];
208
+ /**
209
+ * The flags with which every command that compiles resolves features for
210
+ * the whole workspace under the `cargo` strategy (`DES-UNIFICATION`, "How
211
+ * each strategy selects"): the setting on the command line, which stable
212
+ * cargo ignores with a warning, and the unstable flag, which stable cargo
213
+ * rejects, so that a task on a stable toolchain fails with cargo's error
214
+ * instead of compiling with narrowed features.
215
+ */
216
+ // @mara implements DES-UNIFICATION
217
+ exports.workspaceUnificationFlags = [
218
+ "--config",
219
+ 'resolver.feature-unification="workspace"',
220
+ "-Zfeature-unification",
221
+ ];
222
+ // The flags of the `cargo` strategy, where the subject uses it.
223
+ function unificationFlags(subject) {
224
+ return subject.workspaceUnification === true ? [...exports.workspaceUnificationFlags] : [];
225
+ }
226
+ /**
227
+ * The flags that a command for several crates, or for the whole workspace,
228
+ * adds, so that cargo goes on after a crate fails and its output shows each
229
+ * crate's result (`DES-BATCH`): `--keep-going` and JSON messages for
230
+ * `build`, `check` and `lint`, and `--no-fail-fast` for `test`. A command
231
+ * of a group of one crate adds none, so that it is the command that a plain
232
+ * `cargo` of that one crate runs, apart from the compiles of `napi-build`
233
+ * and `wasm-build`, which have no plain cargo counterpart and always add
234
+ * them, so that cargo reports the library that they post-process
235
+ * (`DES-NAPI`, `DES-WASM`).
236
+ */
237
+ // @mara implements DES-BATCH
238
+ function sharedCommandFlags(target) {
239
+ switch (target) {
240
+ case "build":
241
+ case "napi-build":
242
+ case "wasm-build":
243
+ case "check":
244
+ case "lint":
245
+ return ["--keep-going", "--message-format=json"];
246
+ case "test":
247
+ return ["--no-fail-fast"];
248
+ default:
249
+ return [];
250
+ }
251
+ }
252
+ /**
253
+ * Whether the compile of the target with this default name always prints
254
+ * cargo's JSON messages, also for one crate: the artifact targets, which
255
+ * take the library that cargo reports in them (`DES-NAPI`, `DES-WASM`).
256
+ */
257
+ function reportsLibrary(target) {
258
+ return target === "napi-build" || target === "wasm-build";
259
+ }
260
+ /**
261
+ * Whether the command of the target with this default name selects crates
262
+ * by their package ID specifications: every per-crate command but `cargo
263
+ * fmt`, which takes package names only (`DES-INVOCATION`).
264
+ */
265
+ function selectsBySpecification(target) {
266
+ return crateCommands[target] !== undefined && target !== "fmt" && target !== "fmt-check";
267
+ }
268
+ /**
269
+ * The arguments with which the command of the target with this default name
270
+ * selects `crates`, all of one workspace: `-p` and each crate's package ID
271
+ * specification, in the given order, or for `cargo fmt` `-p` and each
272
+ * crate's package name (`DES-INVOCATION`). A bare name is not enough for the
273
+ * other commands: cargo matches it against every package that the selection
274
+ * reaches, where a dependency can have a member's name, also with its
275
+ * version, and the plugin, which reads the workspace without dependencies,
276
+ * cannot tell where that happens (`EVD-CARGO-PACKAGE-SPECS`).
277
+ *
278
+ * @throws {Error} When the target's command takes specifications and a
279
+ * crate has none.
280
+ */
281
+ // @mara implements DES-INVOCATION
282
+ function crateSelection(target, crates) {
283
+ const bySpecification = selectsBySpecification(target);
284
+ return crates.flatMap(({ name, spec }) => {
285
+ if (!bySpecification) {
286
+ return ["-p", name];
287
+ }
288
+ if (spec === undefined) {
289
+ throw new Error(`The target "${target}" selects the crate ${name} by its specification, and it has none.`);
290
+ }
291
+ return ["-p", spec];
292
+ });
293
+ }
294
+ /**
295
+ * The arguments of `cargo nextest run` for the tests of a group's crates
296
+ * (`DES-TEST-RUN`, step 3), before the plugin's tool configuration file,
297
+ * which the group adds when it runs the step ({@link withToolConfiguration}):
298
+ *
299
+ * - where the command selects the whole workspace, `--workspace` and the
300
+ * filterset of the group's packages ({@link nextestFiltersets});
301
+ * otherwise each crate with `-p` and its package ID specification, as
302
+ * `cargo test` takes them;
303
+ * - for several crates or the whole workspace, `--no-fail-fast`, so that a
304
+ * failing test does not keep the tests of another crate from running;
305
+ * a command of one crate is the one that a developer types;
306
+ * - `--no-tests=pass`, because a crate without tests, or whose tests the
307
+ * repository's default filter leaves out, passes as it does under `cargo
308
+ * test`, where nextest would fail with exit code 4;
309
+ * - `--test` for the `test` option, which nextest passes on to the `cargo
310
+ * test --no-run` that it builds with (`EVD-CARGO-TEST-TARGET-SELECTOR`);
311
+ * - the feature flags, `--cargo-profile` for the `profile` option, because
312
+ * nextest's own `--profile` names a profile of its configuration
313
+ * (`EVD-NEXTEST-CARGO-FLAGS`), the flags of the `cargo` strategy
314
+ * ({@link workspaceUnificationFlags}), which nextest passes on to cargo,
315
+ * and `--locked`.
316
+ *
317
+ * No `--profile` and no `--ignore-default-filter`: the repository's nextest
318
+ * configuration applies as for a plain `cargo nextest run` ("nextest's
319
+ * configuration" in `DES-TEST-RUN`).
320
+ */
321
+ // @mara implements DES-TEST-RUN
322
+ // @mara implements DES-PLUGIN-OPTIONS
323
+ function nextestArguments(subject, taken) {
324
+ var _a;
325
+ const crates = (_a = subject.crates) !== null && _a !== void 0 ? _a : [];
326
+ if (crates.length === 0) {
327
+ throw new Error('The target "test" runs for a crate, and the project has none.');
328
+ }
329
+ const workspace = subject.workspace === true;
330
+ return [
331
+ "nextest",
332
+ "run",
333
+ ...(workspace ? ["--workspace"] : []),
334
+ ...(crates.length > 1 || workspace ? ["--no-fail-fast"] : []),
335
+ "--no-tests=pass",
336
+ ...(workspace
337
+ ? nextestFiltersets(crates.map((crate) => crate.name))
338
+ : crateSelection("test", crates)),
339
+ ...(taken.test !== undefined ? ["--test", taken.test] : []),
340
+ ...compilingFlags(taken, "--cargo-profile"),
341
+ ...unificationFlags(subject),
342
+ ...flag(subject.locked, "--locked"),
343
+ ];
344
+ }
345
+ /** The longest filterset argument that the plugin passes to nextest, in bytes. */
346
+ exports.maxFiltersetBytes = 64 * 1024;
347
+ /**
348
+ * The `-E` arguments that select a group's packages for nextest
349
+ * (`DES-TEST-RUN`, "Under `workspace-build`"): `package(=a) | package(=b)`,
350
+ * where `=` matches each name exactly, split into several arguments, which
351
+ * nextest unites, so that none exceeds {@link maxFiltersetBytes}: Linux
352
+ * refuses one argument of more than 128 KiB (`EVD-CARGO-AFFECTED-REPORT`).
353
+ * A package name holds no character that a filterset escapes.
354
+ *
355
+ * In affected mode (nxr-tabkjx), each argument is intersected with a part of
356
+ * the selection, `(<group's filterset>) & (<part>)`; that is the one place
357
+ * where the selection joins the command.
358
+ */
359
+ // @mara implements DES-TEST-RUN
360
+ function nextestFiltersets(packages) {
361
+ const parts = [];
362
+ let current = "";
363
+ for (const name of packages) {
364
+ const term = `package(=${name})`;
365
+ const joined = current === "" ? term : `${current} | ${term}`;
366
+ if (current !== "" && Buffer.byteLength(joined) > exports.maxFiltersetBytes) {
367
+ parts.push(current);
368
+ current = term;
369
+ }
370
+ else {
371
+ current = joined;
372
+ }
373
+ }
374
+ if (current !== "") {
375
+ parts.push(current);
376
+ }
377
+ return parts.flatMap((part) => ["-E", part]);
378
+ }
379
+ /** The name under which nextest takes the plugin's tool configuration file. */
380
+ exports.nextestToolName = "nx-rust";
381
+ /**
382
+ * The arguments of a nextest step with the plugin's tool configuration file
383
+ * (`DES-TEST-RUN`, "nextest's configuration"): `--tool-config-file
384
+ * nx-rust:<file>` after `nextest run`. The file is written for each run, so
385
+ * the step's arguments name it only once it exists.
386
+ *
387
+ * @param file The absolute path of the file.
388
+ */
389
+ function withToolConfiguration(args, file) {
390
+ return [
391
+ ...args.slice(0, 2),
392
+ "--tool-config-file",
393
+ `${exports.nextestToolName}:${file}`,
394
+ ...args.slice(2),
395
+ ];
396
+ }
397
+ /**
398
+ * The feature, profile and triple flags, from the options that the target
399
+ * takes; the profile goes with `profileFlag`, which nextest calls
400
+ * `--cargo-profile`.
401
+ */
402
+ function compilingFlags(taken, profileFlag = "--profile") {
403
+ var _a;
404
+ const features = (_a = taken.features) !== null && _a !== void 0 ? _a : [];
405
+ return [
406
+ ...(features.length > 0 ? ["--features", features.join(",")] : []),
407
+ ...flag(taken.allFeatures, "--all-features"),
408
+ ...flag(taken.noDefaultFeatures, "--no-default-features"),
409
+ ...(taken.profile !== undefined ? [profileFlag, taken.profile] : []),
410
+ ...(taken.targetTriple !== undefined ? ["--target", taken.targetTriple] : []),
411
+ ];
412
+ }
413
+ function flag(on, name) {
414
+ return on === true ? [name] : [];
415
+ }
416
+ /**
417
+ * The arguments of `cargo nextest list --message-format json` for the tests
418
+ * that a `cargo nextest run` with `runArgs` is to run (`DES-TEST-RUN`, step
419
+ * 4): the same selection, filtersets, feature and profile flags and
420
+ * `--locked`, without the flags that only a run takes, `--no-fail-fast` and
421
+ * `--no-tests`. nextest gives each test of the list a `filter-match` after
422
+ * the same filters, the repository's default filter among them, and with the
423
+ * same environment the same profile applies (`EVD-NEXTEST-RUNNER-STEPS`).
424
+ */
425
+ // @mara implements DES-TEST-RUN
426
+ function nextestListArguments(runArgs) {
427
+ return [
428
+ "nextest",
429
+ "list",
430
+ "--message-format",
431
+ "json",
432
+ ...runArgs.slice(2).filter((arg) => arg !== "--no-fail-fast" && !arg.startsWith("--no-tests")),
433
+ ];
434
+ }
435
+ /**
436
+ * The steps of a group's cargo commands (`DES-BATCH`): one command, as
437
+ * {@link cargoArguments} builds it, for every target but `hakari-check`,
438
+ * which runs the two commands of {@link hakariCheckSteps}, `test` with the
439
+ * nextest runner, and `test` with the `cargo` runner on a group that selects
440
+ * the whole workspace.
441
+ *
442
+ * With the `cargo` runner, such a group has three steps (`DES-TEST-RUN`,
443
+ * "Under `workspace-build`"):
444
+ *
445
+ * 1. `cargo test --workspace --no-run`, which compiles every test executable,
446
+ * the binaries that integration tests use and every example;
447
+ * 2. `cargo test --workspace --tests --no-fail-fast
448
+ * --message-format=json-render-diagnostics` with the selecting runner
449
+ * through `--config 'target.<host>.runner=[…]'`, in TOML strings;
450
+ * 3. `cargo test --workspace --doc --no-fail-fast`, without the runner.
451
+ *
452
+ * With the nextest runner, every group has two (`DES-TEST-RUN`, steps 3 and
453
+ * 5): `cargo nextest run` ({@link cargoArguments}), which builds every test
454
+ * binary before it runs one, and `cargo test --doc` for the doctests, which
455
+ * nextest does not run (`REQ-DOCTESTS`), selecting the crates as the first
456
+ * step does: `--workspace`, or each crate with `-p`. The first step is a
457
+ * `nextest` step where it selects several crates or the whole workspace,
458
+ * whose results the group reads from nextest's JUnit report, and otherwise
459
+ * the plain command of one crate. Both pass `--no-fail-fast` where they
460
+ * select more than one crate.
461
+ *
462
+ * Each step passes the same feature and profile flags and `--locked` as
463
+ * the others, so that every step resolves the same features
464
+ * (`REQ-STABLE-FEATURES`) and reuses what the steps before it compiled; the
465
+ * profile is `--cargo-profile` for nextest and `--profile` for cargo
466
+ * (`EVD-NEXTEST-CARGO-FLAGS`).
467
+ *
468
+ * @param runner The selecting runner, which a `test` group of the `cargo`
469
+ * runner that selects the whole workspace needs.
470
+ * @throws {Error} As {@link cargoArguments} does, and for such a group
471
+ * without a runner.
472
+ */
473
+ // @mara implements DES-TEST-RUN
474
+ // @mara implements DES-UNIFICATION
475
+ // @mara implements REQ-DOCTESTS
476
+ // @mara implements DES-TEST-PHASES
477
+ function cargoSteps(subject, options, runner) {
478
+ var _a;
479
+ if (subject.target === "hakari-check") {
480
+ return exports.hakariCheckSteps.map((args) => ({ kind: "command", args: [...args] }));
481
+ }
482
+ if (subject.target === "test" && subject.testRunner === "nextest") {
483
+ const taken = Object.fromEntries(Object.entries(options).filter(([name]) => targetTakes("test", name)));
484
+ const crates = (_a = subject.crates) !== null && _a !== void 0 ? _a : [];
485
+ const shared = subject.workspace === true || crates.length > 1;
486
+ if (taken.test !== undefined && shared) {
487
+ throw new Error("A test task with the test option runs in a group of one crate, which selects that crate alone.");
488
+ }
489
+ const run = shared
490
+ ? {
491
+ kind: "nextest",
492
+ args: cargoArguments(subject, options),
493
+ listArgs: nextestListArguments(cargoArguments(subject, options)),
494
+ }
495
+ : { kind: "command", args: cargoArguments(subject, options) };
496
+ // A plain `cargo test --test <name>` runs no doctest, and `cargo test
497
+ // --doc` rejects `--test` beside it (`DES-TEST-RUN`, "One test target").
498
+ if (taken.test !== undefined) {
499
+ return [run];
500
+ }
501
+ return [
502
+ run,
503
+ {
504
+ kind: "doctests",
505
+ args: [
506
+ "test",
507
+ ...(subject.workspace === true ? ["--workspace"] : crateSelection("test", crates)),
508
+ "--doc",
509
+ ...(shared ? ["--no-fail-fast"] : []),
510
+ ...compilingFlags(taken),
511
+ ...unificationFlags(subject),
512
+ ...flag(subject.locked, "--locked"),
513
+ ],
514
+ },
515
+ ];
516
+ }
517
+ if (!(subject.target === "test" && subject.workspace === true)) {
518
+ return [{ kind: "command", args: cargoArguments(subject, options) }];
519
+ }
520
+ if (selectedTestTarget("test", options) !== undefined) {
521
+ throw new Error("A test task with the test option runs in a group of one crate, which selects that crate alone.");
522
+ }
523
+ if (runner === undefined) {
524
+ throw new Error("A test group that selects the whole workspace needs the selecting runner.");
525
+ }
526
+ const taken = Object.fromEntries(Object.entries(options).filter(([name]) => targetTakes("test", name)));
527
+ const tail = [...compilingFlags(taken), ...flag(subject.locked, "--locked")];
528
+ const toml = `[${runner.command.map((word) => JSON.stringify(word)).join(", ")}]`;
529
+ return [
530
+ { kind: "tests-build", args: ["test", "--workspace", "--no-run", ...tail] },
531
+ {
532
+ kind: "test-binaries",
533
+ args: [
534
+ "test",
535
+ "--workspace",
536
+ "--tests",
537
+ "--no-fail-fast",
538
+ "--message-format=json-render-diagnostics",
539
+ ...tail,
540
+ "--config",
541
+ `target.${runner.host}.runner=${toml}`,
542
+ ],
543
+ },
544
+ { kind: "doctests", args: ["test", "--workspace", "--doc", "--no-fail-fast", ...tail] },
545
+ ];
546
+ }
547
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../nx-rust/src/executors/command.ts"],"names":[],"mappings":";;;AA8HA,gDAKC;AAGD,kCAKC;AAuED,4CAEC;AA4CD,wCAyDC;AA4CD,gDAaC;AAOD,wCAEC;AAO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AAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CACtE,CAAC;IACF,MAAM,IAAI,GAAG,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;IAC7E,MAAM,IAAI,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IAClF,OAAO;QACL,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,EAAE;QAC3E;YACE,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE;gBACJ,MAAM;gBACN,aAAa;gBACb,SAAS;gBACT,gBAAgB;gBAChB,0CAA0C;gBAC1C,GAAG,IAAI;gBACP,UAAU;gBACV,UAAU,MAAM,CAAC,IAAI,WAAW,IAAI,EAAE;aACvC;SACF;QACD,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC,EAAE;KACxF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { ExecutorContext } from "@nx/devkit";
2
+ import type { CargoTargetOptions } from "./command";
3
+ /**
4
+ * The coverage baseline target on the workspace project of a workspace with
5
+ * `affectedTests` (`REQ-BASELINE`, `DES-BASELINE`), which the lockfile
6
+ * executor, `@convesoft/nx-rust:lockfile`, runs: it has no batch
7
+ * implementation, so that a collection never joins a batch, and the empty
8
+ * entry that `init` adds for it in `targetDefaults` covers the target.
9
+ *
10
+ * In the workspace root, it computes the context that the collection runs
11
+ * in, the record that step 1 of `DES-TEST-RUN` compares
12
+ * (`ADR-AFFECTED-BASELINE-CONTEXT`), takes the workspace's collection lock,
13
+ * asks `cargo affected status` whether `collect --diff` can run
14
+ * ({@link collectionChoice}), removes the record, and for a full collection
15
+ * the database, runs `cargo affected collect` with git's `diff.relative`,
16
+ * and writes the record only after cargo-affected has ended successfully
17
+ * ("Order of writing"). A collection that fails or is interrupted leaves no
18
+ * record. Collection sets no Cargo directory of its own unless
19
+ * `separateBuildDir` is on.
20
+ */
21
+ export declare function collectBaseline(options: CargoTargetOptions, context: ExecutorContext): Promise<{
22
+ success: boolean;
23
+ }>;