-
Notifications
You must be signed in to change notification settings - Fork 701
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
Line trailing comments not stripped #2681
Comments
Test case in phadej@836d414 |
This issue desperately needs a description of what the actual problem is, i.e. what did you do and what did you expect to happen? What did happen? |
He took |
Yes, I can see that, but this is still not a useful issue description if a reader of the issue has to trawl through comments in a different issue/PR to figure out what's going on. (Esp. since the PR is still open.) EDIT: grammer |
@BardurArantsson without any deeper knowledge about the subject, here is my guess what is meant:
the expected behaviour is that |
Ok, that's a more useful description. It shouldn't be necessary to guess, however since it would take all of 5 minutes for the reporter to write that :). ( @phadej : I promise, I'm not trying to single you out specifically (... at length). I'm just making the point that for issue descriptions to be useful they must be understandable by people who aren't involved in the original issues, etc. IOW understandable on their own. You just happened to provide an example. :)) |
I investigated this further. The problem is in the parser, it doesn't strip
will fail to parse, which is ok. But list fields (like
into extraSrcFiles = ["README.md","--","foobar"], There is
Hacky soluton A: I could make abit hacky solution to strip Real solution B: would be to take @dcoutts parsec parser into use, but it is blocked by ghc-the-library dependency on |
Update. This is by design. The frame syntax of .cabal like files doesn't accept end-of-line comments. I'm not sure how to proceed. Some warning would be useful. Maybe warn about, ping @hvr |
Resolves haskell#2681 Cabal files don't have trailing line comments. In many fields they simply cause parse errors, but e.g. in extra-source-files virtually everything is accepted. As there is simple work around if people actually want double-dash, let's warn about bare one.
Resolves haskell#2681 Cabal files don't have trailing line comments. In many fields they simply cause parse errors, but e.g. in extra-source-files virtually everything is accepted. As there is simple work around if people actually want double-dash, let's warn about bare one.
Resolves haskell#2681 Cabal files don't have trailing line comments. In many fields they simply cause parse errors, but e.g. in extra-source-files virtually everything is accepted. As there is simple work around if people actually want double-dash, let's warn about bare one.
issue with
accelerate-cuda
0.14.0.0
file: https://gist.github.com/phadej/641d82190cdd0400fc28Original:
Formatted:
I'm not sure if the issue is in the parser or prettyprinter
related to: #2460 #2607
The text was updated successfully, but these errors were encountered: