question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error importing a library when using the plugin

See original GitHub issue

Despite the libraries existing in my workspace , I keep on getting this error Build constraints exclude all Go files in //path/to/library . I am not sure exactly how to interpret this error correctly as I have no issues importing other libraries. This has lead to syntax highlighting being red over all my source files as the ide keeps on showing the import as invalid.

To reproduce this issue locally:

  • Create a bazel project from this https://github.com/prysmaticlabs/prysm.
  • After syncing the project , open up any source file(ex : beacon-chain/blockchain/service.go) which imports this package: github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1
  • You will then get the error Build constraints exclude all Go files , which leads to syntax highlighting of any obejct used from that package being red as it is regarded as invalid.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:6
  • Comments:8

github_iconTop GitHub Comments

1reaction
ewangcommented, Feb 8, 2019

@nisdas After further investigation, looks like IntelliJ with Go plugin doesn’t enable Vgo support by default but GoLand does. Disabling Vgo support for the project in GoLand resolved the above issue for me.

0reactions
blorentecommented, Dec 8, 2022

Could you try updating to the newest IntelliJ/GoLand, and updating the plugin? There’s been quite a bit of work on .pb.go files lately.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WordPress: Fix "Failed to import Media" error - devowl.io
Your media import failed in the WordPress Importer? We will explain where the problem could be and how you can fix it!
Read more >
Gradle error while importing library - Stack Overflow
May be you are using a build tool not existing in your installation. Open your SDK Manager and download the latest Build Tools...
Read more >
Error trying to import AppD plugin - AppDynamics Community
Hi team,. I'm am just trying to import the Appd plugin inside an android library: apply plugin: 'com.android.library'
Read more >
Error importing xlsx node library - Plugin and Widget API
That projects comes with it's own typings. However, when I run the plugin, it crashes immediately with: Error: Syntax error on line 1: ......
Read more >
Module import error from jython plugin library
Hello, MagicDraw 18.1 had the issue you described, in 18.2 and later versions it was fixed. If you cannot upgrade to later version,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found