-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
since
now takes an optional patch, eg: since: (1, 3, 1)
#14124
Conversation
add tests for tinclrtl
713835c
to
0593fd4
Compare
But introducing new symbols in a patched version is completely against semver so what's the point? |
branching can occur for other reasons than symbol additions and take advantage of But the main point is this: we're already breaking semver inside devel branch (ie, So instead of having a completely meaningless This has no impact on official nim releases (ie example#13606 changed the meaning of With my proposal, this would've been easily fixed by bumping NimPatch: NimPatch+=2 in that PR or a fixup PR (eg: (1, 1, 1) => (1, 1, 3)) so that I can branch: # in ~/.config/nim/config.nims
when (NimMajor, NimMinor, NimPatch) >= (1, 1, 3): switch("listCmd", "on") Obviously it's not limited to your user config, that was just 1 concrete example to illustrate. why bump via NimPatch+=2 instead of NimPatch+=1 ?that aspect is not as critical and independent of above discussion. docgen uses
|
IMO, things are fine as they are currently. No need to complicate them just to fit somebody's complicated workflow. KISS. This gets thumb down from me. |
Seems like a no-brainer to me. This indeed helps tracking additions to the |
Ok. I hope it means we can stop adding |
This PR makes it a bit easier to use NimPatch by supporting both
since (1,3)
andsince (1,3,1)
.see tests in tinclrtl.nim
NimPatch is underused (since 1.0 was release), but is useful even after 1.0 was released.
It allows writing portable code in between "official" nim releases even if switching branches/versions/commits.
For example, I can have in my user config.nims (or regular code) conditionals like
when (NimMajor, NimMinor, NimPatch) >= (1, 3, 3): useNewFeatureX() else: useWorkaroundForX()
and it'll work regardless which branches/versions/commits I'm on.
note that
when declared(foo)
won't work with overloads, andwhen compiles
has known caveats and won't work when inner logic changesit reduces (but doesn't elimitate) the need for introducing new define symbols in
compiler/condsyms.nim
it's self-documenting when a feature/symbol was introduced