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

Having an empty multiline set as the last parameter in an application in a set puts it on an extra line #253

Closed
dasJ opened this issue Sep 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dasJ
Copy link
Member

dasJ commented Sep 17, 2024

That title should describe it… sorry for the length of it.

Given this input:

{
  test = app {
  };
}

I would expect the expression not to be reformatted at all. The current master version however returns:

{
  test =
    app
      {
      };
}

Interestingly enough, having a non-expanded second argument prevents this from happening, resulting in:

{
  test = app {
  } { };
}

It does however also happen if I start with two already-expanded attrsets as the parameters:

{
  test =
    app
      {
      }
      {
      };
}
@dasJ dasJ added the bug Something isn't working label Sep 17, 2024
@piegamesde
Copy link
Member

That looks like a regression, could you maybe bisect it?

@dasJ
Copy link
Member Author

dasJ commented Sep 17, 2024

First time I see this is 23b4c1f. In the previous commit (aff0520), we have the old contraction logic which causes the entire file to be put into a single line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants