Skip to content

fix(extractor): report vanilla-extract companions however they load - #906

Merged
owjs3901 merged 1 commit into
mainfrom
fix/vanilla-extract-loads
Nov 14, 2026
Merged

owjs3901 merged 1 commit into
mainfrom
fix/vanilla-extract-loads

Conversation

@owjs3901

Copy link
Copy Markdown
Contributor

Summary

  • VE-04: before this change, the recipes and sprinkles check (companion_errors) only looked at import declarations, so export … from, export *, require() and import() got past it with no error. It now uses the new module_loads helper, which finds imports, export … from, export *, require('…'), import x = require('…') and import('…'), and skips anything type-only. @vanilla-extract/dynamic is added to the list with its own message. That package assigns variables at runtime, which Devup UI does not keep ([전수조사] 결과와 개발 범위 (2026-09-30) #682).
  • VE-02 (globalKeyframes(name, frames) per [전수조사/D] 흡수 라이브러리 기능: css prop, 컴포넌트 선택자, @emotion/css, VE·StyleX API #690) gets a targeted error, not an implementation. Devup UI names every keyframes by hashing its content (ExtractKeyframes → keyframes_to_keyframes_name), so a keyframes with a fixed global name has nothing to compile to. I also tested emitting it as globalCss({ '@keyframes fade': {...} }), but that object form flattens the frames into one at-rule with opacity: 0/.5/1, so it isn't usable without changing globalCss itself. Before this change the stylesheet run failed with TypeError: not a callable function. Now a globalKeyframes import from @vanilla-extract/css is a located error that names it and says to use keyframes(), or to opt the alias out. A real implementation would need fixed-name keyframes support in globalCss, which can be a follow-up.
  • module_loads.rs is identical to the copy in fix(extractor): report Emotion code left at runtime as located errors #904, so the two PRs merge cleanly (checked with git merge-tree).
  • Docs: the limitations table and the vanilla-extract migration page.

New build errors (while @vanilla-extract/css is aliased):

  • `@vanilla-extract/recipes` / `@vanilla-extract/sprinkles` generates CSS that Devup UI does not compile … for re-exports, require() and import()
  • `@vanilla-extract/dynamic` assigns variables at runtime …
  • `globalKeyframes()` from `@vanilla-extract/css` is not compiled by Devup UI …

Refs #690

Test plan

  • cargo test -p extractor --lib -- companion module_loads vanilla (295 passed)
  • cargo clippy -p extractor --all-targets -- -D warnings, cargo fmt --all
  • CI: full test suite + tarpaulin 100%

🤖 Generated with Claude Code

The recipes and sprinkles check read import declarations only, so
`export … from`, `export *`, `require()` and `import()` bypassed it.
It now finds every way a module loads, and adds `@vanilla-extract/dynamic`,
whose runtime variable assignment Devup UI does not compile.

`globalKeyframes` imported from `@vanilla-extract/css` is a targeted
located error: Devup UI names every keyframes itself, so a fixed global
name has nothing to compile to, and the stylesheet run failed with a bare
`TypeError: not a callable function`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
libs/extractor/src/import_alias_visit.rs 100.00% <100.00%> (ø)
libs/extractor/src/lib.rs 100.00% <ø> (ø)
libs/extractor/src/module_loads.rs 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@owjs3901
owjs3901 merged commit 54b6430 into main Nov 14, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant