-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
Unnecessary long filename for InternalFields_xxx files #73
Comments
Could you try in your sbt config
or some small enough number? |
What's the exact error you are getting? Agree that the full path isn't necessary and it could easily be fixed. |
the error message I received (from scalaPB, not the scala compiler) is just
|
I tested the suggested scalacOption but it didn't have any impact -- would have been a surprise to me, as the error happens in scalaPB (or eventually in protoc), not in the scala compiler |
Got it, you're right. We had in the past a similar issue that caused the generated class files to be too long when the protos are nested. I pushed a fix and 0.4.21 will appear shortly. |
I did run (on windows) into the issue of too long file names which caused the compiler to fail writing the InternalFields_xxx.scala document.
While it is primarily Windows to blame for the last century 256 path length limitation, scalaPB seems to generate filenames that are unnecessarily long: xxx contains the full path (from the protobuf root), but since the files are stored in the scala-package directory, using the .proto-filename alone should be sufficient. In my case this would have prevented the error from happening as my protobuf files reside in a quite deep file-hierarchy.
I could workaround the problem by changing my package-structure (shorter names), so no show stopper.
More important than this fix would be a good error message that indicates what went wrong. It took me quite some time to figure out what's going on.
Nevertheless: Thanks a lot for providing and supporting scalaPB!
The text was updated successfully, but these errors were encountered: