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

Typecheck Elm templates #194

Open
Tracked by #169
lishaduck opened this issue Jul 6, 2024 · 2 comments
Open
Tracked by #169

Typecheck Elm templates #194

lishaduck opened this issue Jul 6, 2024 · 2 comments

Comments

@lishaduck
Copy link
Contributor

lishaduck commented Jul 6, 2024

Currently, there's just a bunch of string templates.
We should run elm make --output=/dev/null over them to make it typesafe.

@lishaduck lishaduck changed the title Use elm-codegen to create Elm files Use elm-codegen to create Elm files Jul 6, 2024
@lishaduck lishaduck mentioned this issue Jul 6, 2024
22 tasks
@jfmengels
Copy link
Owner

Are you talking about the string templates in the new-rule.js file? Did you see any others?

Anyway, I think it's fine as it is. The templating is very minimal so it's IMO very readable and easy to change. Adding elm-codegen would add dependencies, would likely be slower and would add dependencies.

I think if it's about type safety, then we can run elm make/elm-test on the generated files in our test suite, and that would give us the same guarantees.

@lishaduck
Copy link
Contributor Author

Are you talking about the string templates in the new-rule.js file? Did you see any others?

I thought I saw some in new-package, might be wrong.

Anyway, I think it's fine as it is. The templating is very minimal so it's IMO very readable and easy to change. Adding elm-codegen would add dependencies, would likely be slower and would add dependencies.

Fair.

I think if it's about type safety, then we can run elm make/elm-test on the generated files in our test suite, and that would give us the same guarantees.

That's the real issue. I just don't want a typo to go unnoticed.

@lishaduck lishaduck changed the title Use elm-codegen to create Elm files Run typecheck Elm templates Jul 7, 2024
@lishaduck lishaduck changed the title Run typecheck Elm templates Typecheck Elm templates Jul 7, 2024
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

No branches or pull requests

2 participants