upper / db

Data Access Layer (DAL) for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.
https://upper.io/
MIT License
3.54k stars 235 forks source link

Import paths: Use github.com and drop the version? #424

Open VojtechVitek opened 6 years ago

VojtechVitek commented 6 years ago

Proposal:

- import db "upper.io/db.v3"
+ import "github.com/upper/db
  1. Drop the version from the import path. The versioning can be handled with Dependency Managers (https://github.com/golang/dep or similar).
  2. Move the import paths to Github, as majority of Go open-source projects out there, so we don't need to rely on a custom domain being up and running on go get

Can we consider this at least for future releases, like Upper DB v4?

What does the Upper DB community think about this proposal? Any feedback welcome!

mfridman commented 6 years ago

@xiam As the Go community adopts module support, many folks are going to rely on the import path being resolvable at all times. There were a few incidents where upper.io/db.v3 was unavailable.

I think it would greatly benefit the community if this package adopted a well-supported hosting service such as github.com. Thoughts?

pkieltyka commented 6 years ago

I also like the idea to drop the vanity import path and move the github import path. Long-term wise it’s fewer pieces to support

As for migration, I say support the vanity domain till the end of the year, but move master to github import path. Folks should upgrade or already be using some kind of vendoring for older versions.

VojtechVitek commented 6 years ago

Since we're planning to break the import path, maybe it's a good time to release go.mod as well.

- import db "upper.io/db.v3"
+ import "github.com/upper/db/v3`

@xiam do you think we can do this as part of v3.x release cycle, or is it worth it releasing v4?

VojtechVitek commented 6 years ago

@xiam How does the upper.io/db.v3 import path work right now, btw?

I can't see any "go-import" meta tag in the HTML of the https://upper.io/db.

$ curl https://upper.io/db.v3 | grep meta | grep go-import
ERROR 1

$ curl https://upper.io/db | grep meta | grep go-import
ERROR 1

$ curl https://github.com/upper/db | grep meta | grep go-import
  <meta name="go-import" content="github.com/upper/db git https://github.com/upper/db.git">
genert commented 6 years ago

Since this is a breaking change, it would definitely makes sense to release it as v4.

But how would such change not break already existing import path "upper.io/db.v3"? For those that already use Go modules, it would be ok, but what about those that use Go version below 1.11.

Asday commented 6 years ago

It wouldn't have to be a breaking change if upper.io was left online. People can switch their import paths to github if they want reliability over vanity.

smyrman commented 4 years ago

what about those that use Go version below 1.11.

It's a long time since your comment @genert, but probably it's now OK not to worry about. The Go team themselves support (and release security updates for) their last two "minor" releases. At the time of writing, this means Go 1.13, and Go 1.12.

Still, as mentioned by @Asday, if releasing modules support as v4 (use import path github.com/upper/db/v4), and leaving upper.io for v3 and below, even Go versions of 1.10 and below should presumably keep building the v3 version as before.