[2.0] Exclude build-host native artifacts from the generic binding release

クローズ
#477 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
15/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust, typescript

調査の方向性

Start with the files field in packages/binding/package.json, then the packing step in scripts/semantic-release-workspace.mjs, and compare it with the rejection logic in scripts/site-toolchain-snapshot.mjs. The loader order in packages/binding/src/native-loader.ts around lines 407-411 shows why the local artifact wins. Done means a packed @master/css-binding tarball contains no artifacts/mastercss.node or artifacts/mcss, and the matching target package is still selected for each platform.

索引モデルが issue の本文から書いたものです。

説明

Parent: #470 (release tracker #467)

Release blocker

The standard release can publish the build host's native binary inside the platform-neutral @master/css-binding package. Its loader prioritizes that local artifact over the correct optional target package, breaking consumers on another OS/architecture.

Evidence

  • packages/binding/package.json includes artifacts in files.
  • cargo xtask build-native writes packages/binding/artifacts/mastercss.node and the CLI executable. The release runs the root build before packing.
  • scripts/semantic-release-workspace.mjs packs the package without excluding those development artifacts.
  • packages/binding/src/native-loader.ts:407-411 selects resolvePackageArtifact('mastercss.node') before the matching target package.
  • Calling the actual release plugin's prepare in a disposable workspace produced a tarball containing both package/artifacts/mastercss.node and package/artifacts/mcss.
  • Simulating the Linux release binary in that generic package on macOS reproduced NATIVE_LOAD_FAILED / invalid Mach-O even with the matching Darwin package available to resolution. No working-tree binary was changed.

The snapshot staging path already rejects this condition in scripts/site-toolchain-snapshot.mjs, but the standard release path lacks the same protection. A successful native target smoke test does not exercise the generic wrapper tarball.

Acceptance

  • Generic binding tarballs contain no build-host native artifacts; native binaries ship only in matching target packages.
  • Add a packed-wrapper check to the actual release preparation/validation path, not only snapshot staging.
  • Test the assembled public dependency closure on every supported target, verifying selection of the matching addon and CLI.
  • Preserve intentional local-checkout artifact loading without exporting it into published archives.
  • Reconcile snapshot and normal release packing so one cannot succeed with an artifact shape the other correctly rejects.
主要言語
TypeScript
スター
2k
フォーク
44
平均マージ
1日 14時間
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

master-co/css のほかの issue

master-co/css の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。