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.

Cannot resolve option 'go_package'

See original GitHub issue

The text go_package in the line appears in red in the editor. Previously it did not. Not sure when it started happening. I am using 2.1 version.

option go_package = "somepackage" 

When I hover over, I see the text: Cannot resolve option ‘go_package’ how can I resolve?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:20 (6 by maintainers)

github_iconTop GitHub Comments

14reactions
rieshycommented, Jul 30, 2021

For me, it helped to uncheck the “Configure automatically” and remove “google/protobuf/” from the default Descriptor Path. Was: google/protobuf/descriptor.proto Now: descriptor.proto

8reactions
lovromazgoncommented, Aug 13, 2021

In the meantime before this is fixed by JetBrains, a fix was pointed out by Veniamin Albaev in IDEA-274732 - you should uncheck “Configure automatically” and set the prefix google/protobuf for the default location. This approach also makes sure that files importing google/protobuf/descriptor.proto are linted correctly (e.g. files that define custom file or field options). Screen Shot 2021-08-05 at 19 10 55

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot resolve option 'go_package' : GO-9832
When I hover over the word go_package, I get a tool tip saying "Cannot resolve option 'go_package'". How can resolve this problem?
Read more >
Cannot resolve import in .proto file - Stack Overflow
First of all, your import path is better to be like this : import "domain/repository.proto";. You must add the path of your proto...
Read more >
Go support for Protocol Buffers
The protocol buffer compiler will attempt to derive a package name and import path if a go_package option is not present, but it...
Read more >
Question about Go protobufs and import_prefix - Google Groups
I don't know the background of the Go import system or go_package option. However this statement concerns me a little: > We have...
Read more >
Go Protobuf Tips - Johan Brandhorst
... need to specify -I. , which also means the protoc will resolve all proto import paths relative to the current directory. ......
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