Giter Club home page Giter Club logo

Comments (7)

fmeum avatar fmeum commented on June 21, 2024

Could you try emptying your WORKSPACE file? This setup isn't required with Bzlmod and mixing the two won't work.

from rules_go.

fmeum avatar fmeum commented on June 21, 2024

That said, we don't have support for go.work yet. You can currently only load deps from a single go.mod.

from rules_go.

Kruemelmann avatar Kruemelmann commented on June 21, 2024

Many thanks for your fast reply. I tryed an empty WORKSPACE file aswell but gazelle is adding this lines automatically if i run

bazel run //:gazelle -- update-repos -from_file=go.work -to_macro=deps.bzl%go_dependencies

Thanks for mantioning that its not supported yet. I know that the following is not a official google example but i found an aspect build example
in which they show a similar setup and theirs seem to work.
The main difference is actually that they use the WORKSPACE file and i have gone with bzlmod.

Can you give a rough estimate of when the feature will be implemented or is Go Workspaces support more in the distant future?

Many thanks again

from rules_go.

fmeum avatar fmeum commented on June 21, 2024

Many thanks for your fast reply. I tryed an empty WORKSPACE file aswell but gazelle is adding this lines automatically if i run

I can't reproduce this. If I clear the contents of WORKSPACE.bazel, it remains empty after bazel run //:gazelle.

Can you give a rough estimate of when the feature will be implemented or is Go Workspaces support more in the distant future?

The main problem isn't so much to implement this, it's to make sense of what it means in the context of Bzlmod and how it should interact with other Bazel projects that are also Go workspaces. Could you file an issue over at https://github.com/bazelbuild/bazel-gazelle to track this? I don't think we have an issue for it yet.

from rules_go.

Kruemelmann avatar Kruemelmann commented on June 21, 2024

Sorry for my mistake I just edited my comment with the correct command.


And of course I can create a corresponding issue at bazel-gazelle. I would simply adopt this description and refer to this issue for more information

from rules_go.

fmeum avatar fmeum commented on June 21, 2024

You don't need update-repos with Bzlmod, it also doesn't work. Please take a look at https://github.com/bazelbuild/rules_go/blob/master/docs/go/core/bzlmod.md to learn how to do this with Bzlmod.

The Gazelle issue could be about go.work support specifically, not this example repo.

from rules_go.

Kruemelmann avatar Kruemelmann commented on June 21, 2024

Oh ok, thank you very much. I had actually completely missed that.

Thanks again for your patience with me :) and I'll close the issue here and open the issue in gazelle later

from rules_go.

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.