Skip to content

Conversation

@zhangkun83
Copy link
Contributor

Resolves #357

  • Default behavior is not changed.
  • People who don't change the codegen nor the proto files can set settings property grpc.skip.codegen=true so that they don't need to set up C++ compilation.
  • Check in all generated files under src/generated.

@ejona86 please review

@zhangkun83 zhangkun83 force-pushed the allow_skip_codegen_build branch from 2621589 to 8df680e Compare May 6, 2015 00:26
@ejona86
Copy link
Member

ejona86 commented May 6, 2015

It seems like project properties are exposed as settings in settings.gradle: https://gradle.org/docs/current/dsl/org.gradle.api.initialization.Settings.html

@ejona86
Copy link
Member

ejona86 commented May 6, 2015

Can we only commit the grpc generated code? Is there a reason to commit the protobuf generated code?

@zhangkun83
Copy link
Contributor Author

It seems like project properties are exposed as settings in settings.gradle: https://gradle.org/docs/current/dsl/org.gradle.api.initialization.Settings.html

Nice! I have updated the PR.

Can we only commit the grpc generated code? Is there a reason to commit the protobuf generated code?

Good point. I am going to update google/protobuf-gradle-plugin/pull/7 to allow specifying generated source dir for individual sourceSets so that we can keep protobuf generated code under generated-code while putting grpc generated code under src/generated.

@ejona86
Copy link
Member

ejona86 commented May 6, 2015

Ah, I see. That answered my question. Having different source sets would be a little weird; it's fine as it is. I'll review this this morning.

lib/netty Outdated
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a stray change, and will break the build. You likely didn't do a "git submodule update" and then did a "git commit -a". It'll be nice when we don't have to mess with the submodules...

@ejona86
Copy link
Member

ejona86 commented May 6, 2015

Looks good. I think we just need to decide what the default setting will be.

@ejona86
Copy link
Member

ejona86 commented May 6, 2015

@zhangkun83, LGTM, but the netty submodule change needs to be removed.

Resolves grpc#357

- Add project property ``grpc.skip.codegen``, which is false by default.
  People who don't change the codegen nor the proto files can set it to
  true so that they don't need to set up C++ compilation.
- Check in all generated files under ``src/generated``.
@zhangkun83 zhangkun83 force-pushed the allow_skip_codegen_build branch from 27cb9a7 to 111f6dd Compare May 6, 2015 16:56
@zhangkun83 zhangkun83 merged commit 111f6dd into grpc:master May 6, 2015
@zhangkun83 zhangkun83 deleted the allow_skip_codegen_build branch May 6, 2015 17:12
@madongfly
Copy link
Contributor

After this PR, "gradle clean" will delete the generated files that are tracked, which is annoy, do we have a solution for that?

@ejona86
Copy link
Member

ejona86 commented May 15, 2015

Yeah, it is a bit annoying. I've just done a git checkout examples or similar to put the codegen back in place. I don't know if there are any good solutions though.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Try to allow building java without having to build codegen

3 participants