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

Partially revert Nixpkgs based prebuilt dependencies import #615

Closed
9 tasks
mboes opened this issue Jan 22, 2019 · 4 comments
Closed
9 tasks

Partially revert Nixpkgs based prebuilt dependencies import #615

mboes opened this issue Jan 22, 2019 · 4 comments
Assignees
Labels
P1 critical: next release

Comments

@mboes
Copy link
Member

mboes commented Jan 22, 2019

#442 moved us to having external dependencies for all Cabal packages, including base, generated by Nixpkgs based machinery. This is getting in the way of our Windows port. As we make progress through our test suite, supporting increasingly more things, we'll find ourselves reverting each test one by one to the haskell_import style that preceded #442.

It's best to roll back parts of #442 in a sytematic way. I'm not suggesting here to remove all of it (not yet at any rate). But to designate the following packages, which ship with GHC, as haskell_import only. These are the packages that are needed for nearly all tests of core functionality. The other packages are only needed for protobuf toolchains and the like. Windows support for that is not a priority.

Any references to the following packages (and only these) should be converted to haskell_import-style:

  • base
  • binary
  • bytestring
  • containers
  • directory
  • filepath
  • template-haskell
  • ghc-prim
  • text

Aka "@hackage//:base" becomes ":base" with a haskell_import(name = "base") target added somewhere in the same BUILD file.

@mboes mboes added the P1 critical: next release label Jan 22, 2019
@thufschmitt
Copy link
Contributor

You could make this transition a bit more automated by having a toplevel hackage/BUILD file with

[
  haskell_import(name = name)
  for name in ["base", "binary", … ]
]

And bulk-replace references to @hackage//:base to //hackage:base (or @io_tweag_rules_haskell//hackage:base)

@nmattia
Copy link
Contributor

nmattia commented Jan 23, 2019

Yup, that's what I went for (somewhat): https://github.com/tweag/rules_haskell/compare/nm-pkg-boot

now dealing with visibility issues

@mboes
Copy link
Member Author

mboes commented Jan 23, 2019

I don't think this warrants a new public API function that we'll have to support for users just yet. We have haskell_import, and we're using it in rules_haskell-internal tests (and tests only). So let's keep changes contained to that. Which is easy to do with one single variant to @regnat's idea: move these labels to anywhere under //tests/....

@nmattia
Copy link
Contributor

nmattia commented Jan 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 critical: next release
Projects
None yet
Development

No branches or pull requests

4 participants