Repository navigation
fix(extractor): preserve leading JSX compiler pragmas - #784
Merged
Merged
Conversation
Refs #686 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #686 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #686 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #686 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This was referenced Oct 16, 2026
Open
Contributor
Changepacks@devup-ui/wasm@1.0.83 → 1.0.84 - bindings/devup-ui-wasm/package.jsonPatch
@devup-ui/bun-plugin@1.0.22 → 1.0.23 - packages/bun-plugin/package.jsonPatch
@devup-ui/components@0.1.60 → 0.1.61 - packages/components/package.jsonPatch
@devup-ui/eslint-plugin@1.0.22 → 1.0.23 - packages/eslint-plugin/package.jsonPatch
@devup-ui/next-plugin@1.0.90 → 1.0.91 - packages/next-plugin/package.jsonPatch
@devup-ui/plugin-utils@1.0.17 → 1.0.18 - packages/plugin-utils/package.jsonPatch
@devup-ui/react@1.0.44 → 1.0.45 - packages/react/package.jsonPatch
@devup-ui/reset-css@1.0.31 → 1.0.32 - packages/reset-css/package.jsonPatch
@devup-ui/rsbuild-plugin@1.0.67 → 1.0.68 - packages/rsbuild-plugin/package.jsonPatch
@devup-ui/vite-plugin@1.0.73 → 1.0.74 - packages/vite-plugin/package.jsonPatch
@devup-ui/webpack-plugin@1.0.71 → 1.0.72 - packages/webpack-plugin/package.jsonPatch
|
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
Refs #686; stack #784 on #783 and #781. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This was referenced Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #686 (H: 플러그인/WASM의 JSX pragma 유실). main
a6ecc125에서 시작한 독립 수정이며 먼저 병합해야 하는 PR은 없습니다. #727/#728은 읽기 전용으로 호환 동작을 확인했으며 이 브랜치에 병합하지 않았습니다.요약
W60f-main-pragma-classification.md와W60f-main-pragma-output.json에 기록된 main 공개 WASM 재현을 바탕으로 수정했습니다. 동일한 direct-import 입력을 별도 실제 Bun 빌드에서도 재현했습니다. 입력 SHA-256은4872a0aae6db301a6fb4c63e7e0992112eccbe37953ef9aabf4eb376c2c2b8d8입니다.@jsx,@jsxFrag,@jsxRuntime,@jsxImportSource를 AST 변환 전에 식별하고, 출력할 노드에 다시 붙입니다. Oxc가 주석과 source map을 한 번에 만들므로 출력 뒤 문자열을 덧붙이지 않습니다.동작
.js,.jsx,.ts,.tsx와 일반/라이선스 선행 주석, pragma 앞뒤의use client, hashbang, 사라지는 단독 import를 처리합니다. directive prologue와 pragma의 상대 순서가 유지됩니다.PURE/NO_SIDE_EFFECTSannotation과 같은 주석 안에 있는 JSX 지시도 보존합니다. 원래 call/function의 annotation 의미는 남기고 header 주석은 일반 출력 경로로 보내며, 이 조합 4건도 RED 후 GREEN을 확인했습니다.@jsxImportSource @emotion/react의 값만react로 바꿉니다. main 플러그인은 번들러가 나중에 추가하는 Emotion JSX runtime을 redirect하지 않으므로, 이를 그대로 보존하면 Emotion styling runtime이 다시 들어올 수 있습니다. fix(extractor): compile Emotion's css prop at build time #727/#728의 명시적 React rewrite와 호환되는 bridge이며, Emotion alias를 끈 파일 및 React/Preact/custom import source는 그대로 보존합니다.W60f와 동일한 입력의 fresh 공개 WASM 출력:
실제 Bun/Vite 번들은 자체
createElement("div", { className: "b" })를 사용합니다.react/jsx-runtime,react/jsx-dev-runtime, Devup runtime stub 또는 Emotion runtime은 이 classic fixture의 JS에 남지 않으며, 같은 빌드를 두 번 실행한 JS/CSS가 동일합니다.새로 생기는 오류
없습니다. 원래 유실되던 JSX 컴파일러 지시를 전달하는 수정이며, 새 build error나 의존성을 추가하지 않습니다.
남는 한계
cssprop 전체 컴파일 기능은 별도 fix(extractor): compile Emotion's css prop at build time #727/#728의 범위이며 이 PR에 포함하지 않습니다. 조사 중 확인한 기존 모듈 간 함수 평가 제약도 확장하지 않았습니다.검증
CARGO_BUILD_JOBS=2, 전체 process-tree 6 GiB 한도에서 fmt, Rust 1.99 workspace/all-target Clippy(-D warnings), workspace tests, fresh WASM/root build를 실행했습니다.bun lint는 오류 없이 통과하며 기존 React 19 migration 경고 9개 외 새 경고는 없습니다. LSP는 서버 미설치/daemon timeout 때문에 사용할 수 없어 clean으로 주장하지 않습니다.CIunset/기본 스택/전체 process-tree 12 GiB 조건으로 통과했습니다. Rust 4,198건(추출기 3,345건), Bun 5,909건 모두 실패 0건이며, 같은 staged tree를 커밋했습니다.--fail-under 100을 최종 Rust gate로 확인합니다.최종 CI
head
9f7227be1222c27258ac0e127b1943d42640dce5, run 38963604832: success.publish,vinext-rsc-css-e2e,landing-next-e2e,benchmark4개 job과 Codecov patch check가 모두 통과했습니다.publish 실제 로그: Rust 100.00%, 12,440/12,440 lines covered, Rust 테스트 4,198건/실패 0건, Bun 5,909건/실패 0건 및 함수·라인 100%.
실제 built-plugin 별도 regression도 9건/실패 0건입니다. 기본 스택 조건을 바꾸거나 coverage 제외를 추가하지 않았습니다.
2026-10-17: #784는 fix(next): deliver complete webpack CSS across compilers and cached builds #783 및 그 안의 #781을 포함하며 두 PR 다음에 바로 병합할 수 있도록 스택했습니다. libs/extractor/src/lib.rs의 모듈 목록 충돌은 parsing과 세 pragma 테스트 모듈을 모두 유지하고, 파싱 호출 충돌은 parsing::parse 직후 HeaderPragmas::capture를 수행하도록 해결했습니다.
2026-10-17: main(b4c143b)을 포함한 갱신된 #783을 병합했습니다. 실제 내용 충돌 없이 자동 병합되었습니다(코드 변경 없음). 병합 순서는 그대로 fix(next): deliver complete webpack CSS across compilers and cached builds #783 다음입니다.