Skip to content
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

missing metadata for import of "..." #15

Open
x1unix opened this issue Jan 23, 2025 · 0 comments
Open

missing metadata for import of "..." #15

x1unix opened this issue Jan 23, 2025 · 0 comments

Comments

@x1unix
Copy link

x1unix commented Jan 23, 2025

When importing a new package in a Gno file, a following issue occurs:

Image

This issue is often happening after importing ufmt package. Usually this happens if package info or its dependencies is incomplete.

This issue is a heisenbug and can be solved by restarting an LSP server

Here is an LSP log from neovim: lsp.log.zip

Demo

Screen.Recording.2025-01-23.at.00.54.13.mov

Potential Fixes

Here are potential causes:

Missing dependencies

Some Gno packages import Go standard library or symbols which doesn't exist.

To address this, you might need to supply stub packages to satisfy gopls.

Known missing packages which used by Gno stdlib

builtin
encoding/json
fmt
io/fs
os
reflect
unsafe

Some other internal bug

I had problems with gopls's package loader and sometimes introducing a little timeout inside package driver helps.

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

No branches or pull requests

1 participant