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

Build caliper with bazel, and recent deps #434

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cgruber
Copy link
Contributor

@cgruber cgruber commented Sep 27, 2020

This is a trial balloon, to see how the core libraries team feels about it. This PR doesn't delete the maven stuff, nor does it add release scripting based on bazel. It does make a bazel build, artifact version pin list, enables all the tests, and also builds the android worker (which doesn't build on travis in maven today).

TODO:

  • Add release scripting for convenient release. (Not a dig, but the last release was years ago, so this may not be a priority)
  • Remove obsolete bits related to the maven stuff.
  • Update readme and documentation

If this is an acceptable direction, the unfinished bits could be done in this PR or a subsequent one (I'll update this description).

@google-cla google-cla bot added the cla: yes label Sep 27, 2020
script:
- mvn -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn clean verify -U -Dmaven.javadoc.skip=true -am -pl caliper
- ${HOME}/bin/bazel build //...
- ${HOME}/bin/bazel test //...

cache:
directories:
- $HOME/.m2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note - this stays if we use bazel_maven_repository, as it uses maven-archeologist as its resolving library, which makes use of ~/.m2/repository.

@cgruber
Copy link
Contributor Author

cgruber commented Sep 27, 2020

Further note - just for my own use, I did a "fake release" on my own fork. I don't want to maintain it, but I've made it possible to also USE it from bazel, pretty trivially, and I put instructions in the release

That release does not include any maven artifact release - it only has the full-jar and a command-line wrapper around the full jar, released via the github artifact page on the release itself. This doesn't help general maven-compatible artifact consumption, but at least to roll your own it's possible, if you're willing to risk the "full jar" classpath collision concern (since it's not fully jarjar'ed)

@cgdecker cgdecker added P3 type=other Miscellaneous activities not covered by other type= labels labels Sep 28, 2020
@cgdecker
Copy link
Member

cgdecker commented Sep 28, 2020

Thanks for the PR Christian. FWIW, I think if we were to switch Caliper over to bazel (and we are considering doing that for some or all of our projects, though probably not this year) we'd want to start from the internal BUILD files and add transformations/stripping as needed to produce the external files. That said, I don't really have time for much of anything Caliper-related right now, unfortunately.

Was there something in particular you needed this for? As you've noted, the android worker hasn't been set up to build in open-source, in part because just building it isn't really enough to make the android support I added the other year actually convenient to use in open-source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes P3 type=other Miscellaneous activities not covered by other type= labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants