-
Notifications
You must be signed in to change notification settings - Fork 304
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 (Gogland) support #61
Comments
We're open to collaboration and we can provide any extension points that might be needed for integration. As I can see, integrating Bazel with Gogland won't be a hard task, the only thing that Gogland should know from Bazel is where SDK and libraries can be found. I took a look at the code. Unfortunately, we're going to get rid of using Java-specific libraries in Gogland and Go plugin, so looking for |
Custom skylark support is not in yet, but we're working on it. We weren't planning to provide Gogland IDE support (see #37), but I believe JetBrains is planning to release a basically-equivalent IntelliJ UE plugin (similar to the PyCharm setup). Is that correct @zolotov? If so, we're definitely interested in integrating with the Go plugin. Are there any plans for facet support in the Go plugin? (rather than requiring the project SDK be a Go SDK) |
Yes, there will be the Go plugin for IntelliJ Ultimate. Why not support Gogland IDE? I didn't find the answer in #37. It's just the very same code as for plugin supporting. Please contact me if you have any technical issues on supporting different IDEs. No, we're not going to introduce facets and the plugin doesn't require project SDK either. Instead, there will be a Gogland-specific project settings storage that will contain GOPATH and GOROOT settings. |
No technical problems supporting Gogland beyond the additional maintenance -- supporting only three products (IntelliJ Community, IntelliJ Ultimate, and CLion) significantly reduces our maintenance burden. So we try to encourage internal users to use IntelliJ UE rather than Webstorm, PyCharm, etc., in cases where the standalone IDE is a functional subset. We'll certainly reconsider if there's demand for Gogland-specific support though. |
Having no possibility to use bazel with Goglang is really sad. Currently, there is seems no any integrated build tools that could be used inside the IDE to build a complex project that doesn't feet into simple |
What we do internally is we have a hack that code-generate a set of symlinks that we use as What's more, you can't even load the Bazel plugin into Gogland as it is complaining about lacking Java-specific dependencies. Would love to at least use the plugin for editing |
Are there more concrete plans for Go support on the plugin? The dependencies are not being imported properly in Intellij UE when using both the bazel plugin and the Go plugin. |
We have no concrete date for Go support, but it is something we'll definitely get to at some point. |
@brendandouglas could we get some documentation on how to configure the go support. I can't figure out how to set the goroot, and only code in the GOPATH is picked up (not vendored directories). |
Go support is extremely rudimentary at the moment. It's something we're currently working on. When that's done, if it turns out there are manual set up steps required, we'll add them to the documentation. |
The latest release should have much-improved Go support, and GOPATH / import resolution should all be set up automatically as part of the Bazel sync action. Closing this general issue, but please open separate issues for specific problems with Go support. |
I think the original issue is geared towards the fact that Gogland (now Goland) does now allow the installation of the IntelliJ plugin due to the IDE's missing Java dependencies. |
Yes, we don't build the plugin for Goland, but instead support using the Goland plugin in IntelliJ UE. This has all the same features as Goland itself, but isn't specific to Go. |
The Bazel plugin should now be available for Goland, as of the latest release |
Very happy to have the Bazel plugin available for GoLand... though it fails to initialize. Getting "Bazel plugin dependencies are missing": "The JUnit plugin is disabled, but it's required for the Bazel plugin to function. Please enable the JUnit plugin and restart the IDE" Unfortunately, there is no JUnit plugin for GoLand. This is GoLand 2018.1.2 and Bazel Plugin 2018.01.02.0.1. On Mac that also has IntelliJ IDEA Ultimate installed. Failure seems to be in Any info/guidance much appreciated. thanks, |
@tdarci, I think it's currently only supported for the 2017.x releases as of the latest plugin release. |
@mwitkow , @ains you mentioned that
Could you, please, share the details? Unfortunately i could not make the plugin work with the most recent Intellij or GoLand. It only works for me in Intellij 2017.3 but its Go integration is not as nice as i expected: so it fails to resolve local imports (and also some non-local), however everything builds and runs (tests) fine in Bazel. |
The open source rules_go implementation has different providers from what blaze has internally, and we can't access them without a hard dependency on rules_go from our aspect. Until that issue is resolved, we won't be able to resolve test and protobuf sources. |
Given the popularity of |
It needs to be exactly the same copy that the user is loading into their project. We can't ask all of our users to load rules_go. |
@chaoren , is there any workaround for this problem? As i've tried different approaches and neither of them worked. import "github.com/mennanov/scalemate/accounts/proto/accounts" The generated *.pb.go files (produced by the
I created a separate folder to mimic a GOPATH and added it to the GoLand GOPATH settings:
But GoLand is still unable to resolve this import. |
$GOPATH seems to be ignored by GoLand when the Bazel intellij plugin is activated. I've finally come up with an ugly hack: created symlinks in the same directory where the .proto files are to the generated *.pb.go files and added a separate # gazelle:exclude accounts.pb.go
# gazelle:exclude accounts.validator.pb.go
go_library(
name = "go_proto_hack",
srcs = [
"accounts.pb.go",
"accounts.validator.pb.go"
],
importpath = "github.com/mennanov/scalemate/accounts/accounts_proto",
visibility = ["//visibility:public"],
deps = [
"//shared/proto:go_default_library",
"@org_golang_google_grpc//:go_default_library",
"@com_github_golang_protobuf//proto:go_default_library",
"@com_github_mwitkow_go_proto_validators//:go_default_library",
"@io_bazel_rules_go//proto/wkt:empty_go_proto",
"@io_bazel_rules_go//proto/wkt:field_mask_go_proto",
"@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
"@org_golang_x_net//context:go_default_library",
],
) Without having this UPD: actually, there is a better solution #194 (comment) |
We're currently moving our monorepo to Bazel, and the last dangling bit is:
https://github.com/bazelbuild/rules_go
We really enjoy Gogland and would love to have it nicely integrated with Bazel.
Is the custom skylark rule support in? If so, how would it work with the current Go plugin? @ignatov and @zolotov for context, as they're the main Golang Plugin developer.
The text was updated successfully, but these errors were encountered: