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

Provider refactoring, make REPL work with bin targets #186

Merged
merged 1 commit into from
Mar 15, 2018

Conversation

mrkkrp
Copy link
Member

@mrkkrp mrkkrp commented Mar 15, 2018

Close #182.

That is, binary targets with Main module located in files named differently than Main.hs. The refactoring also prepares ground for work on #179.

That is, binary targets with Main module located in files named differently
than ‘Main.hs’.
@mrkkrp mrkkrp requested review from mboes, Fuuzetsu and gdeest March 15, 2018 13:21
binfo = dep[HaskellBuildInfo]
package_names = acc.package_names
if HaskellBinaryInfo in dep:
fail("Target {0} cannot depend on binary".format(ctx.attr.name))
Copy link
Collaborator

@Fuuzetsu Fuuzetsu Mar 15, 2018

Choose a reason for hiding this comment

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

I actually think we should allow binaries as input somehow. For example if you need additional build tool available at build time to pre-process some files. Having said that, it has nothing to do with this PR, I was just reminded of it here. We might want to open an issue (or ignore it for now though I on a client project we have precisely such a need so current rules_haskell could not be used there). Alternative is to put the burden on user to make a rule to preprocess sources themselves which is fine I guess.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's open an issue for this.

Copy link
Collaborator

@Fuuzetsu Fuuzetsu left a comment

Choose a reason for hiding this comment

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

Seems generally good. A side-note: wonder if we can make our set iterable, those for … in set.to_list(…): … everywhere are kind of ugly.

@mrkkrp mrkkrp merged commit 469e9cc into master Mar 15, 2018
@mrkkrp mrkkrp deleted the make-bin-repl-work-with-non-standard-main-files branch March 15, 2018 14:18
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