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

go_library's with cgo enabled are not present in .project/.gopath #360

Closed
bithoarder opened this issue Jul 8, 2018 · 3 comments
Closed
Assignees
Labels
lang: go Go rules integration os: linux Linux support P3 We're not considering working on this, but happy to review a PR. (No assignee) product: GoLand GoLand plugin product: IntelliJ IntelliJ plugin type: bug

Comments

@bithoarder
Copy link

OS: Ubuntu 17.10
Intellij plugin: 2018.06.11.0.3
Bazel: 0.15.0
IntelliJ IDEA: 2018.1.5 (ULTIMATE)

This prevents Intellij from seeing the files and suggesting code completion.
The example BUILD file below deponstrates

Example build file that shows the problem, when the line "cgo = True" is commented out, Intellij will synchronize the project and the test_???.go is linked under .project/.gopath/somewhere.net/test. But when cgo=True is enabled the file vanishes from the .gopath.

load("@io_bazel_rules_go//go:def.bzl", "go_prefix", "go_binary", "go_library")

go_library(
name = "go_default_library",
srcs = ["test.go"],
cgo = True,
importpath = "somewhere.net/test",
visibility = ["//visibility:private"],
)

go_binary(
name = "test",
embed = [":go_default_library"],
visibility = ["//visibility:public"],
)

@chaoren chaoren added the lang: go Go rules integration label Aug 1, 2018
@chaoren
Copy link
Collaborator

chaoren commented Aug 3, 2018

Same issue as bazel-contrib/rules_go#1251.
The ctx.rule.attr.srcs is just empty for go_library with cgo = True.

@promiseofcake
Copy link

This is still affecting the current Goland / Bazel Plugin releases.

@mai93 mai93 added product: GoLand GoLand plugin product: IntelliJ IntelliJ plugin type: bug os: linux Linux support labels Feb 11, 2021
@blorente blorente added the P3 We're not considering working on this, but happy to review a PR. (No assignee) label Nov 22, 2022
@sgowroji
Copy link
Member

Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang: go Go rules integration os: linux Linux support P3 We're not considering working on this, but happy to review a PR. (No assignee) product: GoLand GoLand plugin product: IntelliJ IntelliJ plugin type: bug
Projects
None yet
Development

No branches or pull requests

6 participants