Git Product home page Git Product logo

Comments (6)

slimsag avatar slimsag commented on July 21, 2024 1

No objection.

If there are no objections, I'd like to rename it to follow idiomatic Go style and set a better example. GitHub will setup redirects from old repo name, so it should be fairly harmless.

Just to be clear, we won't allow people to still go get github.com/go-gl/examples, right? I think it would be a mistake to support two import paths.

from example.

tapir avatar tapir commented on July 21, 2024 1

👍 no objection here as well.

from example.

slimsag avatar slimsag commented on July 21, 2024 1

I missed that the program wouldn't work, because I'd already fetched example into my GOPATH, so it was pulling assets from there despite me running a binary compiled from examples -- that's one confusing situation that could be avoided with the import path comments :)

PR LGTM

from example.

dmitshur avatar dmitshur commented on July 21, 2024

That's right. The import paths will be changed to github.com/go-gl/example/..., and I'll update all instances where they're mentioned in the README.

The supported redirects are just for people visiting the https://github.com/go-gl/examples webpage in their browser.

from example.

slimsag avatar slimsag commented on July 21, 2024

@shurcooL I think we should add import path checking to the example commands as part of this. I can still go get -v github.com/go-gl/examples/... freely:

$ rm -rf /Users/stephen/Desktop/godev/src/github.com/go-gl/examples/
$ go get -v github.com/go-gl/examples/...
github.com/go-gl/examples (download)
github.com/go-gl/gl (download)
github.com/go-gl/glfw (download)
github.com/go-gl/mathgl (download)
Fetching https://golang.org/x/image/math/f32?go-get=1
Parsing meta tags from https://golang.org/x/image/math/f32?go-get=1 (status code 200)
get "golang.org/x/image/math/f32": found meta tag main.metaImport{Prefix:"golang.org/x/image", VCS:"git", RepoRoot:"https://go.googlesource.com/image"} at https://golang.org/x/image/math/f32?go-get=1
get "golang.org/x/image/math/f32": verifying non-authoritative meta tag
Fetching https://golang.org/x/image?go-get=1
Parsing meta tags from https://golang.org/x/image?go-get=1 (status code 200)
golang.org/x/image (download)
github.com/go-gl/gl/v2.1/gl
github.com/go-gl/glfw/v3.2/glfw
golang.org/x/image/math/f32
github.com/go-gl/gl/v4.1-core/gl
github.com/go-gl/mathgl/mgl32
github.com/go-gl/examples/gl41core-cube
github.com/go-gl/examples/gl21-cube

In effect, we're still supporting both import paths, which IMO is bad.

from example.

dmitshur avatar dmitshur commented on July 21, 2024

In effect, we're still supporting both import paths, which IMO is bad.

I don't see that as us supporting both import paths. The old one just happens to work with go get, but it's not actually supported by us. The actual program won't work, you'll get an error:

2017/05/01 18:41:20 Unable to find Go package in your GOPATH, it's needed to load assets: cannot find package "github.com/go-gl/example/gl41core-cube" in any of:
	/usr/local/go/src/github.com/go-gl/example/gl41core-cube (from $GOROOT)
	/tmp/gopath/src/github.com/go-gl/example/gl41core-cube (from $GOPATH)

But, I'm okay with adding import comments, then the error will happen at go get time and maybe it's more clear.

from example.

Related Issues (20)

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.