-
Notifications
You must be signed in to change notification settings - Fork 438
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
proposal: add support for go modules #471
Comments
Hi there! 👋We don't want to enforce any versions to be used with our integrations. Users should be able to use any version they wish, as long as it is within the compatible ones. Is there anything that you are trying to achieve and the current setup is stopping you? If so, please provide a concrete example. It will help in finding a solution. |
Sure, so like all dependency specification things, this is just a safety and convenience thing, so users don't have to manually research what versions are compatible with this library. You could just specify that there are no restrictions if you want. Go modules is just a way of encoding that information for tools and users. One note - in the core code, under
Later, when developing, someone might want to use a different version of one of your indirect dependencies (maybe they heard about a security vulnerability, etc.), and they might be confused as to where that version comes from. They'll have to research to find that these dependencies are pulled in by So to summarize, people can still use your library as-is, but this is a safety and convenience thing which can make it easier to setup. It will also make it safer for you to add dependencies/constraints in the future, if that ever becomes necessary. |
Thanks for the detailed explanation. It helps. You bring up good points. I think this is definitely something we need to look into. Please allow us some time and we'll respond with a good solution. |
I am adding the |
It seems that this has become easier now based on https://github.com/golang/go/wiki/Modules#faqs--multi-module-repositories. We could tag each contrib using its own version. |
client-go recently merged an API-breaking change on master, and so instead we check out the latest working release of kubernetes/client-go. This is a stop-gap solution for the dependency management issue that should be addressed with modules as we move towards v2 (#471)
client-go recently merged an API-breaking change on master, and so instead we check out the latest working release of kubernetes/client-go. This is a stop-gap solution for the dependency management issue that should be addressed with modules as we move towards v2 (#471)
Since more and more issues are popping up around module support, and with go 1.14, "module support in the go command is now ready for production use." we may want to talk about exactly how and when we want to do this. We don't yet have a timeline for v2. Do we need to look at some sort of modules solution for the v1 tracer? |
Correct, let's do this. The idea was that the entire repository would turn into a single module. We can potentially do this today, but read on...
We could, but it's not going to help with #606 and #548 because even though those will start working, they will only work for users who have opted into modules. This means that modules will become a requirement to use dd-trace-go, breaking current users which didn't opt in. This would be quite unfortunate because we would be introducing a requirement which only applies to two integrations that most people might not be using. So I think the only remaining option is to leave this for |
I think this is the best way. I'm not sure exactly how we will handle integrations with multiple versions like grpc. Maybe vendoring will continue to be the best solution, as ugly as it is.
Breaking existing users would make this a non-starter for It's totally possible I'm missing something, though. Are there other specific issues you forsee? |
I was mistakenly thinking that the
That's great news and simplifies things a lot. The next thing that is slightly unclear to me: what should be listed as requirements in the |
This was unclear to me as well, and I was thinking the same thing: minimum supported major version for each integration. |
has there been any progress on go module support? if we could break down the tasks would be easy to get started am happy to help out |
We have this in our backlog but didn't get around to it. There's a lot of edge cases to consider and scenarios that we need to test, so we would prefer to do this work internally, but thank you for offering 🙏 |
To summarize what needs to be done:
Let me know if I have this right, or if I'm missing something. |
@knusbaum your contrib packages are wrappers so they can continue to be here (I think). You just need to make sure that they rely on go mod to fetch other packages ( However the second point you made is the main one. I would add in addition that you don't clone the repo within GOPATH. that would be a great test. |
PR is merged. Help with testing welcome. |
There's a v1.25.0-rc2 out for testing. It contains a few other changes too. Feel free to try it out and give feedback. This does not mean that we freeze master and have started to prepare for releasing 1.25. It is just an intermediate testing step which requires tagging. Development and merging PRs should continue as usual. |
Released in 1.25.0 |
…#595) client-go recently merged an API-breaking change on master, and so instead we check out the latest working release of kubernetes/client-go. This is a stop-gap solution for the dependency management issue that should be addressed with modules as we move towards v2 (DataDog#471)
Sorry if this is a duplicate, I looked but didn't see an existing issue.
Do you mind adding go modules support for this library? That way, people using go modules can make sure they have consistent indirect dependency versions. Currently, people using Go modules end up with a bunch of "indirect" versions in their
go.mod
file because of this library (for the libraries that this library imports). Since Go isn't sure which versions to use, it just picks the latest of each. But, if you add go modules support, you can indicate compatibility yourself.I don't think this will break compatibility with
dep
or with the use ofgopkg.in
, it will simply enhance the experience for go modules users and improve safety and maintainability.The text was updated successfully, but these errors were encountered: