Skip to content
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

'stack ghci' now asks which main module to load before building #4138

Merged
merged 1 commit into from
Jul 9, 2018

Conversation

mgsloan
Copy link
Contributor

@mgsloan mgsloan commented Jul 7, 2018

Before this change, 'stack ghci' would ask the user a question after doing a
build which may take a long time. The reason it was this way is that the
question required resolution of package files, and package file resolution
needed to come after the build due to #1180.

The solution here is to resolve the package files twice - once before the build,
and once after. This isn't the most efficient solution possible, but it is a
much better user experience to ask the main target question before building
rather than after.

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

Tested this by running on a large project and observing that ghci functions properly, and that the main target question is asked before the build.

Before this change, 'stack ghci' would ask the user a question after doing a
build which may take a long time. The reason it was this way is that the
question required resolution of package files, and package file resolution
needed to come after the build due to #1180.

The solution here is to resolve the package files twice - once before the build
- and once after. This isn't the most efficient solution possible, but it is a
much better user experience to ask the main target question before building
rather than after.
, getInstalledSymbols = False
}
sourceMap
let localLibs =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add the internal libs here too, if they exist

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed! Perhaps that can be done in a separate PR? This bit is just a refactoring, same logic as before the change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I'm travelling now but can look at it in two weeks and see to it.

@mgsloan mgsloan merged commit bcbfb1e into master Jul 9, 2018
@mgsloan
Copy link
Contributor Author

mgsloan commented Jul 9, 2018

Thanks for reviewing!

@mihaimaruseac mihaimaruseac deleted the ghci-ask-target-before-build branch July 10, 2018 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants