Conversation
e2bfdd6 to
90caee5
Compare
|
The |
|
This looks great at a glance! Let me know when it's ready for review. |
|
Ha, great timing! |
|
I'm here. Investigating. I see those test failures! Could someone recap what's going on? That's a big diff 😂 Is this PR basically pulling in a bunch of tests from upstream? I would assume that the issue is that the test vectors aren't taking my code into account. |
|
The idea of this PR is to test all fourmolu's options in isolation, as opposed to all together. "Testing" here is twofold: for fixed test vectors, we (1) format them and see that AST remains the same, and (2) commit the formatting results to repo for regression testing. The latter accounts for the large diff. So the vectors are the same, and indeed pass with |
|
Those should produce different output, ie. The test vectors should be different. I'll write here what they should be for the |
|
In this case, it's not merely that the output doesn't match what's expected. There's a more serious issue. The log shows an This isn't hugely surprising - this PR is finally tackling the testing hole I mentioned way back in #48 (comment). |
|
Ok, this is a subtle and not-particularly-interesting bug, and I've run out of time for now. I've put some progress on this branch, in case anyone wishes to take a look. It essentially consists of:
|
|
@wldhx Could you rebase your branch on to master? Should be trivial. |
The following are minimal reproducing inputs for the two (related) issues: {-# LANGUAGE CPP #-}
x = do
#ifdef XXXXXXXX
#endif
(){- ORMOLU_DISABLE -}
{- ORMOLU_ENABLE -}
x = () |
|
Done. I suggest we squash on merge. |
|
Looks great to me! I can run the branch against our codebase and see if
there's a big diff. Which branch should I use to test?
…On Sun, Nov 28, 2021, 12:04 George Thomas ***@***.***> wrote:
Tests should pass if you cherry-pick ed241f9
<ed241f9>
.
@wraithm <https://github.com/wraithm> Are you happy with the test output
changes in that commit? It's basically just now not inserting a blank line
at the top of every file (and after magic comments and CPP). Was that
behaviour intentional?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#129 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALRLULXP2WJXFJYM3EL3HDUOKDNRANCNFSM5IFCUGDQ>
.
|
You can use that exact commit actually. None of the other stuff on that branch will affect the output. |
|
@georgefst I tried this: Is that right? I don't think I have anything unusual about my setup. Perhaps just that I'm using stack here? |
|
I just turned off -Werror, and that got it to build. I ran fourmolu against our codebase, and everything looked great! (I saw two changes. 1. There's no longer a half indent for additional patterns in pattern guards. 2. Haddock comments on record fields got changed from |
Ah, I don't use Stack and didn't realise we had
These are both intentional improvements: see and tweag/ormolu#798 and #124, resp. If you really want the old behaviour, we could discuss having a flag. |
|
@wldhx Sorry that this thread is getting a little off-topic. I'll review once we have tests passing. |
I actually intentionally want |
6bf5666 to
abbf5f6
Compare
@georgefst I missed that at the time, sorry! Tests are green now. |
Is something stuck?.. |
|
You need to rebase against master and rerun tests (and fix conflicts too) |
4e6e679 to
38add24
Compare
- Test an option at a time - Introduce option bundles Closes fourmolu#49
|
@brandonchinn178 Done. |
|
the @georgefst can you finish reviewing this when you get a chance? I don't feel qualified enough to ship this on my own |
|
132 an 129 both implement 49. IMO 129 supersedes 132 by having option bundles. |
|
Thanks @dpwiz. To elaborate some more, both this PR and #132 address the need for more tests as raised by #49. Here's how they differ:
|
|
@georgefst @brandonchinn178 Could we give getting this in another try? I'd really love to see all the features currently blocked on tests merged. |
So would I! I have some time off next week, and hope to get to this. Your explanation of the relationship between this and #132 is helpful, thanks. I'm curious whether @gustavoavena sees it the same way? Apologies again for how long it's taking. I've been pretty swamped for months. |
|
@georgefst @brandonchinn178 Just another gentle ping on this. |
|
@georgefst @brandonchinn178 Is there any way I could help to get this merged? I understand you're pretty busy so I'd love to take on some of the work. :) |
|
I added an update to #49. To reiterate what I said in that issue, many thanks for the work you've put into this PR. In light of the new direction, though, I'll be closing this PR for now. Please let me know if you have any questions, comments, or concerns. Thanks! |
No description provided.