Skip to content

fix: unptr datatype in errors - #2767

Merged
cieplypolar merged 3 commits into
mainfrom
fix/unptr-datatype-in-errors
Jul 29, 2026
Merged

fix: unptr datatype in errors#2767
cieplypolar merged 3 commits into
mainfrom
fix/unptr-datatype-in-errors

Conversation

@cieplypolar

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 28, 2026 14:56

Copilot AI left a comment

Copy link
Copy Markdown

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.

@github-actions

github-actions Bot commented Jul 28, 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/eslint-plugin-typegpu@12f7c5e391a6c1882e5cb78f8299d955aa5607fd
https://pkg.pr.new/software-mansion/TypeGPU/tgpu-gen@12f7c5e391a6c1882e5cb78f8299d955aa5607fd
https://pkg.pr.new/software-mansion/TypeGPU/tinyest-for-wgsl@12f7c5e391a6c1882e5cb78f8299d955aa5607fd
https://pkg.pr.new/software-mansion/TypeGPU/typegpu@12f7c5e391a6c1882e5cb78f8299d955aa5607fd
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/cli@12f7c5e391a6c1882e5cb78f8299d955aa5607fd
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/color@12f7c5e391a6c1882e5cb78f8299d955aa5607fd
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/gl@12f7c5e391a6c1882e5cb78f8299d955aa5607fd
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/noise@12f7c5e391a6c1882e5cb78f8299d955aa5607fd
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/radiance-cascades@12f7c5e391a6c1882e5cb78f8299d955aa5607fd
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/react@12f7c5e391a6c1882e5cb78f8299d955aa5607fd
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/sdf@12f7c5e391a6c1882e5cb78f8299d955aa5607fd
https://pkg.pr.new/software-mansion/TypeGPU/@typegpu/three@12f7c5e391a6c1882e5cb78f8299d955aa5607fd
https://pkg.pr.new/software-mansion/TypeGPU/unplugin-typegpu@12f7c5e391a6c1882e5cb78f8299d955aa5607fd

benchmark
view benchmark

commit
view commit

@github-actions

github-actions Bot commented Jul 28, 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.94, 1.97, 3.92, 6.43, 7.58, 13.33, 22.14, 22.95]
  line [0.98, 2.02, 4.23, 7.11, 7.31, 12.46, 22.63, 25.61]
  line [0.94, 1.97, 4.18, 6.56, 8.28, 11.28, 21.82, 22.08]
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.29, 0.51, 0.76, 0.85, 1.14, 1.20, 1.46, 1.57]
  line [0.34, 0.58, 0.73, 0.83, 1.20, 1.19, 1.45, 1.60]
  line [0.31, 0.52, 0.69, 0.83, 1.08, 1.17, 1.43, 1.59]
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.89, 2.09, 4.06, 7.53, 13.85, 26.38, 55.83, 114.50]
  line [1.02, 2.56, 4.75, 7.20, 13.42, 26.13, 55.73, 113.47]
  line [0.84, 2.09, 4.06, 6.58, 13.00, 26.57, 56.31, 112.12]
Loading

@github-actions

Copy link
Copy Markdown

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

🟢 Decreased ➖ Unchanged 🔴 Increased (max 0.00%) ❔ Unknown
0 301 21 0

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

Test tsdown
tgpu_init.ts 258.90 kB ($${\color{green}-3.2\%}$$)
tgpu_initFromDevice.ts 258.39 kB ($${\color{green}-3.4\%}$$)
tgpu_resolve.ts 164.60 kB ($${\color{green}-38.5\%}$$)
tgpu_resolveWithContext.ts 164.53 kB ($${\color{green}-38.5\%}$$)
tgpu_bindGroupLayout.ts 68.97 kB ($${\color{green}-74.2\%}$$)
tgpu_mutableAccessor.ts 65.97 kB ($${\color{green}-75.3\%}$$)
tgpu_accessor.ts 65.96 kB ($${\color{green}-75.3\%}$$)
tgpu_privateVar.ts 65.31 kB ($${\color{green}-75.6\%}$$)
tgpu_workgroupVar.ts 65.30 kB ($${\color{green}-75.6\%}$$)
tgpu_const.ts 64.55 kB ($${\color{green}-75.9\%}$$)
tgpu_fn.ts 38.14 kB ($${\color{green}-85.7\%}$$)
tgpu_fragmentFn.ts 38.14 kB ($${\color{green}-85.7\%}$$)
tgpu_vertexFn.ts 37.96 kB ($${\color{green}-85.8\%}$$)
tgpu_computeFn.ts 37.66 kB ($${\color{green}-85.9\%}$$)
tgpu_vertexLayout.ts 26.79 kB ($${\color{green}-90.0\%}$$)
tgpu_comptime.ts 14.48 kB ($${\color{green}-94.6\%}$$)
tgpu_unroll.ts 1.66 kB ($${\color{green}-99.4\%}$$)
tgpu_slot.ts 1.54 kB ($${\color{green}-99.4\%}$$)
tgpu_lazy.ts 1.19 kB ($${\color{green}-99.6\%}$$)

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

@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.

Reviewed changes — a one-line fix to display the inner datatype (e.g. vec3f) rather than the pointer type (ptr<function, vec3f, read-write>) in the reference-assignment error message, plus tests covering both implicit and explicit pointer scenarios.

  • Fix unptr in error message — wraps rhsExpr.dataType with unptr() before resolving for display, matching the pattern already used at four other error/stringification sites in the same file.
  • Add two test cases — verifies that implicit pointer (variable alias) and explicit pointer (d.ref()) assignments both produce error messages with the unwrapped type in the suggested fix snippet.

✅ No new issues found.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏

@cieplypolar
cieplypolar merged commit 804cf2b into main Jul 29, 2026
8 checks passed
@cieplypolar
cieplypolar deleted the fix/unptr-datatype-in-errors branch July 29, 2026 09:04
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.

3 participants