GithubHelp home page GithubHelp logo

[Proposal]Add version in tidb about tidb HOT 13 CLOSED

pingcap avatar pingcap commented on August 15, 2024
[Proposal]Add version in tidb

from tidb.

Comments (13)

ngaut avatar ngaut commented on August 15, 2024

We have already support version. https://github.com/pingcap/tidb/blob/master/util/printer/printer.go#L23

from tidb.

astaxie avatar astaxie commented on August 15, 2024

That's weird. Why put the version in the util package? From the structure it's not make sense.

from tidb.

ngaut avatar ngaut commented on August 15, 2024

We may use it in interpreter. MySQL protocol layer. Or HBase engine.
Put to util package, so we keep it DRY.

from tidb.

astaxie avatar astaxie commented on August 15, 2024

You mean you will use the version in many other packages? Then the version is out of control. 😸

from tidb.

ngaut avatar ngaut commented on August 15, 2024

WOW, User could pass version information to those variables :)

from tidb.

xiang90 avatar xiang90 commented on August 15, 2024

@ngaut Well... You can make then read-only.

from tidb.

ngaut avatar ngaut commented on August 15, 2024

It's read only after assignment.

from tidb.

c4pt0r avatar c4pt0r commented on August 15, 2024

any updates? @ngaut

from tidb.

ngaut avatar ngaut commented on August 15, 2024

@astaxie

from tidb.

astaxie avatar astaxie commented on August 15, 2024

I have no idea on the version now. AFAIK https://github.com/pingcap/tidb/blob/master/util/printer/printer.go#L23 looks not good enough.

from tidb.

unknwon avatar unknwon commented on August 15, 2024

+1

Need something like Version() around here, and it should return semantic version, so app can check it in case a bug was introduced in older version but fixed in newer one.

from tidb.

fuxiaohei avatar fuxiaohei commented on August 15, 2024

the version number is useful to version control.

Now I find that if tidb code updated, the old goleveldb data directory can't load.

So I need lock a version to make sure to develop and compile.

from tidb.

ngaut avatar ngaut commented on August 15, 2024

Currently TiDB is evolving extremely fast. The version information is generated automatically by makefile:

LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBBuildTS=$(shell date -u '+%Y-%m-%d %I:%M:%S')"
LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBGitHash=$(shell git rev-parse HEAD)"

Does that sound ok? @fuxiaohei

from tidb.

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.