Code Monkey home page Code Monkey logo

Comments (5)

alexeagle avatar alexeagle commented on June 3, 2024

Slack context: https://bazelbuild.slack.com/archives/C014RARENH0/p1711483035156299?thread_ts=1711392090.732839&cid=C014RARENH0

from bazel.

Wyverald avatar Wyverald commented on June 3, 2024

Sorry for the long delay. In the README of your repro, you said:

This repository shows bazel_dep(name = "aspect_bazel_lib", version = "2.3.0", repo_name = "foobar") in MODULE.bazel NOT shadowing the aspect_bazel_lib loaded by rules_js via rules_js_dependencies() in WORKSPACE.

But that's expected behavior. This dep would shadow a repo called foobar loaded in WORKSPACE. If you remove the repo_name="foobar" part, it would correctly shadow anything called aspect_bazel_lib.

from bazel.

jbedard avatar jbedard commented on June 3, 2024

But that's expected behavior. This dep would shadow a repo called foobar loaded in WORKSPACE

That also does not work. See the protobuf example in the issue description.

from bazel.

Wyverald avatar Wyverald commented on June 3, 2024

But that's expected behavior. This dep would shadow a repo called foobar loaded in WORKSPACE

That also does not work. See the protobuf example in the issue description.

That would be unexpected. Do you have a repro for that?

from bazel.

jbedard avatar jbedard commented on June 3, 2024

There are various cases where shadowing is required. When legacy non-bzlmod loads a repository we need a reliable way to ensure that it can be shadowed by bzlmod modules.

  1. http_archive(name) may need to be shadowed by bazel_dep(name), this seems to work
  2. http_archive(name) may need to be shadowed by bazel_dep(repo_name), this seems broken
  3. http_archive(name) may need to be shadowed by bazel_dep(name) while I want to use repo_name for my local repo

The first seems to work, the protobuf issue is 2, and I guess my repo showed 3.

I'll try adding a case for 2 in my repo but I'm having trouble creating a simple one, I've only had the issue in fairly large repos.

from bazel.

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.