You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
langs: unused imports in generated src/index.ts (e.g. objectiveC) #761
objectiveC is imported but never referenced in the langs map — only objectiveCpp is used (for the .mm extension).
Root Cause
In gen-langs-map.cjs, parseLoadSpec() calls addNamed() as a side effect during AST parsing, which adds symbols to the import list immediately. Later, when multiple languages share the same file extension (e.g. Objective-C and Octave both use .m), the dedup step (mapObj.set(k, v) — last one wins) drops the losing entry's expression from the output, but the import was already registered and persists.
Impact
Minor: unused imports bloat the generated file and may trigger linter warnings
No runtime breakage — the unused symbols are simply dead code
Potential Fix
Defer addNamed calls until after the dedup step, so only symbols actually referenced in the final langs map get imported. This would require restructuring the generation flow to separate "parse specs" from "collect imports".
Activity
fix(langs): remove unused imports in generated index.ts #761
v4.25.6 fix(langs): remove unused imports in generated index.ts #761 d…
v4.25.7 released v4.25.7 fix #761 d61fc4f
released v4.25.7 fix uiwjs#761