Repository navigation
fix(extractor): compile imported styled retargets without redundant imports - #806
Merged
Merged
Conversation
Refs #689 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
Refs #689 Integrate settled main containing #893 while preserving the imported styled retarget repair. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
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 #689 (styled/compat). main 기준의 독립 PR이며, 다른 PR의 선행 병합이 필요하지 않습니다.
요약
다른 프로젝트 모듈에서 가져온 styled 컴포넌트에
.withComponent(...)만 호출하는 파일이, 직접적인 스타일링 패키지 import가 없다는 이유로 추출에서 제외되는 문제를 수정합니다.통합한 MAIN SETTLED:
7de627104afa3cc36f5b328f0937d8b901d07887(#893 포함). 기존 imported-styled 사용 탐색과 정의 해석을 재사용하며, 새 런타임 helper/method shim이나 별도 callback 복제 경로는 추가하지 않습니다. 기존 컴포넌트 생성 방식은 변경하지 않습니다. settled main 대비 이 PR 자체의 의존성, 설정, 임계값, 예산, lockfile 변경은 없습니다.동작
withComponent와import가 모두 있는지 확인하는 저비용 사전 필터에만 사용합니다. 실제 허용 여부는 root binding의 semantic symbol과 기존 module resolver가 읽은 styled 정의로 결정합니다.has_devup_ui_with와 공개 WASMhasDevupUI도 같은 판정을 사용합니다. Bun의 사전 필터가 이 입력을 통과시키며 Vite, Next webpack/Turbopack, webpack, Rsbuild의 기존 공통 extraction 진입점에도 적용됩니다. TypeScript 플러그인별 별도 heuristic은 추가하지 않았습니다.@/* -> src/*, NextwithModuleResolver, 원래 Base/Dyn fixture를 사용합니다. 완전한 emitted module을 평가하고 실제 React forwardRef renderer의 출력과 emitted CSS를 확인합니다.TypeError: Dyn.withComponent is not a functiona/ 같은 ref 객체 /childbig=false/big=true의 font-size10px/20px새로 생기는 오류
새 오류 종류는 없습니다. 새로 인식되는 known-styled 호출의 인수가 기존 지원 조건을 벗어나면 기존
withComponent빌드 오류 규칙을 그대로 따릅니다. 일반 객체의 동명 메서드를 styled 호출로 판단하지 않습니다.남는 한계
검증
최신 main 통합 (2026-11-02)
7de627104afa3cc36f5b328f0937d8b901d07887를 충돌 없이 true merge했습니다. 최종 head는25b44b5458454e62b5562788d290e68b5601f61e, 실제 parent는9c684a01a9910877a7d1bbd48f0aab2950e112d2+7de627104afa3cc36f5b328f0937d8b901d07887, tested/staged/committed tree는 모두0927aa5213999d5a858e63cb2774077340aeb77a입니다. 이전 head 대비 main 소유 JS·테스트·설정 13경로만 통합했으며 Rust/의존성 입력은 이전 검증 head와 같습니다.이전 main 통합 (2026-11-01)
공지된 MAIN SETTLED **
7af8166487851bdfc884d735ec16160c9930443e**를 true merge했습니다. 검증된 snapshotac79df39와 main의 merge-tree에는 새 충돌이 없었고, 실제 merge 상태에서 원래 두 충돌을 검증된 결과로 복원했습니다. 최종 **5056586598b5171987d1369b665f42f7616c887f**는 libs/packages/bindings/Cargo 입력 모두 검증된 snapshot과 동일합니다. settled main 대비 원래 11경로만 변경합니다.main의 import semantic guard, checked parser, 단일 allocator, 같은 Program의 Rc scoping 및 origin-owned staged renderer를 보존했습니다. #806의 저비용 relevance 사전 필터, 두 skip-guard 예외 및 이미 읽은 Reading 재사용도 유지합니다. callback 복제나 별도 런타임 helper는 없습니다. 정적 literal-bracket namespace와 dot의 동등성, 혼합 shadow occurrence, 원본 standalone Base/Dyn 및 retarget을 두 CSS 모드에서 실제 React로 검증합니다.
Bun 1.4.4, Node 26.12.0, default Rust stack, CI unset, jobs2 (workspace --jobs1). frozen install 1191 installs / 1433 packages, no changes, fresh WASM/root build/verify:dist와 full fmt/clippy -D warnings/TS6-preload ESLint 통과. focused imported-styled 87/0, workspace 10,891/0/0 ignored, 실제 emitted-module React 파일 16/0, 473 assertions; root 6,774/0, Vite 870/0, 양쪽 실제 All files 100.00% functions / 100.00% lines입니다. 새 snapshot을 생성/승인하지 않았습니다.
ONE 정상 훅 / ONE push. 훅 872.934초, peak 6,366,941,184 bytes (12 GB 상한), heartbeat 실패 0, 정확한 owned job 종료/empty. 훅 root 6,774/0, Vite 870/0, 양쪽 100.00/100.00. Windows Rust tarpaulin **97.66% (31842/32605)**는 Linux 100%로 표현하지 않습니다. 검토/tested/staged/commit tree가 모두
50565865, 새 head9c684a01a9910877a7d1bbd48f0aab2950e112d2, 실제 parentfa4d6635+7af81664, clean 작업 트리를 확인했습니다.정확한 head
9c684a01a9910877a7d1bbd48f0aab2950e112d2의 CI 41277398065 FAILURE, attempt 2. publish: failure / benchmark: success / release-compat: success / landing-next-e2e: success / vinext-rsc-css-e2e: success / react-18: success / webpack-extends-theme: success / wasm-size: success. main 전용 release/deploy-pages는 PR 조건에 따라 skipped입니다.아래 이전 head 검증 당시에는 전체 CI가 green이 아니었습니다. 이 외부 API 실패는 #893을 포함한 최신 main 통합 후 아래 새 run에서 해소되었습니다. main의 #891에서 추가된 vinext dev-navigation lane이 외부 GitHub API 403으로 실패했습니다. 최초 시도는 /team의 인증 없는 서버 요청을 포함해 5개 실패, 허용된 publish job 단 한 번의 재실행에서도 / 및 /ko의 StarButton 브라우저 요청 403으로 2개가 실패했습니다. 추출기/coverage/benchmark 실패로 표현하지 않으며, 별도 main 기반 테스트·workflow 수정으로 해결할 때까지 완료로 간주하지 않습니다.
새 head의 Linux 실제 tarpaulin: 100.00% coverage, 22299/22299 lines covered, +0.00% change in coverage. root/Vite 실제 All files와 landing/benchmark 수치도 이 새 run의 로그로 확인했으며, 아래 최초 제출 당시의 수치와 구분합니다.
최초 제출 당시 검증 (아래 성능과 CI는 이전 head의 역사적 기록)
Dyn.withComponent is not a function. 불필요한 import만 추가한 두 control은 이미 target/ref/children/10px/20px 검증을 통과했습니다.cargo test --workspace전체 통과. 기존 snapshot 변경 없음; 새 snapshot 4개는 named/reexport/namespace/control의 실제 emitted code와 dependency 목록입니다.cargo fmt --all -- --check통과. WASMbun run build및 루트bun run build통과.bun lint는 새 helper의 wildcard import를 지적하여 explicit import로 수정했습니다. 첫 hook은 이후 추가한 테스트 줄의 CRLF formatting을 지적해 해당 테스트 파일만 scoped fix했습니다. 최종 정상 hook은 fmt/clippy-D warnings와 ESLint 0 errors / 기존 warnings 20개로 통과했습니다. hook 우회/수정, amend는 하지 않았습니다.bun test --coverage: 6252 pass / 0 fail, 168 files, 89 snapshots, 23247 assertions, 254.67초.CARGO_BUILD_JOBS=2. 공유 Bun/설정은 변경하지 않았습니다. 첫 commit 명령은 clone의 author identity 부재로 hook 이전에 종료되어, 인증된 계정의 identity를 그 명령의 환경 변수에만 지정했습니다.성능 (12쌍 AB/BA 교차 실행의 중앙값, µs/호출)
무트리거 corpus의 resolver 호출 수는 전후 동일(작은 모듈/직접 스타일 0, 일반 import 1)하며 sample 범위는 겹칩니다. trigger가 있는 파일만 의미 분석과 기존 styled reader 비용을 지불합니다. known retarget의 정상 추출은 relevance에서 읽은 정의를 재사용하여 불필요한 두 번째 styled resolve를 하지 않습니다. 두 trigger corpus의 resolver 호출은 기존 barrel 확인 1회에서 styled 확인을 포함한 2회로 증가합니다.
CI 완료
Publish Package to npm — 40025554388, head
fa4d6635b7de18e832035efe3f739fd2d5f947dc: success, 첫 실행에서 완료, rerun 없음.Linux wide-format 후 tarpaulin: 100.00% (17059/17059), 새 relevance 모듈 15/15.
--fail-under 100gate 통과. 배포/release는 PR 이벤트 조건에 따라 skipped입니다.