mj dev workspace: three override-pin rules break MJ's own build in a generated workspace (rollup binding, per-major selectors, newest-wins)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- nodejs, typescript
- 領域
- build-system, cli
調査の方向性
The three override rules live in packages/MJCLI/src/lib/dev-workspace/, mainly lockfile.ts (the DeriveLockfilePins derivation) and build.ts. Start by generating a workspace from the listed members and reading the overrides it writes for @rollup/rollup-linux-x64-gnu, @types/express and rolldown. Done when each rule is fixed, a generated workspace builds @memberjunction/graphql-dataprovider and @memberjunction/server, and the @types/compression case typechecks.
索引モデルが issue の本文から書いたものです。
説明
What happened
A workspace generated by mj dev workspace on today's next (19cbf7d07f), with members MJ, bizapps-common, bizapps-tasks and bizapps-forms, could not build MJ itself. Three separate override-pin rules in packages/MJCLI/src/lib/dev-workspace/ caused it. Each one fails silently at generation time and loudly at build time.
- Platform binaries are pinned workspace-wide. MJ's root lists
@rollup/rollup-linux-x64-gnu4.17.2 directly, and the lockfile derivation turns that into a global override. rollup 4.57.1 then loads a 4.17 native parser, and everypkgrollbuild fails withError: ast.body is not iterable(first seen on@memberjunction/graphql-dataprovider). The same happens with@lmdb/lmdb-*(3.0.8 binaries pinned under lmdb 3.5.1) and@esbuild/win32-x64. A binary package has to be the exact version of the package that loads it, so it should never get a global pin. - Per-major selectors catch wildcard ranges. For a name resolved in two majors, the generator writes
@types/express@^4and@types/express@^5. pnpm appliesname@^4to any dependency whose range intersects it, including*. So@types/compression(@types/express: *) got express types 4 next to the app's 5. Every Express handler then failed withTS2769 … not assignable to 'PathParams', even though both member lockfiles resolve@types/compressionto express types 5.0.6. - The newest version wins over MJ's own resolution. Where MJ's lockfile and an app's lockfile resolve the same tool to different versions in one major, the generator pins the newest. Examples: rollup 4.62.4 over MJ's 4.57.1, and rolldown
1.0.0-beta.58vs1.0.0-rc.4; there were 28 such names in this set.
A fourth difference is worth noting. A filtered install (pnpm install --filter <app>...) hoists a different @types/express than a full install, and MJ's server then stops compiling. A full install at the parent works.
Steps
- Put MJ (
next), bizapps-common, bizapps-tasks and bizapps-forms (each atnext) side by side, runmj dev workspace, thenpnpm installat the parent. - Build
@memberjunction/graphql-dataprovider. It fails on item 1. - Fix item 1 (drop the binding pin) and build
@memberjunction/serverplus the bizapps-forms server specs. They fail on item 2.
Workaround in use (not silent)
Open App CI now builds next against MJ next in this generated workspace (.github/actions/ci-install in every BizApps repo). Its mj-next-workspace.mjs post-processes the generator's overrides before writing them:
- it drops platform-binding pins;
- it keeps only the newest major of a multi-major pin;
- it prefers MJ's lockfile resolution when that still satisfies every member's declared range.
With those changes MJ and the siblings (240 packages) build in about 9 minutes on a GitHub runner, and Forms builds and typechecks. The real fix belongs in lockfile.ts / build.ts. Once it lands, the CI post-processing can be removed.
Confidence
Reproduced locally and on a GitHub runner (bizapps-forms run 44926409441). Each item was confirmed by changing only that pin and rebuilding.
Environment
MJ next @ 19cbf7d07f / b219376ecf, pnpm 10.33.0, Node 22/24, Linux x64.
Severity
Any developer who regenerates a workspace with these members today gets an MJ that does not build. CI depends on it now too.
Target line
next
Duplicate search
Searched MJ issues for "dev workspace" with rollup, overrides, ast.body is not iterable and DeriveLockfilePins. #4129 (closed) is the closest: it concerns pins taken from different members for wrapper libs vs their inner SDKs, which is a different mechanism. I filed this on MJ because the generator is in packages/MJCLI.
- 主要言語
- TSQL
- スター
- 32
- フォーク
- 7
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 504
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MemberJunction/MJ のほかの issue
-
DBAutoDoc: export --state-file writes SQL Server SQL for a PostgreSQL database, ignoring --providerオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
MemberJunction/MJ#7094 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
MemberJunction/MJ#6971 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
MemberJunction/MJ#6947 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MemberJunction/MJ#6800 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MemberJunction/MJ#6746 ·
メンテナーはふだん 1 日以内に返信
MemberJunction/MJ の issue をすべて見る
似ている issue
-
A-ci A-fuzzing C-bug S-confirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hyperlight-dev/hyperlight#2134 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
godotengine/godot#126005 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
bazelbuild/bazel#33068 ·
メンテナーはふだん 2 日以内に返信
-
Windows CI jobオープンenhancement module:devx Stellar Wave trivial
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sorocon-labs/sorometer#59 ·
メンテナーはふだん 1 日以内に返信
-
2024.2 Backport Required 2025.2 Backport Required 2026.1 Backport Required 2026.2 Backport Required area/build-framework kind/enhancement priority/medium
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
yugabyte/yugabyte-db#39930 ·
メンテナーはふだん 1 日以内に返信