Giter Club home page Giter Club logo

Comments (1)

illicitonion avatar illicitonion commented on June 24, 2024 1

In general, I think doing class rather than package based resolution where we can makes sense. I say where we can because we can't always reliably do so, the major exceptions that come to mind are:

  1. Generated code - both from things like annotation processers, and from things like protoc - we can't reliably know what classes some code may generate.
  2. Third party libraries - we rely on rules_jvm_external's lockfile which indexes a list of packages (e.g. in this example) - while we could have rules_jvm_external list out every class in every jar, that would make the lockfile huge (and also very churn-y when versions change).

Right now in our code, we treat packages and classes interchangeably quite often - #153 is a step towards not doing that so much - it introduces specific types for packages and classes, and makes clear where each is being used. It also documents that this gazelle plugin assumes quite strongly that people follow standard java naming conventions. Once that lands, I think being able to support class-specific resolves, even without doing general class-based resolution and keeping with packages as the primary resolution key, would be quite simple.

from rules_jvm.

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.