Comments (7)
Any thoughts here? This seems like it could be pretty bad in larger projects? Since the scala_proto_library
includes generated code for all of the proto dependencies, if you have a bunch of different proto files with inter-dependencies, you are generating code and compiling it every time those dependencies are used, rather than just sharing the scala library.
from rules_scala.
@andyscott would you have bandwidth to take a look? @bjchambers's points sound valid to me, but I have very limited experience with protobuf
from rules_scala.
The solution for this is to use an aspect that adds granular protoc compilation steps for each small grouping of proto files. It's not terribly hard to implement, so I can take a look this next week.
tweag/rules_haskell has done this for quite some time, and bazelbuild/rules_scala followed suit not too long ago.
from rules_scala.
When balezbuild/rules_scala
added that it also broke a lot of the abilities to use ScalaPB extensions (see bazelbuild/rules_scala#753 and bazelbuild/rules_scala#751). I'm also not sure that more granular protoc is necessary.
It seems like an easier fix would be to pass only the protos in srcs
to the protoc invocation. Other files in the transitive dep set could be passed using -I
. If there is a directory containing only the files to pass, that's easy. I'm not sure if it would be necessary to create a separate directory tree containing all the transitive deps.
from rules_scala.
Any progress / updates?
from rules_scala.
Is there any reason why the fix proposed in #217 doesn't work?
from rules_scala.
Hey @bjchambers sorry about the slow responses; it's a busy time of year. I still must defer to Andy on this one. @andyscott friendly ping : )
from rules_scala.
Related Issues (20)
- How do I use a different scala version? HOT 7
- scala library doesn't show up in intellij HOT 5
- NoClassDefFoundError HOT 5
- Cannot configure scala_deps_used via --define HOT 9
- "Failed to save cached analysis" error HOT 5
- NoSuchFileException when running scalafmt HOT 3
- deps_used error when used with rules_docker's scala_image HOT 19
- Comparison/Document relationship with bazelbuild/rules_scala HOT 3
- Error when using repl with a compiler plugin configured with global_scalacopts
- scala_format_test vs scala_with_scalafmt.bzl HOT 1
- Compiling Scala 2.13 HOT 7
- Error on build: depset elements must not be mutable values HOT 4
- Add some comments to tests/WORKSPACE HOT 6
- scala_library from generated sources not showing up in intellij HOT 3
- ScalaCheckDeps error with --jobs build option HOT 5
- Cannot build a scala_test rule HOT 2
- Zinc AnalysisCache outputs are not reproducible HOT 2
- error running coverage command
- Travis merge check status not updating on PRs
- Is this project dead? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_scala.