Skip to content

chore(tinyest-for-wgsl): Remove Acorn support - #2856

Open
cieplypolar wants to merge 2 commits into
mainfrom
chore/drop-acorn
Open

chore(tinyest-for-wgsl): Remove Acorn support#2856
cieplypolar wants to merge 2 commits into
mainfrom
chore/drop-acorn

Conversation

@cieplypolar

Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown

pkg.pr.new

packages
Ready to be installed by your favorite package manager ⬇️

https://pkg.pr.new/software-mansion/TypeGPU/tinyest-for-wgsl@6cf635a19d57749cb122b0670935302da45a7981
https://pkg.pr.new/software-mansion/TypeGPU/typegpu@6cf635a19d57749cb122b0670935302da45a7981

benchmark
view benchmark

commit
view commit

@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown

Bundle size comparison (import * as ... in PR vs import * as ... in target):

🟢 Decreased ➖ Unchanged 🔴 Increased ❔ Unknown
0 324 0 0

import { ... } in PR vs import * as ... in PR (is the library tree-Shakeable?):

Test tsdown
tgpu_init.ts 274.56 kB ($${\color{green}-3.4\%}$$)
tgpu_initFromDevice.ts 274.01 kB ($${\color{green}-3.5\%}$$)
tgpu_resolve.ts 174.85 kB ($${\color{green}-38.5\%}$$)
tgpu_resolveWithContext.ts 174.78 kB ($${\color{green}-38.5\%}$$)
tgpu_bindGroupLayout.ts 74.47 kB ($${\color{green}-73.8\%}$$)
tgpu_mutableAccessor.ts 69.19 kB ($${\color{green}-75.6\%}$$)
tgpu_accessor.ts 69.19 kB ($${\color{green}-75.6\%}$$)
tgpu_privateVar.ts 67.88 kB ($${\color{green}-76.1\%}$$)
tgpu_workgroupVar.ts 67.88 kB ($${\color{green}-76.1\%}$$)
tgpu_const.ts 67.30 kB ($${\color{green}-76.3\%}$$)
tgpu_lazy.ts 67.10 kB ($${\color{green}-76.4\%}$$)
tgpu_fragmentFn.ts 39.65 kB ($${\color{green}-86.0\%}$$)
tgpu_fn.ts 39.60 kB ($${\color{green}-86.1\%}$$)
tgpu_vertexFn.ts 39.47 kB ($${\color{green}-86.1\%}$$)
tgpu_computeFn.ts 39.17 kB ($${\color{green}-86.2\%}$$)
tgpu_vertexLayout.ts 28.30 kB ($${\color{green}-90.0\%}$$)
tgpu_comptime.ts 15.91 kB ($${\color{green}-94.4\%}$$)
tgpu_unroll.ts 1.75 kB ($${\color{green}-99.4\%}$$)
tgpu_slot.ts 1.70 kB ($${\color{green}-99.4\%}$$)

If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.

@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown

Resolution Time Benchmark

---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Random Branching (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.65, 1.28, 3.03, 4.23, 5.07, 9.24, 17.17, 18.01]
  line [0.75, 1.42, 2.84, 4.70, 4.90, 9.16, 17.21, 18.44]
  line [0.70, 1.33, 2.98, 4.55, 5.02, 8.63, 16.87, 17.61]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Linear Recursion (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.21, 0.33, 0.45, 0.53, 0.70, 0.80, 0.92, 1.10]
  line [0.22, 0.39, 0.55, 0.64, 0.86, 0.87, 1.08, 1.13]
  line [0.24, 0.41, 0.53, 0.65, 0.87, 0.89, 1.07, 1.15]
Loading
---
config:
  themeVariables:
    xyChart:
      plotColorPalette: "#E63946, #3B82F6, #059669"
---
xychart
  title "Full Tree (🔴 PR | 🔵 main | 🟢 release)"
  x-axis "max depth" [1, 2, 3, 4, 5, 6, 7, 8]
  y-axis "time (ms)"
  line [0.68, 1.50, 2.64, 4.66, 8.30, 18.26, 39.84, 79.02]
  line [0.55, 1.45, 2.45, 5.03, 8.13, 18.79, 39.58, 79.73]
  line [0.56, 1.56, 2.67, 4.68, 8.41, 18.60, 38.55, 79.66]
Loading

@cieplypolar
cieplypolar marked this pull request as ready for review August 17, 2026 19:27
Copilot AI lite review requested due to automatic review settings August 17, 2026 19:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — one test-coverage nit inline. The Acorn removal itself is complete and internally consistent.

Reviewed changes — initial review of commit 40eee14e ("only babel"). Removes Acorn as a supported tinyest-for-wgsl input and consolidates everything onto the Babel AST:

  • Dependency changesacorn dropped entirely; @babel/types promoted from devDependencies to dependencies (the public types now reference babel.Node, so downstream type resolution needs it as a real dep). Lockfile updated; the remaining lockfile acorn entries are transitive (rolldown, acorn-jsx, micromark, recma) and expected.
  • Typing collapseJsNode = babel.Node | acorn.AnyNode removed; transpileFn, transpileNode, extractFunctionParts, tryFindExternalChain, and Context.visitedNodes all narrow to babel.Node. The acorn-only PrivateIdentifier branch and Literal transpiler are gone (Babel emits the concrete literal node types, all still covered).
  • Test simplificationdualTest / parseRollup helpers deleted; every case collapses to a single parseBabel run with snapshots unchanged.
  • Object-literal key handling — new switch recognizes Identifier / StringLiteral / NumericLiteral / BigIntLiteral keys and throws on computed/other key types. String and numeric keys previously threw on the Babel path (only acorn's Literal was accepted), so this preserves the acorn-era capability and adds a dedicated test; computed identifier keys previously slipped through as literal names and now fail loudly — a strict improvement.

Verified locally: 18/18 package tests, 137/137 unplugin-typegpu tests (the only non-test consumer), clean tsc --noEmit, and repo-wide grep shows no leftover JsNode / acorn / dualTest references.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread packages/tinyest-for-wgsl/src/parsers.ts
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.

2 participants