Sort imports #292
No reviewers
Labels
No Label
blocked: dependency
blocked: info-needed
bug
duplicate
enhancement
fixed in HEAD
help wanted
hs:arrows
hs:brackets
hs:classes
hs:comments
hs:do-notation
hs:guards
hs:lists
hs:operators
hs:patterns
hs:records
hs:types
invalid
language extension support
layouting
needs confirmation
priority: high
priority: low
question
revisit before next release
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: hexagoxel/brittany#292
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "imports-sorted"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
See #155
This implements the basic functionality, including some trickery to handle comments sensibly.
Terminology:
Implemented features
Issues that must be fixed before merging
all other are non-blockers
Features yet to be implemented
Merge imports
Sort exports - basics would work already, even module exports work already or are trivial, but haddock headers and sections are really annoying to get right in general.
Paragraph-fill version of item lists
Issues to be fixed, low priority
@lspitzner I've got a large codebase which I've been deferring neatening imports on until brittany had support! I'll give this branch a test run this weekend.
@lspitzner works very well!
dcca2969c3
I like how it preserves groups of imports and doesn't barf on
{-# SOURCE #-}
imports.If possible: when you live code next could it be friendly to Singapore time?
I don't have a public codebase to point to, but this worked great on our ~80 KLOC project 👍
@lspitzner This is a great improvement already, would it be possible to get this merged and move the exising TODO items to issues?
sorry I am so unresponsive atm. I have been / am still struggling to move all my maintenance and potentially CI over to nix. It has been a bit frustrating but I think it will be worth it in the long run.
There are two minor fixups I wanted to add on this branch, both simple "if this special case occurs, just fall back on not modifying the thing in question". These should indeed make this a useful addition without any downsides even for users that might have curious comments on their imports. Any other improvements can indeed be moved to separate issues.
So I am not taking a summer break, but the priorities will be nix > ghc810 > sorting imports.
@lspitzner Is there any specific help you could use on the nix side of things? FWIW this very simple github action (using cachix for caching) has been working well for me: https://github.com/expipiplus1/vulkan/blob/master/.github/workflows/ci.yml#L170-L186
I've been using this for quite some time, and think it's certainly stable enough to be merged as is, perhaps conditional on a config setting as it's considered incomplete.
Closing this in favor of #330.
Pull request closed