-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Options set on transtitive projects are not picked up. #283
Comments
Thanks for reporting. As a workaround you should be able to add to the I'll need to think for a better overall solution. For external jar (not dependencies in the same build) we allowed exporting a manifest (https://scalapb.github.io/docs/customizations/#publishing-package-scoped-options) that will automatically load the options. We don't have anything similar to subprojects, and it would be nice to come up with a way to unify. |
I will make a workaround in this project by adding the: |
We are using the following hack to source a specific file ( // We scope to PB.generate here to break a circular dependency preventing sbt to evaluate the task graph,
// as PB.includePaths depends on PB.protoSources
PB.generate / PB.protoSources ++=
PB.includePaths.value.flatMap { depIncludePath =>
// The "scalapb" subdirectory does not match the package but is used as a drop-in directory convention
Seq(depIncludePath / "scalapb").filter(dir => (dir / "package.proto").exists())
}, |
Ah cool idea! i'll try it out |
I couldn't get it to work as you posted but i ended up using and moved the options to a special include folder and i was lucky that only 1 project has custom types for now:
But my build hangs so i suppose there is some circular dependency issue. |
Maybe a simpeler solution would be to automatically add proto files if they have the name scalapb-options.proto or some other convention. Its probably the easiest without opening any file. Or give it a special extension so other generator's ignore it. I.e. ' |
Projects that dependOn other sbt projects does not include defined protofiles from other sbt projects.
so if i define this in the 'commons ' project and have a concrete project depend on it:
where the commons has these transformers defined it will not be picked up by the other project:
The text was updated successfully, but these errors were encountered: