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

Add a proto_lang_toolchain for javalite #6882

Merged
merged 3 commits into from Nov 27, 2019

Conversation

rafi-kamal
Copy link
Contributor

So that javalite can be used from Bazel. Related discussion: #6867

@rafi-kamal
Copy link
Contributor Author

@ejona86 do you know how can I test it? Is there a java_lite_proto_library defined somewhere that can depend on this rule?

@ejona86
Copy link
Contributor

ejona86 commented Nov 16, 2019

It looks like your examples include a java_lite_proto_library :)

protobuf/examples/BUILD

Lines 73 to 76 in 4e93585

java_lite_proto_library(
name = "addressbook_java_lite_proto",
deps = [":addressbook_proto"],
)

(And I only know this because of the build failure you mentioned in #6898)

That means you should also update it's workspace to use a local_repository (just like com_google_protobuf) instead of the http_archive:

http_archive(
name = "com_google_protobuf_javalite",
strip_prefix = "protobuf-javalite",
urls = ["https://github.com/protocolbuffers/protobuf/archive/javalite.zip"],
)

Copy link
Contributor

@ejona86 ejona86 left a comment

Choose a reason for hiding this comment

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

I fixed a bug and updated the examples, but now it is running for me. You can test by cd examples/; bazel build :addressbook_java_lite_proto

@rafi-kamal
Copy link
Contributor Author

Thank you very much :)

@rafi-kamal rafi-kamal merged commit e6c5a3b into protocolbuffers:master Nov 27, 2019
ejona86 pushed a commit to ejona86/protobuf that referenced this pull request Dec 3, 2019
* Add a proto_lang_toolchain for javalite

* fix toolchain. Swap javalite example to master repo
rafi-kamal pushed a commit that referenced this pull request Dec 3, 2019
* Add a proto_lang_toolchain for javalite

* fix toolchain. Swap javalite example to master repo
nlhien pushed a commit to nlhien/protobuf that referenced this pull request Feb 28, 2020
* Add a proto_lang_toolchain for javalite

* fix toolchain. Swap javalite example to master repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants