Skip to content

Teleport imports #512#836

Open
perkee wants to merge 3 commits intoavh4:mainfrom
perkee:teleport-imports
Open

Teleport imports #512#836
perkee wants to merge 3 commits intoavh4:mainfrom
perkee:teleport-imports

Conversation

@perkee
Copy link
Copy Markdown
Contributor

@perkee perkee commented Feb 23, 2026

Solve issue #512. 100% AI written and I 100% understand if this goes nowhere. Making this binary my main driver for the next little while and if I like it, I'll take this out of draft.

  • First commit is getting nix to work on my machine. Probably I'm holding it wrong and this should go Dropped because I had not rebased in far too long. Sorry
  • first commit is the feature, including the plan, using this prompt:

     let's add a feature to elm-format whereby an import statement can appear on any line in a module and it will be moved to the import block. The best way to do this is to add a test wherein some imports appear
    after the top level declarations have started in the file. The test should assert that the output of running elm-format on such a file produces an elm file that compiles with the elm compiler. Create a plan in
    a markdown file including these steps and any intermediate steps, then iterate on the solution and check off the checklist in the markdown file.

  • second commit the plan is deleted and I create a homebrew formula to allow brew install perkee/elm/elm-format and a nix flake that never really works right.
  • Third commit delete everything created in the second commit

Builds macOS arm64, Linux x86_64, and Windows x86_64 binaries
via GitHub Actions on tag push. Creates GitHub Release with
artifacts and generates a Homebrew formula.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kutyel
Copy link
Copy Markdown
Contributor

kutyel commented Mar 2, 2026

@avh4 I think this is a nice addition indeed and I don't see any particular issue with the code, however, IMHO I think the Nix and homebrew/CI changes should be split to a separate PR 🙏🏻

@perkee
Copy link
Copy Markdown
Contributor Author

perkee commented Mar 10, 2026

@kutyel Hi Flavio!!

I think the Nix and homebrew/CI changes should be split to a separate PR

They should be dropped entirely! Sorry, they only exist to make it easier to test a binary this fork of elm-format.

@perkee
Copy link
Copy Markdown
Contributor Author

perkee commented Mar 10, 2026

@kutyel yep dropped. Taking this out of draft because my playtesting has it running like a Swiss watch.

@perkee perkee marked this pull request as ready for review March 10, 2026 21:46
@perkee perkee force-pushed the teleport-imports branch from c948931 to 7794cd2 Compare March 10, 2026 21:46
Copy link
Copy Markdown
Contributor

@kutyel kutyel left a comment

Choose a reason for hiding this comment

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

LGTM! :shipit:

Copy link
Copy Markdown
Contributor

@kutyel kutyel left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@perkee
Copy link
Copy Markdown
Contributor Author

perkee commented Mar 11, 2026

What's the story with these CI checks? They've been "Waiting for status to be reported" for days now.

@lydell
Copy link
Copy Markdown
Contributor

lydell commented Mar 11, 2026

GitHub Actions runs must be approved by a maintainer when the PR is from a new contributor, to avoid people running crypto miners and malicious stuff on random repos (remember, you can of course change the workflow yaml files in the PR).

@perkee
Copy link
Copy Markdown
Contributor Author

perkee commented Mar 11, 2026

ohhhh good call @lydell! TYSM

Viir added a commit to pine-vm/pine that referenced this pull request Mar 13, 2026
For discussion of the feature to merge displaced import statements in elm-format, see:

+ avh4/elm-format#512
+ avh4/elm-format#836

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Viir <19209696+Viir@users.noreply.github.com>
Co-authored-by: Michael Rätzel <michael@xn--michaelrtzel-ncb.com>
@perkee
Copy link
Copy Markdown
Contributor Author

perkee commented Mar 23, 2026

@avh4 hi

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.

3 participants