Skip to content

Workaround Main Builds#305

Merged
miniBill merged 1 commit into
wolfadex:mainfrom
harmont-dev:harmont/prepare-script
May 15, 2026
Merged

Workaround Main Builds#305
miniBill merged 1 commit into
wolfadex:mainfrom
harmont-dev:harmont/prepare-script

Conversation

@markovejnovic
Copy link
Copy Markdown
Contributor

@markovejnovic markovejnovic commented May 8, 2026

This PR implements a workaround around an upstream issue mdgriffith/elm-optimize-level-2#120 by disabling --optimize 2, and falling back to --optimize 1.


Additionally, I add a npm prepare script which relies on npm (for cross-compatibility) and makes it easier for people to install this package via git (and my project has it as such:

"devDependencies": {
  "elm-open-api": "github:harmont-dev/elm-open-api-cli#25d7..."
}

Note: This adds a package-lock.json.

If you find the package-lock.json undesirable, I can revert the addition of the npm prepare script.


Heads up: PR made with the help of LLMs

@markovejnovic markovejnovic changed the title Fix mainline builds Workaround Main Builds May 8, 2026
@miniBill
Copy link
Copy Markdown
Collaborator

miniBill commented May 9, 2026

Yes, please separate out the prepare from the --optimize 1. The latter can be merged without much discussion, the former is something that we probably need to weight and understand more first

@markovejnovic
Copy link
Copy Markdown
Contributor Author

On it!

@markovejnovic markovejnovic force-pushed the harmont/prepare-script branch from b9d6f47 to 7c4ca6d Compare May 14, 2026 21:10
@markovejnovic
Copy link
Copy Markdown
Contributor Author

Done, @miniBill, thank you! Please note that I removed the --debug flag since:

$ bun run build
$ cd cli && elm-pages bundle-script src/Cli.elm --output ../dist/elm-open-api.js --debug --optimize 1
error: The --debug and --optimize options are mutually exclusive.
error: script "build" exited with code 1

@miniBill
Copy link
Copy Markdown
Collaborator

Run echo '```diff' > diff.md
0+0 records in
0+0 records out
0 bytes copied, 0.0102375 s, 0.0 kB/s

@miniBill
Copy link
Copy Markdown
Collaborator

miniBill commented May 15, 2026

@wolfadex I can't ignore the failing CI, I think only you can merge this that was a lie

@miniBill
Copy link
Copy Markdown
Collaborator

Actually, I should probably just fix that

@miniBill
Copy link
Copy Markdown
Collaborator

#309

@miniBill miniBill merged commit 3dff413 into wolfadex:main May 15, 2026
1 of 2 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.

2 participants