Skip to content

Have "stack ghci" ignore build errors #1249

@mgsloan

Description

@mgsloan

While trying out the repro for #1067, it failed to find the autogenerated Paths_ghcid. This was because of two things:

  1. The resolution of stack ghci should be usable with minimal dependencies #817 was to not do a build if there are no explicit targets. I don't think this is the right solution to the problem, and it makes the behavior of stack ghci inconsistent.

  2. The resolution of stack ide start fails to start if the project has compile errors #810 was to only build the dependencies. I don't think this is the right solution to the problem, because if the project has never been built then autogenerated modules won't exist.

I think the solution is to remove the changes from #817 and #810 and instead adopt the following resolution:

Ignore build errors which occur during the implicit build which comes before running ghci. This will consist of catching ExcecutionFailure exceptions, thrown from here, and warn the user that the errors were ignored.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions