GithubHelp home page GithubHelp logo

Namespace about bazel-central-registry HOT 6 OPEN

bazelbuild avatar bazelbuild commented on July 17, 2024
Namespace

from bazel-central-registry.

Comments (6)

alexeagle avatar alexeagle commented on July 17, 2024

I mentioned this as well: #19 (comment)

from bazel-central-registry.

meteorcloudy avatar meteorcloudy commented on July 17, 2024

adopt a structure like github.com/bazelbuild/foo

But then how do people use this module in their MODULE.bazel file?
name = "foo" doesn't work, because Bzlmod won't know where to find "foo", if it's name = "github.com/bazelbuild/foo" then that's no difference than naming your module "com_github_bazelbuild_foo" in the flat namespace.

from bazel-central-registry.

silvergasp avatar silvergasp commented on July 17, 2024

then that's no difference than naming your module "com_github_bazelbuild_foo" in the flat namespace.

Are you suggesting this become the accepted method for namespacing in the future? Or is this a free for all?

To be clear, I'm impartial to what the naming schema ends up being. But developing some guidelines/rules around this would be helpful.

This would allow a more conflict-free approach to names, and naturally reflects the location where the dependency is hosted/managed.

Elaborating on your point, here's a concrete example of where we might run into issues. I maintain a set of rules under bazelembembedded/rules_cc_toolchain (amongst others) . rules_cc_toolchain stands out as a name that might raise some eyebrows if I was to try and carve out that namespace here. I'd certainly be happy with this becoming com_github_bazelembedded_rules_cc_toolchain.

By adding rules_cc_toolchain here, I would feel uncomfortable with misleading people into thinking that rules_cc_toolchain is some 'official' set of rules, and I believe that having it clear that it is hosted and managed by a third party is fairly reasonable. Previously, I felt it was pretty explicit in the need for the user to copy past the URLs to their WORKSPACE, and I didn't have a problem with the name.

In any case, I feel that defining some public standard for an acceptable name would be helpful, even if it doesn't end up being particularly prescriptive.

from bazel-central-registry.

pjk25 avatar pjk25 commented on July 17, 2024

https://docs.bazel.build/versions/5.0.0/bzlmod.html#registries mentions "In the future, we plan to add support for single-module registries, which are simply git repos containing the source and history of a project."

Certainly the central registry is convenient, but I wonder if it will in fact end up being the place where most modules live? If it's common to have multiple registries, then I think this question becomes about module precedence with multiple registries.

from bazel-central-registry.

meteorcloudy avatar meteorcloudy commented on July 17, 2024

Single module registries was planned because we were worried about that maintaining the module metadata in the BCR could be a lot work and some project owners would prefer not to do that. But with the development of https://github.com/apps/publish-to-bcr, I'm more convinced that the BCR would host most of the modules. Single-module registries is still something we could support in future, but it seems less urgent and important now. /cc @Wyverald WDYT?

from bazel-central-registry.

Wyverald avatar Wyverald commented on July 17, 2024

I agree that the BCR should be the source of the majority of Bazel modules.

from bazel-central-registry.

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.