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

Bazel build files for inline-java #105

Merged
merged 6 commits into from
Dec 29, 2017
Merged

Bazel build files for inline-java #105

merged 6 commits into from
Dec 29, 2017

Conversation

Fuuzetsu
Copy link
Contributor

@Fuuzetsu Fuuzetsu commented Dec 26, 2017

This is a collection of build files that work with the given WORKSPACE
file. This should allow the user to run bazel test //... which will
build run all tests in inline-java: as of time of writing, this is
spec tests in inline-java and jvm-streaming.

  • We're repeating ourselves a lot w.r.t. prebuilt dependencies. We
    need to have all the packages available to GHC at WORKSPACE level
    then we also need to know them at BUILD level. We can't just define
    them in WORKSPACE and refer to them from BUILD as WORKSPACE only
    works in current project: if user wants to use inline-java from
    another project, the WORKSPACE file here is irrelevant: indeed
    they'll have to define all these things in their own WORKSPACE.

Old PR description below. Note that nearly all points there have now been resolved due to better rules_haskell/rules_nixpkgs 🎊

This is a collection of build files that work with the given WORKSPACE
file. This should allow the user to run bazel run //:spec which will
build inline-java and run the spec tests.

  • I'm using GHC 8.0.2 as I was unable to quickly find working 8.2.2
    set.
  • We're taking open JDK header files from bazel but the libraries from
    nix. Neither exposes both:
    Consider exposing all files in a filegroup rules_nixpkgs#9
  • We're repeating ourselves a lot w.r.t. prebuilt dependencies. We
    need to have all the packages available to GHC at WORKSPACE level
    then we also need to know them at BUILD level. We can't just define
    them in WORKSPACE and refer to them from BUILD as WORKSPACE only
    works in current project: if user wants to use inline-java from
    another project, the WORKSPACE file here is irrelevant: indeed
    they'll have to define all these things in their own WORKSPACE.
  • rules_nixpkgs commit points at a temporary branch which includes
    changes from two outstanding PRs, both of which are needed to build
    inline-java
  • spec target would be better as some haskell_test once that
    exists
  • We're giving too many shared openjdk libs during build: we only need
    libjvm.so and maybe libjni.so but we don't have granular control
    over the filegroup so we end up using every shared lib in openjdk
    package which is not ideal.

@Fuuzetsu Fuuzetsu requested a review from mboes December 26, 2017 15:24
@Fuuzetsu Fuuzetsu force-pushed the bazel branch 4 times, most recently from 65cf176 to 021cb30 Compare December 29, 2017 21:06
Fuuzetsu and others added 6 commits December 29, 2017 22:30
This is a collection of build files that work with the given WORKSPACE
file. This should allow the user to run `bazel test //...` which will
build run all tests in `inline-java`: as of time of writing, this is
spec tests in `inline-java` and `jvm-streaming`.

* We're repeating ourselves a lot w.r.t. prebuilt dependencies. We
  need to have all the packages available to GHC at WORKSPACE level
  then we also need to know them at BUILD level. We can't just define
  them in WORKSPACE and refer to them from BUILD as WORKSPACE only
  works in current project: if user wants to use inline-java from
  another project, the WORKSPACE file here is irrelevant: indeed
  they'll have to define all these things in their own WORKSPACE.
Just merge them all into one. It's shorter this way, and the
per-package list of prebuilts is in the respective BUILD files of each
package anyways.
Probably a holdover from some debugging session.
@mboes mboes merged commit c06ddbf into master Dec 29, 2017
@mboes mboes deleted the bazel branch December 29, 2017 21:36
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