Giter Site home page Giter Site logo

API versioning about dns HOT 1 CLOSED

miekg avatar miekg commented on July 19, 2024
API versioning

from dns.

Comments (1)

miekg avatar miekg commented on July 19, 2024

[ Quoting [email protected] in "[dns] API versioning (#26)..." ]

This is a follow-up to the remark I made about that in #25:

Just thinking out loud here:

It'd be nice if there was some way to have my build break when the dns API
changes in maybe-incompatible ways. Because I use cgo I build my server on 3-4
different boxes, so my process for "keeping in sync" has just been to go get -u
-v, but then it's hard to know exactly which version of dns I got.

For geodns itself I build it with

REVISION=git rev-parse --short=8 HEAD
go build -ldflags "-X main.gitVersion $REVISION" -v

... maybe I should just add another version like that for the dnsGitVersion.

As for you making a subdirectory for "v2", that sounds like a huge hassle. I
think just do it on a branch, and if you need to keep v1 around when v2 is
ready to be merged setup a separate git repository that people can import and
alias to dns if they need the old version.

Haven't made the v2 switch yet, because as you say "it's a hassle" :)
Problem is that 'go get' does not know how to deal with branches afaik.
Same goes for tags.

I've seen the makefile of geodns and I like the idea of embedding versioning
info the binary (the one feature I miss from svn: $Id$), but doing with
git is incompatible with 'go get', so for a package like dns this can not
be done.

Thanks for saying, don't do manual (v2) branches, I'll just have to be more
prudent about the code I submit into the master branch.

Regards,

Miek Gieben                                                   http://miek.nl

from dns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.