Bug 18308 – __VERSION__ insufficient; should also have __VERSION_MINOR__ and __VERSION_PATCH__ (eg 2.078.1)

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-01-26T21:50:16Z
Last change time
2024-12-13T18:56:23Z
Assigned to
No Owner
Creator
Timothee Cour
Moved to GitHub: dmd#19371 →

Comments

Comment #0 by timothee.cour2 — 2018-01-26T21:50:16Z
__VERSION__ insufficient; should also have __VERSION_MINOR__ and __VERSION_PATCH__ (eg 2.078.1) or simply: __VERSION_FULLY_QUALIFIED__ for 2.078.1 and 1.7.0 also, how do we get __VERSION_LDC__ ? eg for ldc 1.7.0 ?
Comment #1 by timothee.cour2 — 2018-02-02T01:01:11Z
actually a `__traits(version_fully_qualified)` would be preferable to avoid introducing all those keywords.
Comment #2 by greensunny12 — 2018-02-02T03:45:07Z
There's std.compiler: https://dlang.org/phobos/std_compiler.html e.g. https://run.dlang.io/is/IJUmFt Patch releases should only fix bugs, so the only the latest should be considered for developers (though yep, that's not exposed atm). Also we are about to to switch to SemVer soon, so we should be careful to jump into anything at the moment: https://forum.dlang.org/post/[email protected] > also, how do we get __VERSION_LDC__ ? eg for ldc 1.7.0 ? That's something you will need to ask the LDC people.
Comment #3 by greeenify — 2018-04-08T09:28:26Z
I think we should close this as WONTFIX or invalid because std.compiler already provides this for you and there's nothing actionable for DMD in this issue.
Comment #4 by b2.temp — 2018-04-08T10:05:32Z
No this issue is valid. conditional compilation should work for testing the patch. I actually DO have a case where making te difference between 2.079 and 2.079.1 would be useful (feature limited in the release and unlimited in the patch because the patch includes a REG fix). We have no way to do that for now.
Comment #5 by robert.schadek — 2024-12-13T18:56:23Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19371 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB