Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make rollup-plugin-typegpu work with aliased or missing tgpu object. #692

Open
iwoplaza opened this issue Dec 19, 2024 · 1 comment
Open
Labels
bug Something isn't working
Milestone

Comments

@iwoplaza
Copy link
Collaborator

Ideas:

  • inject ${alias}.__assignAst instead of tgpu.__assignAst
  • If an alias to tgpu is missing, we could either: (to be discussed)
    • Add an import at the beginning of the file.
      • (+) More liberal.
    • Require every TGSL snippet to be in a file with a typegpu import.
      • (+) More explicit, we do not add implicit imports.
@iwoplaza iwoplaza added the bug Something isn't working label Dec 19, 2024
@iwoplaza iwoplaza added this to the 0.5.0 - TGSL milestone Dec 19, 2024
@reczkok
Copy link
Collaborator

reczkok commented Dec 20, 2024

I think we shouldn't implicitly add imports. We can have a descriptive error message when it's missing. This should be a very rare situation anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants