Skip to content

External repo not working #257

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

Closed
0xstepit opened this issue Feb 8, 2023 · 6 comments
Closed

External repo not working #257

0xstepit opened this issue Feb 8, 2023 · 6 comments

Comments

@0xstepit
Copy link

0xstepit commented Feb 8, 2023

Hello, I'm trying to use gophernotes to test types of the following repo: https://github.com/cosmos/cosmos-sdk

I import the packages

import (
    "fmt"
    sdk "github.com/cosmos/cosmos-sdk/types"
)

and try to use:


addr := "juno1juczud9nep06t0khghvm643hf9usw45r4v7lq6"
valAddr := sdk.MustAccAddressFromBech32(addr)

On the terminal I receive the following message:

repl.go:2:12: not a type: sdk.MustAccAddressFromBech32 <*ast.SelectorExpr>

How can I solve it? thanks

@yg7001
Copy link

yg7001 commented May 24, 2023

Also I meet this.

repl.go:3:1: error loading package "github.com/thoas/go-funk" metadata, maybe you need to download (go get), compile (go build) and install (go install) it? can't find import: "github.com/thoas/go-funk"

@chenjpu
Copy link

chenjpu commented May 25, 2023

image

@ammar-elsabe
Copy link

Bumping this, I have the same issue

@BenoitBotton
Copy link

Has anyone made any progress on this? same issue:
image

@cosmos72
Copy link
Member

cosmos72 commented Aug 19, 2023

That's really strange: importing packages from the standard library is supposed to always work, and in case it fails, it's unrelated to this issue.
Maybe the cause is related to running inside WSL? It's a configuration I have never tested personally...

@cosmos72
Copy link
Member

cosmos72 commented Nov 3, 2023

Commit 5514204 fixes most issues importing packages.

Some imports may still fail. Known reasons are:

  • package being imported is or depends on a package that conflicts with gophernotes dependencies.
    Example: import "github.com/cosmos/cosmos-sdk/types" currently fails with:
error loading plugin "[...]/import_1.so": plugin.Open("[...]/import_1"): 
  plugin was built with a different version of package golang.org/x/text/transform
  • on Windows, importing third-party packages is supported only inside WSL, which is itself quite untested.
    In alternative, you can use gophernotes inside Docker or inside a Linux VM.

@cosmos72 cosmos72 closed this as completed Nov 3, 2023
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

6 participants