4 ms·
It is odd that the Go team is all in on semantic import paths, but basically everyone else is like “I will blow up the moon if it means I don’t have to use v2 i
by justlexi93 7y ago
It is odd that the Go team is all in on semantic import paths, but basically everyone else is like “I will blow up the moon if it means I don’t have to use v2 in my import path.
- mfcl 7y agov2 is used so that the import path is different. The idea is that by breaking the API, you are basically making a new module instead of improving one (metaphorically of course), and it doesn't make sense for the same module to have the same import path. If you want to change the import path and also release a new version, then simply changing the import path is enough. No need to put v2. See it as them releasing a totally new package that just happens to have the same name, if that helps.
- zadokshi 7y agoI wonder if we will start seeing people add v1.example.com, v2.example.com etc... to their git servers to avoid having to change the path's in all of their private projects.
- Gibbon1 7y agoSeems like you need something like a DNS server for repo's.