Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Committing generated code?

On 05/05/2011 09:45 PM, Shawn Pearce wrote:
> I would like feedback about http://egit.eclipse.org/r/3345
> 
> I am proposing to replace the hand-coded usage of TinyProtobuf in the
> DHT code with the Google Protocol Buffers Java implementation. Its
> faster and more widely supported.
> 
> Unfortunately, it works by using a C++ compiler ("protoc") to convert
> the .proto file into a Java file. Since this is generated code, it
> isn't usually committed. But the protoc tool isn't widely installed,
> making development with it difficult.
> 
> The question is, should JGit commit the generated source file
> (GitStore.java) in our repository, or should we require contributors
> and build servers to download and install protoc on their systems?
> 
we've had a similar situation @ Dutch MoD.

we placed the generated code under a "generated" package, like
  org.eclipse.jgit.generated.proto.buffers

that kept it clear that it was generated :-)

we also placed the actual source from which the generated code is built
in the source tree (for obvious reasons)

my 2 cents ;-)


keep up the good work guys!
-- 
Ferry Huberts


Back to the top