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

initial modules support #3

Merged
merged 1 commit into from
Aug 14, 2018
Merged

initial modules support #3

merged 1 commit into from
Aug 14, 2018

Conversation

dahankzter
Copy link
Contributor

I am really not sure if this is how to do it... I think for us to release v1.0.0 we would need to also create a v1.0.0 tag.

@@ -0,0 +1,3 @@
module github.com/scylladb/go-set

require github.com/fatih/set v0.2.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not like it. It's only needed for the benchmark.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what happened when I followed the instructions in https://github.com/golang/go/wiki/Modules I don't really like it either...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably just remove it but I am not sure how it would work for a user running go test -bench ./... for example.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really following vgo advancements maybe it's smart enough to figure it out (dep can do that).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmatczuk @dahankzter

Go modules' go.mod does not distinguish between test dependencies and non-test dependencies. Hence, because github.com/fatih/set is a dependency of one or more of github.com/scylladb/go-set/... packages or their (external) tests, then it is added.

@mmatczuk do you have a concern about this dependency being included?

@dahankzter - any reason you're choosing to ignore go.sum?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's good, thanks @myitcv I will add it when the time comes for it. Is the file format frozen yet?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Module support in Go 1.11 is still considered experimental, so never say never, but I would highly surprised if any changes were made that were backwards incompatible.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to support and expand slightly on that comment from @myitcv: the core go team has said the current file format understood by vgo and go 1.11 will be understood by future tooling... for example in this sentence at the end of the official Modules proposal document:

Even though the details may change, future releases will be able to consume Go 1.11-compatible source trees. For example, Go 1.12 will understand how to consume the Go 1.11 go.mod file syntax, even if by then the file syntax or even the file name has changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have rerun the procedure using the latest beta (3) and committed the go.sum file as well.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One other quick comment is that to make it clearer to your users at a glance as to why this dependency is there, you could add a manual comment in the go.mod file. Something like: // only imported when running benchmarks or however you would want to characterize it to help make it clear that it is not used outside of testing or benchmarks.

@mmatczuk mmatczuk merged commit be531f0 into master Aug 14, 2018
@mmatczuk mmatczuk deleted the add_modules_support branch August 14, 2018 07:00
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

Successfully merging this pull request may close these issues.

4 participants