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

Switch to elm-codegen for code generation #6

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

miniBill
Copy link
Contributor

@miniBill miniBill commented Aug 25, 2024

This is a draft waiting for the new version of elm-codegen to be published.
It's published now.

This fixes #5

@miniBill

This comment was marked as outdated.

@miniBill miniBill force-pushed the master branch 3 times, most recently from 495ff1a to e585c0f Compare August 25, 2024 21:59
@miniBill miniBill marked this pull request as ready for review August 25, 2024 22:00
@miniBill
Copy link
Contributor Author

Ready for review

@miniBill miniBill changed the title (WIP) add elm-codegen generation Switch to elm-codegen for code generation Aug 25, 2024
@miniBill
Copy link
Contributor Author

Poke

@rektdeckard
Copy link
Member

Sorry for delay here, got lost in the shuffle. A few notes:

  1. From a fresh clone, this doesn't work. First, there's no src directory to begin with, so the generate script just crashes. A little cleanup there would be nice; I.E. should be idempotent and should run correctly from an initialized state.
  2. elm-codegen and elm-format appear to now be required dependencies to build, and should be included in the package.json devDependencies.
  3. Something appears to be wrong with the Elm dependencies for codegen, because I cannot run the generation script without compilation errors:
-- MODULE NOT FOUND ----------------------------------------------- Generate.elm

You are trying to import a `Gen.Svg` module:

20| import Gen.Svg as Svg
           ^^^^^^^

...and many more like this.

Please fix this up so that any person cloning this repo for the first time and build and run it properly, and if necessary add some documentation if there are required CLI tools that can't be included as package dependencies.

@miniBill
Copy link
Contributor Author

miniBill commented Nov 8, 2024

Ok, I've changed yarn generate to automatically run yarn and elm-codegen install as needed!

@miniBill miniBill marked this pull request as draft November 8, 2024 11:23
@miniBill
Copy link
Contributor Author

miniBill commented Nov 8, 2024

Just noticed some issues with compilation, fixing them

@miniBill
Copy link
Contributor Author

miniBill commented Nov 8, 2024

Blocked by mdgriffith/elm-codegen#101

@miniBill
Copy link
Contributor Author

Checking the diff I noticed this is missing the aliases. Going to add them now.

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.

Bundle size
2 participants