Giter Club home page Giter Club logo

Comments (6)

rst0git avatar rst0git commented on August 28, 2024

Hi @onlyjob, the source file is in the CRIU's repository.
https://github.com/checkpoint-restore/criu/blob/criu-dev/images/rpc.proto

rpc/rpc.pb.go can be generated with:

make rpc/rpc.pb.go

from go-criu.

onlyjob avatar onlyjob commented on August 28, 2024

The problem is that source release is not comprehensive. Downstream we can not download on build and another repository (with .proto file) is not available. Effectively it is partially an open source compliance problem (because generated file is shipped without sources - like pre-compiled binary) but also partially a technical problem because without source we can not ensure integrity of build by re-building all pre-generated files.

from go-criu.

adrianreber avatar adrianreber commented on August 28, 2024

Hmm, this is difficult. We did not include the original file, because it is part of CRIU and we actually, in the go bindings, do not want that file in the repository. We only want the result from the protobuf compiler. The Makefile rule is just as a convenience to easy update the file if necessary.

I understand your point of view, but for us generating the file is not part of the build process. Another motivation to leave out the generation of the build process is to not require the protobuf compiler during build as well as to make sure that the generated file matches what we expect. I often had problems generating protobuf output because of different versions of the protobuf compiler.

from go-criu.

onlyjob avatar onlyjob commented on August 28, 2024

This is precisely why source should be committed to this repository. Yes it would duplicate the original file but that is the only way to take care of situations where/when generated file should be updated from the source by the different compiler. Proper interoperability requires to re-build such files for consistency and sometimes it is just necessary to regenerate such files in order to avoid FTBFS due to mismatch between different .pb.go files produced by incompatible compiler versions.
Imagine what (chaos) will happen if all libraries bundle source-less pre-generated files produced by different compiler versions. This is precisely what we are trying to avoid and that's why it is necessary to provide sources.
I don't see much drama if that one .proto file will have to be updated from parent repository once in a while.

from go-criu.

kolyshkin avatar kolyshkin commented on August 28, 2024

Maybe there's a way to add criu as a git submodule? It won't be required to build, but in case someone wants to regenerate the protobuf files there will be a way to do it.

@onlyjob care to implement it?

from go-criu.

adrianreber avatar adrianreber commented on August 28, 2024

Should be solved.

from go-criu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.