-
Notifications
You must be signed in to change notification settings - Fork 998
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
Package conflicts exist between proto and non-proto modules. #684
Comments
I'm not 100% convinced that |
The problem is that protos have both services and types. So if we have to use those terms then I would still nest them under |
I don't see a problem using
The differentiation here could be one is an external / client API and one is internal. Adding that information to the package could be valuable. Unless there is a second implementation, the tech doesn't need to be in the package name. So I might suggest something like |
BTW, I'm not going to lose sleep over this so don't let me block you. |
Always appreciate the time taken. I'm going to remove the 0.5 project (should have been a milestone anyway). We can optimize for flagging the Your proposal doesn't look bad either. if sharing the Would be good to hear your thought on this @ches, especially if you have an existing standard for your Scala SDK. |
We do use (This should be public Real Soon Now, since v0.3.7 jars got published I just have a little bit of tidying up to do, and some sign-offs. v0.4 included although it's not tested in practice yet). I'm not personally in favor of To me protos are wire format that user code should never extend, the opposite of API.
I mentioned elsewhere that this was intentional for me too. I want it to stand out for me because if I have to write it in an import statement of an SDK documentation example, I basically consider it a bug to fix. Working directly with the proto objects is usually not a very pleasant API, and it takes control of compatibility away from a library author—codegen can change, protobuf-java runtime can change, you may intentionally change protos in ways where source and semantic compatibility could be preserved by wrappers/proper models. It's extra work to write and a bit of overhead, but worth it in the long run IMO. I'm sympathetic to "abstraction over implementation" argument for naming though. I'd be happy to call a package perhaps I'd also share that I heard a talk from the Python ecosystem awhile back where the speaker stressed something like,
and I really liked it. The Java ecosystem has package mania and half the time I'm wishing I could access a package private thing in a test but the project has 10 classes and 10 packages… Anyway, that's even further off on a tangential rant than I had veered already. |
Thanks for the detail @ches. You've swayed my opinion at least. I'd like to take the @Yanson I will submit a PR unless you want to hit the brakes here. This doesn't have to land in 0.5. |
I'm not so opinionated about this, so you guys go ahead. I prefer |
Java classes that are currently generated from Protobuf definitions have overlapping package names with Feast modules. This causes conflicts when trying to import classes from Feast modules.
For example the CoreService.proto uses
feast.core
, which is also in use by theFeast Core
module: example.Proposal is to prefix all proto generated packages with
.proto
The text was updated successfully, but these errors were encountered: