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

fix: resolve templruntime imported and not used #841

Merged

Conversation

garrettladley
Copy link
Contributor

Fixes #834

I took the fake import approach, as suggested by @a-h (see).

I wrote it at the end of the file to avoid falling between the call to g.writeImports() here and any imports in template nodes from the call to g.writeTemplateNodes() here. I did this to resolve errors of the form failed to generate code for "path/to/file" ... imports must appear before other declarations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

main code change

Copy link
Owner

@a-h a-h left a comment

Choose a reason for hiding this comment

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

Thanks a lot for fixing this!

@a-h a-h merged commit 979cd97 into a-h:main Jul 10, 2024
3 of 4 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.

bug: "github.com/a-h/templ/runtime" imported as templruntime and not used
2 participants