Giter VIP home page Giter VIP logo

Comments (8)

fkorotkov avatar fkorotkov commented on May 28, 2024

@derekperkins what do you see in the "External Libraries" panel in Project View?

Screenshot 2022-08-25 at 10 13 04 AM

If you don't see then we'll need a bit more details about your machine setup. Which version of OS are you using and have you override any of the Buf related configs like BUF_CACHE_DIR?

from intellij-buf.

derekperkins avatar derekperkins commented on May 28, 2024

It's actually resolving now, I'm not sure what changed. Maybe it just took a while to propagate? It was probably 30 minutes yesterday that it was erroring. As I continue to iterate today, I'm seeing a similar issue again today where buf generate works great, but IntelliJ is lagging. Can I force refresh that external library?

from intellij-buf.

fkorotkov avatar fkorotkov commented on May 28, 2024

@derekperkins what's your OS? I wonder if there is an issue when Goland is not getting file system updates. Next time could you please try to invoke File -> Reload All from Disk which will force a sync between internal virtual FS and the real one.

from intellij-buf.

derekperkins avatar derekperkins commented on May 28, 2024

MacOS 12.5.1. Restarting didn't fix the issue and neither did reloading files from disk.

It's possible I may be triggering a different bug now, as my issue is around the import of a buf module in a local workspace.
image

from intellij-buf.

derekperkins avatar derekperkins commented on May 28, 2024

It suggests the auto-import based on the root relative path, vs resolving based on the module it lives in. My module is defined in /proto

image

buf.yaml

version: v1
name: buf.build/nozzle/nozzle
deps:
 - buf.build/googleapis/googleapis

from intellij-buf.

fkorotkov avatar fkorotkov commented on May 28, 2024

The resolution is based of location of buf.yaml. The plugin basically goes up the file tree until it sees buf.yaml Do you have buf.yaml for your /proto module?

from intellij-buf.

derekperkins avatar derekperkins commented on May 28, 2024

We have a top level buf.yaml that ignores the proto directory, handling all our pre-consolidated proto management using the buf style guide. The buf.yaml under the proto directory is for the module. It feels like the plugin is trying to use /buf.yaml instead of /proto/buf.yaml, even though I'm in /proto/nozzle/billing/v1/*.proto

file layout

.
├── buf.gen.yaml
├── buf.yaml
└── proto
    ├── buf.gen.yaml
    ├── buf.lock
    ├── buf.yaml
    ├── gen
    ├── nozzle
    │   ├── billing
    │   │   └── v1
    │   │       ├── plan.proto
    │   │       ├── subscription.proto
    │   │       └── usage.proto
    └── protohelpers

/proto/buf.yaml

version: v1
name: buf.build/nozzle/nozzle

deps:
 - buf.build/googleapis/googleapis

lint:
  use:
    - DEFAULT
    - COMMENT_ENUM
    - COMMENT_MESSAGE
    - COMMENT_RPC
    - COMMENT_SERVICE
    - UNARY_RPC
    - PACKAGE_NO_IMPORT_CYCLE

breaking:
  use:
    - FILE

from intellij-buf.

derekperkins avatar derekperkins commented on May 28, 2024

This is still an issue. The plugin tries to autocomplete from the root of our repo rather than the root of the buf module, which is /proto

from intellij-buf.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.