Repository navigation
Conversation
…ClassNames cx calls, read style functions of props Refs #690, #695 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #690, #695 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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
|
This was referenced Oct 4, 2026
owjs3901
added a commit
that referenced
this pull request
Oct 8, 2026
Preserve the updated parent guards and local-style features while capturing conditional rule controllers once and retaining static theme path checks. Refs #707 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #688 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
…e objects Refs #688 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #688 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #688, #690, #695 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
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 #688, #690, #695 (함수 안의 스타일 객체, ClassNames cx, Emotion 스타일 함수). 기존 부모 #740과 선행 composition 체인은 병합되었고 main 770aaac5를 실제 merge했습니다. 이제 이 PR이 체인의 맨 아래이며 #754는 최종 green HEAD 58de843 뒤에 병합합니다. 최신 검증과 새 오류·크기/시간 수치는 마지막 W62n 최종 갱신에 기록했습니다.
요약
다른 작업에서 발견된 다섯 가지를 고칩니다.
const inner = { color: 'red' }로 선언한 객체를css(inner)에 넘기면 클래스도 오류도 없이return inner로 컴파일되었습니다. 인라인되지 않은 식별자가 "알 수 없는 클래스"로 읽혀 그대로 남았기 때문입니다.<ClassNames>의 opaquecx호출 결과 허용은 부모의 정적 조합 계약과 충돌하므로 이번 갱신에서 제외합니다. 나머지 기능은 모두 유지합니다.css(cond && [{ ... }, { ... }])처럼 조건 아래의 규칙 객체 배열이Cannot compose오류였습니다.styled.div({ ... }).attrs({ ... })가 런타임 호출로 남아 던졌습니다.styled.div((props) => ({ ... })),styled.div({ ... }, (props) => ({ ... }))스타일 함수가Cannot compose오류였습니다.동작
1. 함수 안의 스타일 객체. 함수 안
const가 전부 리터럴로 쓰인 객체/배열이면, 최상위 상수와 똑같이 스타일 위치에서 인라인합니다(css(),styled(),globalCss(),keyframes(), 스타일 prop과 펼침, Emotion·styled-components·vanilla-extract 별칭,Global styles,ClassNames의css). 그 바인딩이 스타일에서만 읽힐 때만 컴파일하고, 다른 곳에서도 읽히면(바뀔 수 있으므로) 바인딩 위치에 오류를 냅니다. 리터럴이 아닌 값을 가진 객체({ color: c })는 호출 위치에LOCAL_STYLES오류를 냅니다. 객체를 그대로 돌려주는 경우는 없습니다.2.
ClassNames의cx. 알 수 없는 함수·멤버 호출은 Devup 스타일 클래스를 반환할 수 있으므로, 배열·조건·숫자 혼합 및 단독 호출 모두 부모의 위치가 표시되는 빌드 오류를 유지합니다. 해당 값이 Devup 스타일 클래스를 포함할 수 없다는 증명이 있을 때까지 opaque 호출 허용은 보류합니다.@emotion/css의 별도 계약은 변경하지 않습니다.3. 조건 아래의 배열.
css()는known_parts조합 경로로,styled()는 조건을 각 요소에 분배해(cond && [a, b]→[cond && a, cond && b], 삼항도 같은 방식, 조건이 같은 값을 내야 하므로 순수한 조건만) 조합합니다. 순수하지 않은 조건(get() && [...])은 이전처럼Cannot compose오류입니다.4.
.attrs뒤에 붙이기. 위치가 표시되는 빌드 오류입니다.5. props의 함수. 규칙 객체 하나를 한 번에 돌려주는 callback은 원래 invocation scope와 인수 평가를 유지한 채 한 번 호출하고, authored dynamic value를 순서대로 고정 vector에 캡처합니다. 컴포넌트는 그 값을 CSS 변수로 전달하며, nonzero 숫자는 기존 px 변환을 유지하고 unitless 값은 그대로 둡니다. 리터럴과 증명된 theme 경로는 정적 CSS에 남습니다. ordinary property callback과 상속·ref·attrs·slot 경로는 기존 계약을 유지합니다. 아래의 최신 실제 public WASM 출력과 Callback Scope 보완을 함께 보십시오.
최신 생성 코드와 CSS 원문은 아래 실제 Public WASM 출력에 기록했습니다.
새로 생기는 오류
Cannot readinneras styles at build time: ...(바인딩 위치).cannot useinner` at build time: a style object it composes must be written in it, or declared with `const` at the top level of the module, where the build reads it`.styled(...)(...)뒤에.attrs(...): 위의chain .attrs before the styles오류.async가 있을 때): ``styled()cannot use<함수>` at build time: a style function of the props must give one rule object at once, with every entry written out, ...`.ClassNamescx(getClass())및 숫자·배열·조건 내부 unknown-call 오류는 유지합니다. 알려진 규칙 배열의 일부 중복Cannot compose오류만 해소합니다.남는 한계
p.on && { ... }처럼 조건으로 규칙 객체 자체를 고르면 오류입니다(값마다 조건은 지원).const객체와 달리, 함수 안 객체는 값이 전부 리터럴이어야 컴파일됩니다.get() && [...])이 고르는 배열은 오류입니다.{...inner}처럼 런타임 값이 있는 객체를Box에 펼치는 동작은 이 PR의 범위 밖입니다(이전과 같음).검증
최신 공유 Rust stable과 새 WASM/root build의 전체 검증 결과는 아래
W62g 실제 재검증에 기록했습니다. 이전 head의 역사적 성공을 이번 변경의 검증으로 계산하지 않습니다.2026-10-08 main 11790bef를 병합하여 업데이트했습니다. 충돌 없이 갱신된 부모 PR의 변경과 main의 변경을 모두 보존했습니다.
2026-10-18 W62g 갱신: 갱신된 #740
93fe24a4877d11a14f30a7a1fd914eefe6f3b8e4를 실제 두 부모 merge commit으로 반영하고 maina6ecc125및 정적 fallback 26개 단언·capture/slot/marker·부모 오류 가드를 보존했습니다. ClassNames 호출 허용에 관한 자체 테스트test_emotion_class_names_keeps_calls_as_classes는 located error를 명시적으로 검증하도록 바꾸고test_emotion_class_names_reports_what_it_cannot_compile에는 부모의 단독cx(getClass())거절을 복구했습니다. ClassNames cx의 opaque 호출은 Devup 스타일 클래스를 포함할 수 없다는 증명이 있기 전까지 위치가 표시되는 오류로 유지하며, 해당 허용 하나만 보류하고 다른 #745 기능은 유지합니다.test_style_objects_declared_in_functions스냅샷은 부모 globalCss/keyframes의 인수 위치·오류 순서만 반영하고test_styled_functions_of_the_props_and_arrays_under_conditions스냅샷의 규칙 객체가 아닌 반환은 부모의 호출 위치 Cannot compose 거절을 보존합니다.test_styled_props_rules_keep_unmapped_theme_guards와test_styled_function_leaves_map_literal_theme_paths는 정규화 전 theme 거절·일반 함수 리터럴 경로를 검증하고,conditional_rule_arrays_keep_one_getter_read_and_consistent_branches는 기존 capture lowering으로 getter를 한 번만 읽어 분기가 섞이지 않음을 두 CSS 모드에서 검증합니다. 동일 배열 입력은 정확한 main a6ecc125와 부모 93fe24a4에서는 기존 located Cannot compose 오류였고, 이 PR에서 새로 허용한 경로의 중복 읽기를 수정한 것입니다.Theme 추가 회귀
test_styled_renamed_theme_roots_keep_located_errors는 별칭 root 우회를 독립 RED로 재현한 뒤 검증합니다. 승인된 기존 theme 경로 정책을 재사용하여p['theme']및({theme: themeValue})의 리터럴 경로는 같은 CSS 변수로 매핑하고, 동적 키·호출은 기존 located error를 유지합니다. 정확한 main a6ecc125와 부모 93fe24a4는 해당 whole-rule/value-callback 네 입력을 모두 기존 오류로 거절했으며 런타임 theme 접근을 내보내지 않았습니다.별도 수정 예정인 기존 오류: 일반 class-name 경로에서 literal-table 키 객체의 Symbol.toPrimitive와 뒤쪽 opaque 클래스 getter의 순서가 뒤바뀔 수 있습니다. 정확한 main
a6ecc125와 부모 #74093fe24a4의 public WASM에서 두 CSS 모드 모두on,key,after,coerce및 blue를 재현했습니다(올바른 순서는on,key,coerce,after및 red). coordinator 결정msg_fb5ec7b4a02b에 따라 이 PR은 해당 부모 동작과 동등하게 유지하고 일반 경로 수정은 별도 PR로 분리합니다. 실험 회귀lookup_key_coercion_precedes_later_opaque_reads의 올바른 red 기대값과 실제 RED 결과·30개 origin probe는 W62g 별도 재현 자료에 변경 없이 보존했으며 기존 부모·원래 #745 테스트는 제거하거나 완화하지 않았습니다.W62g 실제 재검증
2026-10-18 현재 부모 검증은 로컬 실제 merge
ffc8ff6a의 두 부모d846365d+93fe24a4위에서 수행했습니다. 원격 검증은 마지막 CI 기록의 실제 head/run만 근거로 삼으며, 이전 head의 성공 run을 새 수정의 검증으로 사용하지 않습니다.CARGO_BUILD_JOBS=2, 기본 Rust stack으로 fmt check / workspace·all-target strict Clippy / 전체 Rust 테스트 4,990 pass, 0 fail, 0 ignored.INSTA_FORCE_PASS와 snapshot update를 해제한 최종 재실행도 성공했습니다..snap.new는 남기지 않았습니다.bun install→ bindings WASM build → root build 성공, Bun 5,922 pass, 0 fail, 함수·라인 100%, lint 0 errors / 기존 warnings 9개. 로컬 Bun 1.4.3 / Node 24.19.0 / wasm-pack 0.15.0을 관찰했으며 Rust나 도구 버전을 낮추거나 고정하지 않았습니다.Script::parse에서 재현했습니다. 실행하지 않은 callback과 catch를 없앤 control도 넘쳤고, 단순 catch는 성공했습니다. 숫자 변환을 캡처한 고정 slot으로 옮기고 중복된 compiler-owned IIFE만 제거한 뒤, 원본 catch/더 깊은 loop 입력을 바꾸지 않고 두 CSS 모드의 기본 stack에서 성공했습니다. stack/profile 조정, authored callback body wrapper 변경, 런타임 helper·프로토콜·규칙 해석기는 추가하지 않았습니다.207443f07750a5a6a57267783510177c8508dca6de051bd039f4b8cc597ce148. 빌드·테스트 job은 모두 owned process를 0까지 정리했습니다. Rust LSP daemon은 timeout이므로 LSP clean이라고 주장하지 않으며 실제 컴파일·Clippy·테스트 결과로 검증했습니다.Local Member 정적 가드 보완
최종 리뷰가
const holder={rules:{color:'red'}}; holder.rules.color='blue'; css(holder.rules)의 stale red 컴파일을 발견했습니다. 기존 가드가 bare identifier만 세고 member/fold/조건 선택으로 지워진 참조를 놓친 원인입니다. 두 모드에서 native 16 FAIL / safe 12 PASS, public 16 RED, 14개 API baseline의 safe 28 PASS / unsafe 56 RED를 먼저 실행한 후 수정했습니다. 원래 RED 기대값과 부모 negative는 그대로입니다.성공한 AST 치환에서 지워지는 semantic reference ID를 원래 symbol에 한 번만 계산합니다. 조건의 test/버려진 branch는 계산하되, 선택되어 런타임에 남는 subtree와 실패한 fold probe를 미리 계산하지 않습니다. 원래 reference 총수·binding 위치·
Cannot read ... as styles ... it is also read elsewhere오류와 safe style-only member 동작은 유지합니다. 같은 참조를 다시 방문해도 중복 가산하지 않으며 numeric/fallback/ClassNames 경로와 별도 generic key-coercion 정책은 바꾸지 않았습니다. 새 native accounting 90개를 포함한 최종 4,990개와 public 16+84개가 모두 성공했습니다.Callback Scope 보완
Whole-rule callback은 원래 arrow/일반 함수, 이름, 인수·중첩 destructuring·default·rest, strict directive,
this/arguments소유권을 유지하며 실제 props를 한 번만 받습니다. 모든 authored dynamic leaf는 사라진 선언까지 순서대로 한 번 캡처하고, empty/static-only callback의 인수 평가도 render마다 보존합니다. function-valued leaf는(0, slot)(rest)로 호출하여 배열을 receiver로 주지 않습니다. 상속·attrs·ref·children·caller style·CSS slot·marker·retargeting 및 부모 static fallback 26개 단언을 유지했습니다.암묵적인 실제 props theme 접근은 own
arguments[0]또는 첫 번째 rest formal의[0]를 검사하되, catch/loop/switch lexical binding은 해당 scope 안에만 적용하고 nested block의var는 함수 scope로 처리합니다. 기존 정적 theme 경로 매핑을 확대하지 않았습니다.새로 생기는 오류 (이번 보완)
이름 있는 whole-rule callback이 자신의 실제 함수 binding을 참조하면 위치가 표시되는 build error가 나며 callback 이름과
recursion is not compiled이유를 제공합니다..name/.length, default와 nested capture도 포함하며, 같은 철자의 다른 lexical binding과 property 이름 또는 일반 property callback은 이 거절에 포함하지 않습니다. 정확한 main3ca6182f와 부모 #74093fe24a4도 원래 재귀 입력을 두 모드 모두 located error로 거절했으므로, 이 PR의 새 경로가 만든 runtime ReferenceError/undefined를 방지하는 승인된 수정입니다.자체 신규 draft
normal_callback_identity_and_direct_scope_survive_when_it_is_named의 metadata-positive 기대는 승인된 정책에 맞는 명시적 거절과normal_callback_direct_scope_survives_when_named_without_self_references로 분리했습니다. strictthis/ ownarguments/ 실제 인수 한 개의 positive 검증과 원래 부모 negative는 유지했습니다. 추가 인수나arguments/rest로 우회한 unprovable theme read도 기존 located error를 유지합니다.남는 한계는 승인된 기존 범위와 같습니다. ClassNames cx의 opaque 호출 허용 하나만 보류하며, 일반 object key coercion 순서 오류는 기존 main/부모 origin과 현재 head 관찰 30건을 남겨 별도 수정합니다. 재귀적으로 반환한 rule object의 런타임 해석은 지원하지 않으며 스타일링 런타임을 추가하지 않습니다. Linux Rust 100%는 새 head의 실제 CI 결과를 확인한 후 별도로 기록합니다.
실제 Public WASM 출력
입력:
생성 코드:
생성 CSS (singleCss의 base CSS 원문):
이름 있는 callback의 실제 오류:
Member mutation의 실제 입력과 오류:
W62n 최종 갱신 (2026-10-21)
최종 HEAD는
58de84303cf30fc5023d59a50734db6e8df1f5e4이며, CI 39538680688이 첫 시도에 성공했습니다.main 770aaac5를 실제 merge한587a11c1및 후속a2cbceaa의 기존 수정과 원래 단언을 모두 보존했습니다. 실제 CI merge ref180acda94b71435368038e3e1952fbf17b94935b의 트리는 로컬에서 검증·훅·커밋한 트리a4e8441ea7b066d1c52d53a81cfad73f26c0ce11과 같습니다. 이 PR은 이제 병합된 부모들을 포함한main위의 맨 아래 PR이며, #754가 이 최종 green HEAD를 뒤이어 반영합니다.요약 / 동작
this·arguments와 실제 값 shadow는 바꾸지 않습니다.Preparation::value의 마지막 경로는Evaluations::capture를 직접 호출합니다. 생성 이름·CSS/코드·기존 오류의 문구/위치/순서·크기 정책·도구 버전·stack/profile은 바꾸지 않았고 런타임이나 의존성을 추가하지 않았습니다.새로 생기는 오류 / 원인 귀속
다음 입력은 타입 이름이 같아도 값 자기참조이므로 기존의 위치 오류가 납니다.
실제 공개 WASM 출력:
정확한 공개 엔진으로 main770 / parent587 / a2를 먼저 비교했습니다. main770은 해당 whole-rule callback 입력 세 개 모두를 위치 포함
Cannot compose로 거부하므로 같은 허용 경로의 우회가 노출되지 않습니다. parent587과 a2는 다른 타입 이름의 자기참조는 거부하지만 같은 이름이면 허용했습니다. 따라서 a2에서 새로 생긴 결함이라고 하거나, main에도 같은 허용 경로의 결함이 있다고 추정하지 않습니다.function rules<rules>(p:rules){return {color:'red'};}처럼 타입으로만 쓰는 대조군은 generic을 유지하고.a{color:red}로 컴파일되며, 실제 값 매개변수·중첩 값 shadow도 유지합니다. 기존 오류 문구를 바꾼 것이 아니라 놓치던 입력에 같은 진단을 적용합니다.크기 / 추출 시간
1% WASM 정책은 그대로이며 실제 Linux CI
wasm-size가 통과했습니다.직전 a2의 실제 Linux raw 6,054,095에서 218 bytes 감소해 207 bytes 초과를 해결했습니다. Linux gzip은 a2의 2,202,702에서 305 bytes 감소했습니다. 동일 로컬 도구의 별도 비교는 고정 a2 raw 6,059,994 / gzip 2,203,856 → 최종 raw 6,059,776 / gzip 2,203,417(−218 / −439)이며, 로컬 수치와 Linux 수치를 섞지 않습니다. 각 중간 후보의 raw/gzip과 paired 시간도 별도 보존했습니다.
기존 Criterion의 14개 원문 코퍼스와 고정 a2 공개 WASM을 그대로 사용했습니다. 런타임 raw literal의 CRLF→LF는 Rust lexical 처리와 같게만 적용하고 출력 코드/CSS/오류는 정규화하지 않았습니다. 한 번의 추출은 reset·theme/debug/prefix·공개 extract/getters/getCss/free를 포함하고 모듈 로드·warmup·비교 assertion은 제외합니다. 다음 값은 각 case 한 번의 추출 시간을 동일 가중치로 더한 것이며 앱 빌드 시간이나 native Criterion 수치가 아닙니다.
두 실행 모두 14 accepted / 0 rejected이고 원문 출력이 정확히 일치했습니다. 통합 200 paired 비율 중앙값은 0.997736, 105/200쌍이 더 낮았으며, 독립 쌍을 가정한 중앙값 95% order-statistic 구간은 0.989279–1.003869입니다. 이는 새 합격 허용치를 만든 것이 아니며 속도 향상이나 수학적인 무감속 증명이 아닙니다. 전체 수치는 방향이 바뀌어 반복되는 전체 추출 감속이 확인되지 않았지만, CSS-template 두 case의 pooled paired 중앙값 1.01624 / 1.01948 및 보정하지 않은 양의 구간도 숨기지 않습니다. 다중 비교·공유 머신 잡음·쌍의 독립성에는 불확실성이 남습니다. 같은 아티팩트 smoke와 다른 후보 반복에서도 방향이 바뀌었으며, CI
benchmark는 기존 정책 그대로 첫 시도에 성공했습니다. 유리한 중앙값만 골라 성능 향상을 주장하지 않습니다.검증 / 남는 한계
verify:dist모두 성공했습니다. 최신 공유 stable 1.99.1, Bun 1.4.3, 시스템 Node 26.12.0, wasm-pack 0.15.0을 사용했습니다.{}aliases 비교는 Emotion pass-through였으므로 해당 오류의 근거로 세지 않고, 리뷰 지적 뒤 수정한 alias-enabled 증거만 사용합니다.bindings/devup-ui-wasm/package.json만 Patch입니다.ClassNames cxunknown-call 허용 하나는 계속 보류하며 두 원래 guard 테스트와 기존 located error를 유지합니다. callback-form admission 자체가 거부하는 wrapper 구문을 새 지원이라고 주장하지 않습니다. 동적으로만 알 수 있는 전체 규칙 키·재귀 rule-object 해석은 계속 빌드 오류이며 스타일링 런타임을 넣지 않습니다. 별도 소유였던 일반 key-coercion 문제를 이 갱신에 몰래 포함하거나 현재 main 상태를 추정하지 않았습니다.