src,doc: fix alpha tag on non-alpha releases - #65567
Conversation
|
Review requested:
|
ccce945 to
68ebf14
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65567 +/- ##
==========================================
- Coverage 90.07% 90.07% -0.01%
==========================================
Files 751 751
Lines 254875 254875
Branches 48115 48117 +2
==========================================
- Hits 229586 229583 -3
- Misses 16467 16472 +5
+ Partials 8822 8820 -2 🚀 New features to boost your workflow:
|
|
I'm not sure this is helping, instead of having 3 macros we'd have 4 🤔 I don't think it's making it less likely to slip into a non-alpha release either |
Signed-off-by: Lazizbek Ergashev <lazerg2@gmail.com>
68ebf14 to
193b5e8
Compare
|
Fair on the macro count, I dropped the extra one. The guard now reads the three that already exist: #if NODE_ALPHA_MAJOR_VERSION || NODE_ALPHA_MINOR_VERSION || NODE_ALPHA_PATCH_VERSION
On the second point, I think this version does help. 26.8.0 went out alpha-tagged without anyone editing the file. The macros arrived through a backport and their presence alone was enough. Now the leftover state is all zeros, which builds a plain release, and a releaser has to put a number in to get the tag. Deleting them still works, so v26.x stays correct as it is. The tradeoff is that the first alpha has to be 0.0.1. |
|
I’m simply not convinced any change is needed, the |
|
Fair enough. Leaving the macros in place on `main` is what makes the first v27 release come out alpha without anyone having to remember it, and my patch takes that default away. The 26.x slip got caught in a day and 26.8.1 is out, so nothing is pending. Thanks for the look. |
NODE_ALPHA_MAJOR_VERSIONis defined as 0 rather than left undefined, so the#ifdefguard held for every release build. That is how v26.8.0 shipped asv26.8.0-alpha.0.0.0. 26.8.1 is out and the macros are gone from v26.x, but main still carries them, so v27 can hit the same thing.The tag now depends on the alpha version actually being set. Macros at zero, or missing entirely, both give a plain release. The cost is that the first alpha starts at 0.0.1 rather than 0.0.0.
Refs: #65566