fastws-cli 0.0.36__tar.gz → 0.0.37__tar.gz
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.
- {fastws_cli-0.0.36/fastws_cli.egg-info → fastws_cli-0.0.37}/PKG-INFO +26 -15
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/README.md +24 -14
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws/__init__.py +2 -1
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws/core.py +298 -92
- {fastws_cli-0.0.36 → fastws_cli-0.0.37/fastws_cli.egg-info}/PKG-INFO +26 -15
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws_cli.egg-info/requires.txt +1 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/pyproject.toml +2 -0
- fastws_cli-0.0.37/tests/test_build.py +320 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/tests/test_sync.py +25 -11
- fastws_cli-0.0.36/tests/test_build.py +0 -166
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/LICENSE +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws/_toml.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws/build_backend.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws/cargo.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws/integrate.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws/news.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws/procs.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws/releases.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws/store.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws/timelock.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws_cli.egg-info/SOURCES.txt +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws_cli.egg-info/dependency_links.txt +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws_cli.egg-info/entry_points.txt +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/fastws_cli.egg-info/top_level.txt +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/setup.cfg +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/tests/test_build_backend.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/tests/test_integrate.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/tests/test_news.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/tests/test_procs.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/tests/test_releases.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/tests/test_setup.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/tests/test_store.py +0 -0
- {fastws_cli-0.0.36 → fastws_cli-0.0.37}/tests/test_timelock.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastws-cli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.37
|
|
4
4
|
Summary: Fast workspace tools for multi-repo management
|
|
5
5
|
Author: Jeremy Howard
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -14,6 +14,7 @@ Requires-Dist: fastcore>=2.2.33
|
|
|
14
14
|
Requires-Dist: fastgit>=0.1.2
|
|
15
15
|
Requires-Dist: ghapi>=2.0.6
|
|
16
16
|
Requires-Dist: packaging
|
|
17
|
+
Requires-Dist: pyyaml
|
|
17
18
|
Requires-Dist: rich
|
|
18
19
|
Requires-Dist: maturin<2.0,>=1.13
|
|
19
20
|
Requires-Dist: tomli; python_version < "3.11"
|
|
@@ -100,7 +101,7 @@ Extras from duplicate entries in `repos.txt` and `repos-local.txt` are combined.
|
|
|
100
101
|
|
|
101
102
|
Keep `repos.txt` tracked in the workspace Git repo. Put personal additions in a gitignored `repos-local.txt`, using the same format. Every command reads both lists. `ws-add` and automatic discovery append only to the local list. Edit the shared list deliberately when changing the team's baseline. Duplicate repo names are matched case-insensitively. Conflicting explicit locations, or two different repos targeting the same directory, cause errors.
|
|
102
103
|
|
|
103
|
-
`--repos-file myrepos.txt` uses `myrepos-local.txt` alongside it. Either list may be absent. Removing a repo from the baseline does not delete its checkout. The next sync discovers an existing root checkout as a personal addition. External checkouts also remain on disk; add them to the local list to keep managing them.
|
|
104
|
+
`--repos-file myrepos.txt` uses `myrepos-local.txt` alongside it. Either list may be absent. Removing a repo from the baseline does not delete its checkout. The next sync discovers an existing root checkout as a personal addition unless `[tool.fastws].exclude` matches its path. External checkouts also remain on disk; add them to the local list to keep managing them.
|
|
104
105
|
|
|
105
106
|
The workspace `pyproject.toml` is local generated state. `ws-sync` creates it from the tracked `pyproject.tmpl` when available, or generates a minimal one, then maintains it while preserving personal settings except for the managed repo extras, workspace exclusions, and build-isolation list. The template supplies starting defaults only: later template edits do not overwrite existing configuration. Ignore these files in the workspace repo (not in its member repos):
|
|
106
107
|
|
|
@@ -108,7 +109,8 @@ The workspace `pyproject.toml` is local generated state. `ws-sync` creates it fr
|
|
|
108
109
|
/repos-local.txt
|
|
109
110
|
/pyproject.toml
|
|
110
111
|
/package.json
|
|
111
|
-
/
|
|
112
|
+
/pnpm-workspace.yaml
|
|
113
|
+
/pnpm-lock.yaml
|
|
112
114
|
/node_modules/
|
|
113
115
|
/pyrightconfig.json
|
|
114
116
|
/uv.lock
|
|
@@ -185,7 +187,11 @@ ws-branches --expected develop
|
|
|
185
187
|
|
|
186
188
|
### `ws-build`
|
|
187
189
|
|
|
188
|
-
Build
|
|
190
|
+
Build Python sdists and npm tarballs into `.dists` or a specified output directory. JavaScript packages use the same workspace discovery as sync; a non-private package needs a name and version to produce an npm artifact. Private or versionless packages still participate in builds, and mixed Python/JavaScript packages produce both formats when applicable.
|
|
191
|
+
|
|
192
|
+
For any selected WebAssembly package (`[tool.fastws].wasm-package`), `ws-build` invokes `cargo develop` (for mixed Maturin repos) and `cargo wasm` first so Cargo's own dependency tracking keeps generated outputs fresh across sibling crates, while unrelated WebAssembly crates outside the selected closure are skipped using static metadata. If all selected artifacts are current, skip JavaScript builds and packaging. Otherwise run the selected packages' declared JavaScript builds in topological order via pnpm (`pnpm -r` or `pnpm --filter`), then check freshness again before packaging. This prepares shared assets before either distribution is packaged without rerunning generators on a no-op build. A generated JavaScript consumer also considers its local JS dependencies and the active root `pnpm-lock.yaml`. Changes to an ordinary Python runtime dependency do not invalidate every dependent sdist. Packaging uses `uv build --sdist` and `vp pm pack`.
|
|
193
|
+
|
|
194
|
+
Each artifact is staged separately and promoted only after a successful package command. Rebuilding removes older versions of that package, leaving unrelated artifacts alone. A packaging failure reports a warning and does not stop independent packaging jobs; a preparatory build failure stops before packaging. The command exits nonzero on failure.
|
|
189
195
|
|
|
190
196
|
Progress goes to stderr. On success, the output directory path goes to stdout. Scripts can use `$(ws-build)` to build the packages and obtain that path. Use the distributions with a resolver such as `uv pip install --find-links`, or in a Docker build context that needs unreleased workspace packages:
|
|
191
197
|
|
|
@@ -196,7 +202,7 @@ ws-build --out /tmp/dists
|
|
|
196
202
|
ws-build --project solveit # only this package and its transitive workspace dependencies
|
|
197
203
|
```
|
|
198
204
|
|
|
199
|
-
`--project`
|
|
205
|
+
`--project` accepts a Python or npm package name. Selection follows local Python runtime/build dependencies and JS runtime/development/optional dependencies, joining both sets for co-located packages. External registered projects and declared nested workspaces participate too. Other packages in the output directory are left untouched. Without it, the whole workspace is selected.
|
|
200
206
|
|
|
201
207
|
### `cargo develop`
|
|
202
208
|
|
|
@@ -317,7 +323,7 @@ Syncing proceeds in this order:
|
|
|
317
323
|
3. Pull project updates, using the same changed-origin check as `ws-pull`.
|
|
318
324
|
4. Update workspace metadata and install the projects.
|
|
319
325
|
|
|
320
|
-
By default, `ws-sync` uses the active venv's parent as the workspace root. It creates a missing `pyproject.toml` as described above. GitHub checkouts at the root that are absent from both lists are added to `repos-local.txt`, including non-Python repos. Directories prefixed with `_` are left alone unless explicitly listed.
|
|
326
|
+
By default, `ws-sync` uses the active venv's parent as the workspace root. It creates a missing `pyproject.toml` as described above. GitHub checkouts at the root that are absent from both lists are added to `repos-local.txt`, including non-Python repos. Root checkouts matching `[tool.fastws].exclude` are not automatically added. Directories prefixed with `_` are left alone unless explicitly listed.
|
|
321
327
|
|
|
322
328
|
Project scanning respects `tool.uv.workspace.members` and `exclude`. If a member directory lacks `pyproject.toml`, such as a fresh empty clone, sync warns and skips the `uv sync` step.
|
|
323
329
|
|
|
@@ -335,23 +341,27 @@ Sync writes `.cargo/rustc-lock` and makes it Cargo's `rustc-wrapper`. The script
|
|
|
335
341
|
|
|
336
342
|
For an isolated build workspace, `fastws.core.cargo_setup(root)` regenerates these Cargo patches and the same compiler wrapper without pulling, syncing Python or building.
|
|
337
343
|
|
|
338
|
-
Fastws discovers JavaScript packages directly under the workspace root. It reads each package's `workspaces` list for declared nested packages.
|
|
344
|
+
Fastws discovers JavaScript packages directly under the workspace root, explicitly registered external repo roots, paths or globs retained in `pnpm-workspace.yaml`, explicit nested paths declared under `[tool.fastws].js-packages` in a repo's `pyproject.toml`, and generated WebAssembly package directories declared under `[tool.fastws].wasm-package = { name = "...", path = "wasm/pkg" }` (when a repo root's own `package.json` already declares that same package name for live source exports, fastws links the repo root in `pnpm-workspace.yaml` and still builds and packs the `wasm-package` directory in `ws-build`). It also reads each package's own `workspaces` list for declared nested packages. The install, build and distribution graph use these same members; fastws does not scan arbitrary nested package files. Lockfiles do not affect discovery. `[tool.fastws].exclude` matches paths relative to the workspace root. Fastws skips `node_modules` and directories whose names start with `.` or `_`.
|
|
339
345
|
|
|
340
|
-
Each sync updates `
|
|
346
|
+
Each sync updates `packages` in the root `pnpm-workspace.yaml` (creating it with `linkWorkspacePackages: deep`, `preferWorkspacePackages: true`, and `minimumReleaseAge: 1440` by default) and maintains `private: true` in the root `package.json`. It preserves external paths, globs, and unrelated settings, and reports added and removed packages.
|
|
341
347
|
|
|
342
|
-
|
|
348
|
+
Optional tracked `pnpm-workspace.shared.yaml` and `package.json.shared` files are merged into `pnpm-workspace.yaml` and `package.json` on every sync. Object-valued fields merge one level deep, shared values win conflicts, and arrays replace rather than concatenate. Unrelated local settings remain; removing a shared key does not delete its local value. Use these files to declare the workspace's toolchain (`packageManager`, `devEngines.runtime`, `vite-plus`, and matching `vite`/`vitest` overrides) and shared policies such as `allowBuilds`.
|
|
343
349
|
|
|
344
350
|
Before `uv sync`, fastws regenerates `tool.uv.no-build-isolation-package` with the sorted package names of projects using `fastws.build_backend`, including external checkouts. These builds use the shared environment's `fastws-cli` and `maturin`. Leave global build isolation enabled for other projects.
|
|
345
351
|
|
|
346
|
-
After `uv sync`, fastws
|
|
352
|
+
After `uv sync`, fastws writes `_fastws_pytest.pth` into the workspace venv's `site-packages` to default `PYTEST_DISABLE_PLUGIN_AUTOLOAD=1`, keeping pytest plugins installed for one repo from leaking into others. Repos enable the plugins they need via `-p` in `addopts` (override for a run with `PYTEST_DISABLE_PLUGIN_AUTOLOAD=""`).
|
|
353
|
+
|
|
354
|
+
After `uv sync`, fastws runs `cargo develop` in mixed Rust/Python projects, with up to one project per CPU building concurrently by default. Cargo skips unchanged compilation inputs. Projects using `fastws.build_backend` should keep only packaging inputs in `tool.uv.cache-keys`; Rust source changes are handled by Cargo. Maturin packages with `bindings = "bin"` keep their existing uv installation path.
|
|
355
|
+
|
|
356
|
+
Strictly after `cargo develop` finishes, fastws runs `cargo wasm` in parallel for every repo declaring `[tool.fastws].wasm-package`, so any `post-develop-module` generators have already produced their assets and each generated `wasm/pkg/package.json` exists before JavaScript installation.
|
|
347
357
|
|
|
348
|
-
Fastws then runs
|
|
358
|
+
Fastws then runs `vp install` at the workspace root (driving pnpm underneath). Native pnpm workspaces link local packages whose versions satisfy their consumers' ordinary dependency ranges; consumer manifests need no local paths or special workspace protocol.
|
|
349
359
|
|
|
350
|
-
|
|
360
|
+
After installation, fastws runs `pnpm -r --if-present --workspace-concurrency=<N> run build` (through Vite+'s managed pnpm) so local dependencies build before their consumers and independent builds share the project-concurrency limit. Packages own their build commands: AnswerUI's is `nbdev-export`, for example. Python sync runs first, so a repo-list entry such as `AnswerDotAI/answerui[dev]` supplies its Python build tools through the normal extras mechanism. No additional install lifecycle hook is needed. Cargo and other build tools retain their own incremental behavior.
|
|
351
361
|
|
|
352
|
-
|
|
362
|
+
`--build-workers` sets the maximum concurrent projects within the Python-native, WebAssembly, and JavaScript build phases, defaulting to the CPU count; `--build-workers 1` runs each phase serially. It is separate from `--workers`, which controls cloning, pulling and dependency updates. Cargo keeps its own within-project parallelism, so increasing project concurrency also increases CPU and memory demand. Cargo may serialize builds that share a target directory.
|
|
353
363
|
|
|
354
|
-
|
|
364
|
+
When JavaScript workspaces are present, fastws requires Vite+ (`vp`) on `PATH` with managed `node` and `pnpm` shims active (`curl -fsSL https://vite.plus | bash`, with Vite+'s bin directory ahead of Homebrew on `PATH`). When WebAssembly packages (`[tool.fastws].wasm-package`) are present, fastws also requires rustup's `rustc`/`cargo` proxies and the `wasm32-unknown-unknown` target (`rustup target add wasm32-unknown-unknown`).
|
|
355
365
|
|
|
356
366
|
At most once per day, sync upgrades dependencies with `uv sync -U` and a parallel `cargo update` in every member with a `Cargo.toml`. It prints the changes and records the run in a stamp file inside the workspace's `.git` directory. Pass `--upgrade` to force an upgrade regardless of the last run time.
|
|
357
367
|
|
|
@@ -361,6 +371,7 @@ Before every uv sync, `ws-sync` writes `.git/fastws-cargo-key` for each member c
|
|
|
361
371
|
ws-sync
|
|
362
372
|
ws-sync --workspace ~/aai-ws
|
|
363
373
|
ws-sync --upgrade
|
|
374
|
+
ws-sync --build-workers 1
|
|
364
375
|
```
|
|
365
376
|
|
|
366
377
|
### `ws-add`
|
|
@@ -370,7 +381,7 @@ Add a repo to `repos-local.txt`, then run `ws-sync`. Repos already in either lis
|
|
|
370
381
|
The argument determines how fastws locates the checkout:
|
|
371
382
|
|
|
372
383
|
- `owner/repo` clones the repository.
|
|
373
|
-
- An existing local folder
|
|
384
|
+
- An existing local folder uses its `origin` remote to resolve `owner/repo`. It needs a `pyproject.toml`, `Cargo.toml` or `package.json`; Rust-only and JavaScript-only projects need no Python scaffold. The command reports missing project metadata, Git repo or GitHub origin.
|
|
374
385
|
- A path outside the workspace root leaves the checkout in place and records its location in the local list. The checkout needs no root `pyproject.toml`. Sync discovers its packages.
|
|
375
386
|
|
|
376
387
|
```bash
|
|
@@ -72,7 +72,7 @@ Extras from duplicate entries in `repos.txt` and `repos-local.txt` are combined.
|
|
|
72
72
|
|
|
73
73
|
Keep `repos.txt` tracked in the workspace Git repo. Put personal additions in a gitignored `repos-local.txt`, using the same format. Every command reads both lists. `ws-add` and automatic discovery append only to the local list. Edit the shared list deliberately when changing the team's baseline. Duplicate repo names are matched case-insensitively. Conflicting explicit locations, or two different repos targeting the same directory, cause errors.
|
|
74
74
|
|
|
75
|
-
`--repos-file myrepos.txt` uses `myrepos-local.txt` alongside it. Either list may be absent. Removing a repo from the baseline does not delete its checkout. The next sync discovers an existing root checkout as a personal addition. External checkouts also remain on disk; add them to the local list to keep managing them.
|
|
75
|
+
`--repos-file myrepos.txt` uses `myrepos-local.txt` alongside it. Either list may be absent. Removing a repo from the baseline does not delete its checkout. The next sync discovers an existing root checkout as a personal addition unless `[tool.fastws].exclude` matches its path. External checkouts also remain on disk; add them to the local list to keep managing them.
|
|
76
76
|
|
|
77
77
|
The workspace `pyproject.toml` is local generated state. `ws-sync` creates it from the tracked `pyproject.tmpl` when available, or generates a minimal one, then maintains it while preserving personal settings except for the managed repo extras, workspace exclusions, and build-isolation list. The template supplies starting defaults only: later template edits do not overwrite existing configuration. Ignore these files in the workspace repo (not in its member repos):
|
|
78
78
|
|
|
@@ -80,7 +80,8 @@ The workspace `pyproject.toml` is local generated state. `ws-sync` creates it fr
|
|
|
80
80
|
/repos-local.txt
|
|
81
81
|
/pyproject.toml
|
|
82
82
|
/package.json
|
|
83
|
-
/
|
|
83
|
+
/pnpm-workspace.yaml
|
|
84
|
+
/pnpm-lock.yaml
|
|
84
85
|
/node_modules/
|
|
85
86
|
/pyrightconfig.json
|
|
86
87
|
/uv.lock
|
|
@@ -157,7 +158,11 @@ ws-branches --expected develop
|
|
|
157
158
|
|
|
158
159
|
### `ws-build`
|
|
159
160
|
|
|
160
|
-
Build
|
|
161
|
+
Build Python sdists and npm tarballs into `.dists` or a specified output directory. JavaScript packages use the same workspace discovery as sync; a non-private package needs a name and version to produce an npm artifact. Private or versionless packages still participate in builds, and mixed Python/JavaScript packages produce both formats when applicable.
|
|
162
|
+
|
|
163
|
+
For any selected WebAssembly package (`[tool.fastws].wasm-package`), `ws-build` invokes `cargo develop` (for mixed Maturin repos) and `cargo wasm` first so Cargo's own dependency tracking keeps generated outputs fresh across sibling crates, while unrelated WebAssembly crates outside the selected closure are skipped using static metadata. If all selected artifacts are current, skip JavaScript builds and packaging. Otherwise run the selected packages' declared JavaScript builds in topological order via pnpm (`pnpm -r` or `pnpm --filter`), then check freshness again before packaging. This prepares shared assets before either distribution is packaged without rerunning generators on a no-op build. A generated JavaScript consumer also considers its local JS dependencies and the active root `pnpm-lock.yaml`. Changes to an ordinary Python runtime dependency do not invalidate every dependent sdist. Packaging uses `uv build --sdist` and `vp pm pack`.
|
|
164
|
+
|
|
165
|
+
Each artifact is staged separately and promoted only after a successful package command. Rebuilding removes older versions of that package, leaving unrelated artifacts alone. A packaging failure reports a warning and does not stop independent packaging jobs; a preparatory build failure stops before packaging. The command exits nonzero on failure.
|
|
161
166
|
|
|
162
167
|
Progress goes to stderr. On success, the output directory path goes to stdout. Scripts can use `$(ws-build)` to build the packages and obtain that path. Use the distributions with a resolver such as `uv pip install --find-links`, or in a Docker build context that needs unreleased workspace packages:
|
|
163
168
|
|
|
@@ -168,7 +173,7 @@ ws-build --out /tmp/dists
|
|
|
168
173
|
ws-build --project solveit # only this package and its transitive workspace dependencies
|
|
169
174
|
```
|
|
170
175
|
|
|
171
|
-
`--project`
|
|
176
|
+
`--project` accepts a Python or npm package name. Selection follows local Python runtime/build dependencies and JS runtime/development/optional dependencies, joining both sets for co-located packages. External registered projects and declared nested workspaces participate too. Other packages in the output directory are left untouched. Without it, the whole workspace is selected.
|
|
172
177
|
|
|
173
178
|
### `cargo develop`
|
|
174
179
|
|
|
@@ -289,7 +294,7 @@ Syncing proceeds in this order:
|
|
|
289
294
|
3. Pull project updates, using the same changed-origin check as `ws-pull`.
|
|
290
295
|
4. Update workspace metadata and install the projects.
|
|
291
296
|
|
|
292
|
-
By default, `ws-sync` uses the active venv's parent as the workspace root. It creates a missing `pyproject.toml` as described above. GitHub checkouts at the root that are absent from both lists are added to `repos-local.txt`, including non-Python repos. Directories prefixed with `_` are left alone unless explicitly listed.
|
|
297
|
+
By default, `ws-sync` uses the active venv's parent as the workspace root. It creates a missing `pyproject.toml` as described above. GitHub checkouts at the root that are absent from both lists are added to `repos-local.txt`, including non-Python repos. Root checkouts matching `[tool.fastws].exclude` are not automatically added. Directories prefixed with `_` are left alone unless explicitly listed.
|
|
293
298
|
|
|
294
299
|
Project scanning respects `tool.uv.workspace.members` and `exclude`. If a member directory lacks `pyproject.toml`, such as a fresh empty clone, sync warns and skips the `uv sync` step.
|
|
295
300
|
|
|
@@ -307,23 +312,27 @@ Sync writes `.cargo/rustc-lock` and makes it Cargo's `rustc-wrapper`. The script
|
|
|
307
312
|
|
|
308
313
|
For an isolated build workspace, `fastws.core.cargo_setup(root)` regenerates these Cargo patches and the same compiler wrapper without pulling, syncing Python or building.
|
|
309
314
|
|
|
310
|
-
Fastws discovers JavaScript packages directly under the workspace root. It reads each package's `workspaces` list for declared nested packages.
|
|
315
|
+
Fastws discovers JavaScript packages directly under the workspace root, explicitly registered external repo roots, paths or globs retained in `pnpm-workspace.yaml`, explicit nested paths declared under `[tool.fastws].js-packages` in a repo's `pyproject.toml`, and generated WebAssembly package directories declared under `[tool.fastws].wasm-package = { name = "...", path = "wasm/pkg" }` (when a repo root's own `package.json` already declares that same package name for live source exports, fastws links the repo root in `pnpm-workspace.yaml` and still builds and packs the `wasm-package` directory in `ws-build`). It also reads each package's own `workspaces` list for declared nested packages. The install, build and distribution graph use these same members; fastws does not scan arbitrary nested package files. Lockfiles do not affect discovery. `[tool.fastws].exclude` matches paths relative to the workspace root. Fastws skips `node_modules` and directories whose names start with `.` or `_`.
|
|
311
316
|
|
|
312
|
-
Each sync updates `
|
|
317
|
+
Each sync updates `packages` in the root `pnpm-workspace.yaml` (creating it with `linkWorkspacePackages: deep`, `preferWorkspacePackages: true`, and `minimumReleaseAge: 1440` by default) and maintains `private: true` in the root `package.json`. It preserves external paths, globs, and unrelated settings, and reports added and removed packages.
|
|
313
318
|
|
|
314
|
-
|
|
319
|
+
Optional tracked `pnpm-workspace.shared.yaml` and `package.json.shared` files are merged into `pnpm-workspace.yaml` and `package.json` on every sync. Object-valued fields merge one level deep, shared values win conflicts, and arrays replace rather than concatenate. Unrelated local settings remain; removing a shared key does not delete its local value. Use these files to declare the workspace's toolchain (`packageManager`, `devEngines.runtime`, `vite-plus`, and matching `vite`/`vitest` overrides) and shared policies such as `allowBuilds`.
|
|
315
320
|
|
|
316
321
|
Before `uv sync`, fastws regenerates `tool.uv.no-build-isolation-package` with the sorted package names of projects using `fastws.build_backend`, including external checkouts. These builds use the shared environment's `fastws-cli` and `maturin`. Leave global build isolation enabled for other projects.
|
|
317
322
|
|
|
318
|
-
After `uv sync`, fastws
|
|
323
|
+
After `uv sync`, fastws writes `_fastws_pytest.pth` into the workspace venv's `site-packages` to default `PYTEST_DISABLE_PLUGIN_AUTOLOAD=1`, keeping pytest plugins installed for one repo from leaking into others. Repos enable the plugins they need via `-p` in `addopts` (override for a run with `PYTEST_DISABLE_PLUGIN_AUTOLOAD=""`).
|
|
324
|
+
|
|
325
|
+
After `uv sync`, fastws runs `cargo develop` in mixed Rust/Python projects, with up to one project per CPU building concurrently by default. Cargo skips unchanged compilation inputs. Projects using `fastws.build_backend` should keep only packaging inputs in `tool.uv.cache-keys`; Rust source changes are handled by Cargo. Maturin packages with `bindings = "bin"` keep their existing uv installation path.
|
|
326
|
+
|
|
327
|
+
Strictly after `cargo develop` finishes, fastws runs `cargo wasm` in parallel for every repo declaring `[tool.fastws].wasm-package`, so any `post-develop-module` generators have already produced their assets and each generated `wasm/pkg/package.json` exists before JavaScript installation.
|
|
319
328
|
|
|
320
|
-
Fastws then runs
|
|
329
|
+
Fastws then runs `vp install` at the workspace root (driving pnpm underneath). Native pnpm workspaces link local packages whose versions satisfy their consumers' ordinary dependency ranges; consumer manifests need no local paths or special workspace protocol.
|
|
321
330
|
|
|
322
|
-
|
|
331
|
+
After installation, fastws runs `pnpm -r --if-present --workspace-concurrency=<N> run build` (through Vite+'s managed pnpm) so local dependencies build before their consumers and independent builds share the project-concurrency limit. Packages own their build commands: AnswerUI's is `nbdev-export`, for example. Python sync runs first, so a repo-list entry such as `AnswerDotAI/answerui[dev]` supplies its Python build tools through the normal extras mechanism. No additional install lifecycle hook is needed. Cargo and other build tools retain their own incremental behavior.
|
|
323
332
|
|
|
324
|
-
|
|
333
|
+
`--build-workers` sets the maximum concurrent projects within the Python-native, WebAssembly, and JavaScript build phases, defaulting to the CPU count; `--build-workers 1` runs each phase serially. It is separate from `--workers`, which controls cloning, pulling and dependency updates. Cargo keeps its own within-project parallelism, so increasing project concurrency also increases CPU and memory demand. Cargo may serialize builds that share a target directory.
|
|
325
334
|
|
|
326
|
-
|
|
335
|
+
When JavaScript workspaces are present, fastws requires Vite+ (`vp`) on `PATH` with managed `node` and `pnpm` shims active (`curl -fsSL https://vite.plus | bash`, with Vite+'s bin directory ahead of Homebrew on `PATH`). When WebAssembly packages (`[tool.fastws].wasm-package`) are present, fastws also requires rustup's `rustc`/`cargo` proxies and the `wasm32-unknown-unknown` target (`rustup target add wasm32-unknown-unknown`).
|
|
327
336
|
|
|
328
337
|
At most once per day, sync upgrades dependencies with `uv sync -U` and a parallel `cargo update` in every member with a `Cargo.toml`. It prints the changes and records the run in a stamp file inside the workspace's `.git` directory. Pass `--upgrade` to force an upgrade regardless of the last run time.
|
|
329
338
|
|
|
@@ -333,6 +342,7 @@ Before every uv sync, `ws-sync` writes `.git/fastws-cargo-key` for each member c
|
|
|
333
342
|
ws-sync
|
|
334
343
|
ws-sync --workspace ~/aai-ws
|
|
335
344
|
ws-sync --upgrade
|
|
345
|
+
ws-sync --build-workers 1
|
|
336
346
|
```
|
|
337
347
|
|
|
338
348
|
### `ws-add`
|
|
@@ -342,7 +352,7 @@ Add a repo to `repos-local.txt`, then run `ws-sync`. Repos already in either lis
|
|
|
342
352
|
The argument determines how fastws locates the checkout:
|
|
343
353
|
|
|
344
354
|
- `owner/repo` clones the repository.
|
|
345
|
-
- An existing local folder
|
|
355
|
+
- An existing local folder uses its `origin` remote to resolve `owner/repo`. It needs a `pyproject.toml`, `Cargo.toml` or `package.json`; Rust-only and JavaScript-only projects need no Python scaffold. The command reports missing project metadata, Git repo or GitHub origin.
|
|
346
356
|
- A path outside the workspace root leaves the checkout in place and records its location in the local list. The checkout needs no root `pyproject.toml`. Sync discovers its packages.
|
|
347
357
|
|
|
348
358
|
```bash
|