-
Notifications
You must be signed in to change notification settings - Fork 206
Fix #1578 - Redesign option parsing for main executable #1671
Fix #1578 - Redesign option parsing for main executable #1671
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR, this looks very promising and exactly like what I had in mind!
Please re-request a review when your PR is ready for merge!
I will investigate the build failures and mark it as ready to be reviewed after making it build on all envs. |
@fendor Could you also find a moment to do a review more focused on the style of the code and best practices? I'm willing to learn in the process and to do changes meant to make the new code consistent with the rest of the codebase. |
dfb732b
to
ff6db7b
Compare
As a minimum, please update the description so that when it lands we know what it is about, without having to refer to a (possibly no longer existent) github repo. |
ff6db7b
to
369ccfe
Compare
@alanz I changed the commit message. Please check if it is acceptable now |
369ccfe
to
a77935f
Compare
The CI fails don't seem to be connected to this change. |
a77935f
to
951b2be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! I tried my best to be nitpicky, but I just have nothing to criticise except for line length (and even that is debatable and personal preference)! Your code was easy to read and easy to follow!
I can say nothing more than, great job!
I hope you decide, and can find the time, to contribute more!
<$> (ProjectLoadingOpts | ||
<$> flag False True | ||
( long "dry-run" | ||
<> help "Perform a dry-run of loading files. Only searches for Haskell source files to load. Does nothing if run as LSP server." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line too long, limiting yourself to 80 chars per line makes it easier to read on small monitors
|
||
spec :: Spec | ||
spec = do | ||
let defaultGlobalOptions = GlobalOpts False Nothing Nothing False Nothing False (ProjectLoadingMode $ ProjectLoadingOpts False []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line a bit too long, as well.
We will merge next week, when some time has passed since the release |
We will merge next week, when some time has passed since the last release |
What has been done?
I extracted mode-specific
GlobalOpts
fields into separate types, updated the parsing logic to handle new types as an alternative and updated the places whereGlobalOpts
were used.How did I test it?
Added unit tests for option parser exposed by
Haskell.Ide.Engine.Options
.