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

[POLL] Iris + Go Modules (Import path suffix or not) #1370

Closed
kataras opened this issue Oct 3, 2019 · 1 comment
Closed

[POLL] Iris + Go Modules (Import path suffix or not) #1370

kataras opened this issue Oct 3, 2019 · 1 comment
Milestone

Comments

@kataras
Copy link
Owner

kataras commented Oct 3, 2019

Hello Iris Community,

As you know the Go Team released the go modules.

There are two opened issues:

I would like to have your opinion on a serious subject about the import path. There are two ways to fix the above.

The first one is to keep the same import path and do:

$ go get github.com/kataras/iris@master

This will add a pseudo-version inside your project's go.mod:

require (
        github.com/kataras/iris v0.0.0-20191005193354-55afd07befa8
)

The import paths inside your program should look like that:

package mypackage

import "github.com/kataras/iris"
import "github.com/iris-contrib/middleware/cloudwatch"

However, tools like go mod tidy or if someone tried go get github.com/kataras/[email protected] will fail after go 1.13 because it does not contain the version suffix.

The second solution one is to increment the major version, replace and keep updating all import paths inside Iris and iris-contrib/middleware, iris-contrib/examples and e.t.c. to github.com/kataras/iris/v12 (see the version suffix, which can be a git branch or tag of this repository).

$ go get github.com/kataras/iris@v12

This should download the latest tagged version of v12.

The go.mod can look like that:

require(
    github.com/kataras/iris v12.0.0
)
package mypackage

import "github.com/kataras/iris/v12"
import "github.com/iris-contrib/middleware/cloudwatch/v12"
// [...]

There are several downsides of changing the import path, as it is a huge breaking change but in the same time it's the standard Go's way nowadays.


Please think of it and vote up what you would like to happen here.


Yours,
Gerasimos Maropoulos, Author of Iris.

@kataras
Copy link
Owner Author

kataras commented Oct 26, 2019

People have spoken, after 23 days, poll comes to its end. Thank you all so much for your interest and your contribution.

The next release of Iris will be used as import "github.com/kataras/iris/v12" , go get github.com/kataras/iris/[email protected] and require github.com/kataras/iris/v12 v12.0.1 inside go.mod. The installation section, examples and middleware repositories are updated too.

Repository owner locked as resolved and limited conversation to collaborators Oct 26, 2019
@kataras kataras closed this as completed Oct 26, 2019
@kataras kataras unpinned this issue Oct 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant