-
Notifications
You must be signed in to change notification settings - Fork 841
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
Extra blank lines introduced with config set
#5861
Comments
Is this problem something introduced with #5813? It does not seem to happen with the original Stack 2.7.5. That is based on this experiment:
resolver: lts-19.22
packages:
- .
user-message: |
This is line one.
This is line two.
user-message: |
This is line one.
This is line two.
packages:
- .
install-ghc: true
resolver: lts-19.22 re-ordered ... but no blank lines inserted in the user message. |
Based on some experiements, the bug seems to be this: for every blank line in the resolver: lts-19.22
packages:
- .
user-message: |
This is line one.
This is line two.
This is line three. becomes: resolver: lts-19.22
packages:
- .
user-message: |2
This is line one.
This is line two.
This is line three.
install-ghc: true with a |
Yes I believe so. |
Is it difficult to fix? It would be nice to release Stack 2.9.1 with this fixed. However, it is also a 'small' bug. I think the number of people using |
In the light of the above, I did wonder about the existing algorithm more generally. It seems rather complicated. Does it need to be so complicated? Is the problem to be solved essentially this (using the
Or am I missing something that drives the complexity? |
Or alternatively:
|
Since multiline string values include their blank lines, skipping those for reinsertion fixed the problem. |
Fix #5861 Amend YAML file without affecting its order
Follow up on #5813. With the current
./stack.yaml
in this project that has a multiple line string with blank lines, I'm seeing extra blank lines introduced. Please don't do that.The text was updated successfully, but these errors were encountered: