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

Sharing .proto with other repositories via git submodule #453

Open
2 tasks
jan-dolejsi opened this issue Jul 14, 2023 · 0 comments
Open
2 tasks

Sharing .proto with other repositories via git submodule #453

jan-dolejsi opened this issue Jul 14, 2023 · 0 comments

Comments

@jan-dolejsi
Copy link

User Story

As a solver maintainer (let's say it is a Java based solver) I want to expose my solver as a UP compatible planner to let others call it, but without including the entire unified-planning repo into my project, and without relying on a copy & pasted .proto file, which becomes out of sync.

As a non-python consumer of the UP framework (let's say it is a javascript browser app coded in typescript) I want to be able to compile my client against the .proto to be able to invoke, but without including the entire unified-planning repo into my project, and without relying on a copy & pasted .proto file, which becomes out of sync.

The fact that the .proto is included in the up repository is convenient for up maintainers, but inconvenient for everyone else. I suggest a new repository is created (let's say unified-planning-proto or unified-planning-schema), which simply hosts the .proto file (which could also at that point be split to 2 to separate the messages from the service interface). Some maintenance instructions or documentation could also be hosted there.

Then the new tiny repo would be added as a git submodule to the up repo to a /proto path using:

git submodule add https://github.com/aiplan4eu/unified-planning-proto proto

See git submodule guide.

All consumers, or solver implementers could do the same thing. Everyone would stay in sync. Everyone could see that they are behind the central .proto file(s) by running git status or by just looking at the Git pane in VS Code.

Acceptance Criteria

  • A planner coded in languages like Java or Go can generate the protobuf code from a .proto file(s) included into their git repository as a submodule
  • A consumer of up framework could generate all the Typescript interfaces/classes for the protobuf messages as part of their build pipeline by referring to the .proto included via a light-weight git submodule

Additional Material

Attention Points

  • Instruction for git repo cloning should have the --recursive switch mentioned
  • The CI pipeline should also be amended to clone submodules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant