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

go.mod weirdness or my stupidity? #699

Open
gherlein opened this issue Aug 13, 2024 · 7 comments
Open

go.mod weirdness or my stupidity? #699

gherlein opened this issue Aug 13, 2024 · 7 comments

Comments

@gherlein
Copy link

If I have a go.mod with:

module tinygo.org/x/drivers

I get this error:

gherlein@io:~/src/tinygo/m$ go mod tidy
go: finding module for package tinygo.org/x/drivers/mcp2515
go: tinygo.org/x/drivers imports
	tinygo.org/x/drivers/mcp2515: cannot find module providing package tinygo.org/x/drivers/mcp2515: unrecognized import path "tinygo.org/x/drivers/mcp2515": reading https://tinygo.org/x/drivers/mcp2515?go-get=1: 404 Not Found

If I change the go.mod to

module tinygo.org/drivers

it works.

I'm too new to go.mod foo to really grok this but it does not seem right.

@aykevl
Copy link
Member

aykevl commented Aug 14, 2024

It looks like the redirect is missing here: https://github.com/tinygo-org/tinygo-site/tree/dev/static/x/drivers

A workaround is indeed to use the module tinygo.org/x/drivers, but to avoid this issue in the future a small file needs to be added to tinygo-site to add the right redirect.

@deadprogram
Copy link
Member

See tinygo-org/tinygo-site#419 for PR that adds the missing files.

@gherlein
Copy link
Author

so fast! Great. How do I learn more about the module index stuff? It seems that tinygo.org/x/drivers/mcp2515 is somehow pointing to https://tinygo.org/x/drivers/mcp2515?go-get=1 - which you fixed the redirect. But how do I get smarter on where the index lives that does that mapping? If you know I'd love a pointer so I get smarter.

thanks again for the very fast fix.

@deadprogram
Copy link
Member

See https://pkg.go.dev/cmd/go#hdr-Remote_import_paths for more info

@gherlein
Copy link
Author

Thanks!

@gherlein
Copy link
Author

See tinygo-org/tinygo-site#419 for PR that adds the missing files.

If I get a wild hair and want to propose some documentation updates, are you guys open to PRs for the web site?

@deadprogram
Copy link
Member

Absolutely yes!

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

3 participants