haskell / haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
BSD 3-Clause "New" or "Revised" License
2.38k stars 211 forks source link

Fix #1578 - Redesign option parsing for main executable #1671

Closed gdziadkiewicz closed 4 years ago

gdziadkiewicz commented 4 years ago

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 where GlobalOpts were used.

How did I test it?

Added unit tests for option parser exposed by Haskell.Ide.Engine.Options.

gdziadkiewicz commented 4 years ago

I will investigate the build failures and mark it as ready to be reviewed after making it build on all envs.

gdziadkiewicz commented 4 years ago

@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.

alanz commented 4 years ago

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.

gdziadkiewicz commented 4 years ago

@alanz I changed the commit message. Please check if it is acceptable now

gdziadkiewicz commented 4 years ago

The CI fails don't seem to be connected to this change.

fendor commented 4 years ago

We will merge next week, when some time has passed since the release

fendor commented 4 years ago

We will merge next week, when some time has passed since the last release