Giter Club home page Giter Club logo

Comments (7)

bjchambers avatar bjchambers commented on June 11, 2024

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.

SrodriguezO avatar SrodriguezO commented on June 11, 2024

@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.

andyscott avatar andyscott commented on June 11, 2024

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.

bjchambers avatar bjchambers commented on June 11, 2024

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.

bjchambers avatar bjchambers commented on June 11, 2024

Any progress / updates?

from rules_scala.

bjchambers avatar bjchambers commented on June 11, 2024

Is there any reason why the fix proposed in #217 doesn't work?

from rules_scala.

SrodriguezO avatar SrodriguezO commented on June 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.