Navigation Menu

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

Remove deprecated prebuilt_dependencies #540

Closed
Profpatsch opened this issue Jan 3, 2019 · 1 comment
Closed

Remove deprecated prebuilt_dependencies #540

Profpatsch opened this issue Jan 3, 2019 · 1 comment
Milestone

Comments

@Profpatsch
Copy link
Contributor

In theory, prebuilt_dependencies should be deprecated and thus unnecessary, but going through the usage, non-trivial parts of rules_haskell still depend on it:

  • HaskellHaddock passes it as argument to haddock_wrapper.sh. Does that mean haskell_import is not yet supported by the haddock generator, @mrkkrp?

mnemonic = "HaskellHaddock",
progress_message = "HaskellHaddock {}".format(ctx.label),
executable = ctx.file._haddock_wrapper,
arguments = [
prebuilt_deps,
args,
ghc_args,
],

  • HaskellProtoc uses it internally

"prebuilt_dependencies": ctx.toolchains["@io_tweag_rules_haskell//protobuf:toolchain"].prebuilt_deps,

Concerning haskell_import, I’m confused as to which version should actually be used. We have the new one in import.bzl, but it’s not exported as far as I can see. But since haskell_import should be the replacement for prebuilt_dependencies, we should define which one to use (or throw one out). cc @regnat

@Profpatsch Profpatsch added this to the v0.7 milestone Jan 3, 2019
@Profpatsch
Copy link
Contributor Author

Profpatsch commented Jan 8, 2019

Okay, when going through the code with Théophane, we found that prebuilt_dependencies actually has two uses:

  1. attribute in all haskell rules
  2. internal mechanism to pass prebuilt stuff, also for haskell_import

Since we already deprecated the user-facing part, we can remove the attribute, but keep the internal usage for now.

The next step would be to finish new-style haskell_import and get rid of all that internal wiring and the HaskellPrebuiltPackageInfo provider as well, but that’s out of scope for this issue.

Profpatsch added a commit that referenced this issue Jan 8, 2019
The user-facing parts of `prebuilt_dependencies` have been superseeded
by `haskell_import`. Changes all examples to the new API and removes
the attribute, which has been deprecated since 0.6.

Fixes #504
Fixes #540
Profpatsch added a commit that referenced this issue Jan 8, 2019
The user-facing parts of `prebuilt_dependencies` have been superseeded
by `haskell_import`. Changes all examples to the new API and removes
the attribute, which has been deprecated since 0.6.

Fixes #504
Fixes #540
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

No branches or pull requests

1 participant