-
Notifications
You must be signed in to change notification settings - Fork 711
Replace cabal project parsing with Parsec #6101
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
Comments
@typedrat if you can pull it off, it would be super super great! |
Is the idea here to use the internal Parsec representation |
Yes.
I was wondering this myself, and it was tricky. At this point, rather than waiting for someone knowledgeable to reply, I'd compile it with profiling on, run it with -xc on a buggy project file, see it failing and study the stack trace... |
Less discouraging answer is: mostly, https://github.com/haskell/cabal/blob/master/cabal-install/src/Distribution/Client/ParseUtils.hs |
@ulysses4ever thanks I took a look prior to your comment but never came back to ask about what the "buggy project" was, as the linked issue was a little above my head right now 😓 if you have a small example of what I'd need to run to see this error that would be great, in the mean time I'll also look at the linked file you've given 👍 |
By buggy I meant a project file with a parse error. This should throw an error from the parser and inspecting the stack trace from the error should bring some insights on where the parser is located and how it's called. I'll see about an example but don't hold your breath, please. |
ah ok I'm with you not to worry cheers for the help... I'll report back if I start this and if not then someone else can take a look. |
@Cmdv as you did not report back I suppose you did not start yet? I would love to tackle this issue. I investigated the current project parsing as @ulysses4ever suggested: It leads to a parse error thrown in
I searched for an example usage of the new Parsec module and found |
@jgotoh I can confirm that all your findings make sense to me. Godspeed with your experiment. Do ask questions when stuck and try to post a draft PR early — even if it doesn't do much yet. |
@jgotoh you are right I wasn't able to get time to go too far into this!! looks like you've done some very good investigative work 👌 I'll pass the torch over to you (though I only ran a couple a metres 😂) |
Many thanks to both of you! :) I will keep you updated and will try to create some rough draft soon to gather some feedback. Most updates will happen on weekends though because of work. |
I plan on doing this, since as it stands I don't see a way to implement the sort of overriding syntax needed for #5522, and even if it is possible we should eat our veggies.
The text was updated successfully, but these errors were encountered: