Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

How to create/update ~/.cache/bufls ? #57

Closed
fredrikaverpil opened this issue Jun 1, 2024 · 1 comment
Closed

How to create/update ~/.cache/bufls ? #57

fredrikaverpil opened this issue Jun 1, 2024 · 1 comment

Comments

@fredrikaverpil
Copy link

fredrikaverpil commented Jun 1, 2024

Hi! 👋
Thanks for this great project, I use bufls in Neovim on almost a daily basis. 😄
I have a question around the bufls cache.

I've got a cache of googleapis on this path (macOS), which makes gotodef work on types such as google.type.LatLng, which is awesome:

~/.cache/bufls/v1/module/data/buf.build/googleapis/googleapis

However, I've noticed that I can't perform a gd on google.protobuf.Timestamp.

I can't for the life of me understand what triggers this cache to be created in the first place, or how to get it updated. I've got a very old version of the googleapis in here, and I wish to update it. What should I do to make that happen?


EDIT: looks like removing the ~/.cache/bufls folder triggered a rebuild when you open up a .proto file and have bufls active in the Neovim buffer. But I still don't understand how I can add support for gd on e.g. google.protobuf.Timestamp.

@fredrikaverpil fredrikaverpil changed the title What mechanism creates the ~/.cache ? How to update ~/.cache/bufls ? Jun 1, 2024
@fredrikaverpil fredrikaverpil changed the title How to update ~/.cache/bufls ? How to create/update ~/.cache/bufls ? Jun 1, 2024
@fredrikaverpil
Copy link
Author

fredrikaverpil commented Jun 1, 2024

Ok, I think I figured it out.

I had to add protocolbuffers/wellknowntypes to my buf.yaml:

version: v1
name: buf.build/me/my-project
deps:
  - buf.build/googleapis/googleapis
  - buf.build/protocolbuffers/wellknowntypes

I then executed buf dep update and had my buf.lock updated. Then I had to hit gd (for "gotodef") on a type, which triggered bufls to download the files into the cache. And now gd works fine! 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant