Giter Site home page Giter Site logo

Comments (7)

fmeum avatar fmeum commented on June 15, 2024

Have you seen https://github.com/bazelbuild/rules_go/blob/master/docs/go/core/bzlmod.md#configuring-nogo? It looks like this would cover your use case, it just uses Bazel instead of Go packages to identify the inclusion/exclusion scope.

from rules_go.

DolceTriade avatar DolceTriade commented on June 15, 2024

Is this exclusively using bzlmod? Unfortunately it will take some time for us migrate to bzlmod.

from rules_go.

fmeum avatar fmeum commented on June 15, 2024

Is this exclusively using bzlmod? Unfortunately it will take some time for us migrate to bzlmod.

For now yes, but if we can find a way to realize the same configuration option for WORKSPACE, we could definitely open it up. The general setup is there.

from rules_go.

DolceTriade avatar DolceTriade commented on June 15, 2024

I'll look into that approach.

from rules_go.

DolceTriade avatar DolceTriade commented on June 15, 2024

Do you think the approach should be to expose includes/excludes into go_register_toolchains or just to expose go_register_nogo to workspace users?

It sounds like the latter is the right thing to do. Maybe make a wrapper that automatically sets the name...

As a workaround:

This works until we can migrate to bzlmod.

load("@io_bazel_rules_go//go/private:nogo.bzl", "go_register_nogo")

# Add lint checking
go_register_nogo(
    name = "io_bazel_rules_nogo",
    includes = ["@@//:__subpackages__"],
    nogo = "@//bazel/go:lint",
)

from rules_go.

fmeum avatar fmeum commented on June 15, 2024

Yes, the approach of providing a simple macro wrapper around your workaround sounds best to me.

Could you add a test along the lines of the existing Bzlmod test? This would help us clarify how the WORKSPACE way of configuring nogo interacts with apparent vs. canonical repository names.

from rules_go.

DolceTriade avatar DolceTriade commented on June 15, 2024

Took another stab at this here: #3842

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.