Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the gazelle cmd hangs when use the isolate = True #1930

Open
andyliuliming opened this issue Sep 20, 2024 · 1 comment
Open

the gazelle cmd hangs when use the isolate = True #1930

andyliuliming opened this issue Sep 20, 2024 · 1 comment

Comments

@andyliuliming
Copy link

What version of gazelle are you using?

latest

What version of rules_go are you using?

0.50.1

What version of Bazel are you using?

7.2.1

Does this issue reproduce with the latest releases of all the above?

yes

What operating system and processor architecture are you using?

linux (ubuntu)

What did you do?

###############################################################################

Bazel now uses Bzlmod by default to manage external dependencies.

Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.

For more details, please check bazelbuild/bazel#18958

###############################################################################

"""Module for blablabuilder."""

module(
name = "blablabuilder",
version = "0.0.1",
)

bazel_dep(name = "rules_go", version = "0.50.1", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.38.0")

go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps", isolate = True)
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
"in_gopkg_yaml_v3",
)

go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")

Download an SDK for the host OS & architecture as well as common remote execution platforms.

go_sdk.download(version = "1.22.7")

and the golang is a simple main.go:

package main

import (
	"bytes"
	"os"

	"gopkg.in/yaml.v3"
)

func main() {
	f := os.Open(os.Args[1])
	var buf bytes.Buffer
	_ := yaml.NewDecoder(f)
}

build.bazel is

load("@gazelle//:def.bzl", "gazelle")

package(default_visibility = ["//visibility:public"])

# gazelle:prefix github.com/andyliuliming/blablabuilder
# gazelle:go_generate_proto false
gazelle(
    name = "gazelle",
    prefix = " github.com/andyliuliming/blablabuilder",
)

then when I run the
bazel run //:gazelle

it hangs forever.

What did you expect to see?

What did you see instead?

@fmeum
Copy link
Member

fmeum commented Sep 25, 2024

I can't reproduce this on Bazel 7.2.1 (and also not on 7.3.1). Could you share a repo with a full reproducer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants