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

move git info into VersionNumber? #541

Closed
nolta opened this issue Mar 8, 2012 · 8 comments
Closed

move git info into VersionNumber? #541

nolta opened this issue Mar 8, 2012 · 8 comments

Comments

@nolta
Copy link
Member

nolta commented Mar 8, 2012

In preparation for non-git src packages, how about moving the git version info into the build number part of VersionNumber?

               _
   _       _ _(_)_     |
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  A fresh approach to technical computing
  | | | | | | |/ _` |  |  
  | | |_| | | | (_| |  |  Version 0.0.0-prerelease+git.1331143345.ea72893483*
 _/ |\__'_|_|_|\__'_|  |
|__/                   |

A bit more inscrutable, but bonus points for being semantic versioning compliant (i think).

@StefanKarpinski
Copy link
Member

Yeah, something like that probably makes sense. What's the 1331143345 bit about?

@nolta
Copy link
Member Author

nolta commented Mar 8, 2012

It's the unixtime, so they're sorted correctly. I'll replace it with a strftime(ymdHMS) string.

@StefanKarpinski
Copy link
Member

Ah, I see. Hmm. That's actually a bit problematic since it depends on the machine it was built on. Using the timestamp introduces incomparability of versions that were actually built from the same code and can, of course, fail to compare correctly across different build machines. I think it may be better just to have the versions sorted arbitrarily (i.e. by git commit hash) — we shouldn't really be comparing versions based on build number in the first place. I know that they're defined to have a well-defined ordering, but why would you need to compare different build numbers — are you going to require something before or after a specific build with the same major, minor and patch numbers? Seems highly unlikely.

Also, I can't believe we're already up to the 1.3 billion seconds past the epoch. My, how time flies!

@nolta
Copy link
Member Author

nolta commented Mar 8, 2012

Agreed, adding the time isn't really elegant, but i was just trying to stick to the standard.

However, it isn't the build time, it's the commit time, so it doesn't change if you rebuild. And i think it's useful to look at the version and see that it was from Mar 01, for example.

@Keno
Copy link
Member

Keno commented Mar 8, 2012

I liked the way it was displayed before when git was used (with the commit and proper ISO time on a separate line). Could we change the version number in the way you propose, but still keep displaying the commit its time separately on the next line?

@StefanKarpinski
Copy link
Member

Seems reasonable to me. That means there will be some redundant information but that's ok. There's also the issue that we probably don't want to include build info when the build is exactly the tagged version, but that's a relatively minor detail.

@StefanKarpinski
Copy link
Member

Also, be aware that if Jeff sees this thread, he may just delete jl/version.jl altogether.

@nolta
Copy link
Member Author

nolta commented Mar 8, 2012

Ok, done.

@nolta nolta closed this as completed Mar 9, 2012
Keno pushed a commit that referenced this issue Oct 9, 2023
ViralBShah pushed a commit that referenced this issue Jun 25, 2024
Stdlib: SparseArrays
URL: https://github.com/JuliaSparse/SparseArrays.jl.git
Stdlib branch: main
Julia branch: master
Old commit: 82b385f
New commit: e61663a
Julia version: 1.12.0-DEV
SparseArrays version: 1.12.0
Bump invoked by: @ViralBShah
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaSparse/SparseArrays.jl@82b385f...e61663a

```
$ git log --oneline 82b385f..e61663a
e61663a Update to SuiteSparse 7.7 (#545)
4141e8a Update gen/README.md (#544)
45dfe45 Update ci.yml to ot fail if codecov fails (#541)
0888db6 Bump julia-actions/cache from 1 to 2 (#540)
740b82a test: Don't use GPL module when Base.USE_GPL_LIBS=false (#535)
```

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
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

No branches or pull requests

3 participants