In alpha versions, the --@alpha@ and --@end-alpha@ comments are being kept as expected (allowing the code inside to run), but the --[===[@non-alpha@ and --@end-non-alpha@]===] comments are being transformed into --@non-alpha@ and --@end-non-alpha@ (allowing the code inside to run), which shouldn't happen.
In release versions, the --@alpha@/--@end-alpha@ comments are being transformed into --[===[@alpha and --@end-alpha@]===] as expected (preventing the code inside from running), but the --[===[@non-alpha@ and --@end-non-alpha@]===] comments are being kept (preventing the code inside from running), which shouldn't happen.
This can be seen in the recent files for Loot Won Alert Hider/Mover on lines 33-42 of core.lua: In 1.14.00-1-g330a8b0-alpha both the alpha and non-alpha blocks are uncommented and in 1.14.01 both the alpha and non-alpha blocks are commented out. The alpha version should have the alpha block uncommented and the non-alpha block commented out and the release version should have the alpha block commented out and the non-alpha block uncommented.
Edit: I'd previously mixed up the effects on the alpha and non-alpha comments for release versions, but I've fixed that now.
Now that I've fixed the post, I can see that it's only the non-alpha comments that aren't working; the alpha comments are working as expected.
Your description is a bit confusing - are you using block comments in your code? Those should only ever be the result of post-processing - the tokens should be single-line comments within your code.
The alpha comments should be single-line comments (so the code between them runs in alpha versions) that are transformed into block comments (so the code between them is commented out in release versions)
The non-alpha comments should be block comments (so the code between them is commented out in alpha versions) that are transformed into single-line comments (so the code between them runs in release versions)
You can view the code for commit 330a8b0 (that was used in builds 1.14.00-1-g330a8b0-alpha and 1.14.01) here. The alpha and end-alpha comments are single-line comments and the non-alpha and end-non-alpha comments are block comments.
Edit: I've just realised my original post was incorrect, I'll fix that now.
Edit 2: I've fixed my original post and clarified what's actually happening.
I just released a new version of OrderHallCommander and all alpha code is there. This is really non good.
Released addon:
--@alpha@
addon.version="1.6.0 Alpha"
--@end-alpha@
Should have been
--[===[@alpha@
addon.version="1.6.0 Alpha"
--@end-alpha@]===]
This according to curse documentation
Alpha Replacements
These occur based on filetype, as they tend to tie into the comment system for the file.
The insides aren't removed so that line numbers stay the same, they just cause them to be commented out.
These occur from packages created not from tags, i.e. alpha packages.
This is useful to put extra debugging information that you want your alpha testers to have, but don't want to appear in release versions.
Lua
--@alpha@ and --@end-alpha@
Turns into --[===[@alpha and --@end-alpha]===].
--[===[@non-alpha@ and --@end-non-alpha@]===].
Turns into --@non-alpha@ and --@end-non-alpha@.
Example:
--@alpha@
assert(everythingIsOkay())
--@end-alpha@
In alpha versions, the --@alpha@ and --@end-alpha@ comments are being kept as expected (allowing the code inside to run), but the --[===[@non-alpha@ and --@end-non-alpha@]===] comments are being transformed into --@non-alpha@ and --@end-non-alpha@ (allowing the code inside to run), which shouldn't happen.
In release versions, the --@alpha@/--@end-alpha@ comments are being transformed into --[===[@alpha and --@end-alpha@]===] as expected (preventing the code inside from running), but the --[===[@non-alpha@ and --@end-non-alpha@]===] comments are being kept (preventing the code inside from running), which shouldn't happen.
This can be seen in the recent files for Loot Won Alert Hider/Mover on lines 33-42 of core.lua: In 1.14.00-1-g330a8b0-alpha both the alpha and non-alpha blocks are uncommented and in 1.14.01 both the alpha and non-alpha blocks are commented out. The alpha version should have the alpha block uncommented and the non-alpha block commented out and the release version should have the alpha block commented out and the non-alpha block uncommented.
Edit: I'd previously mixed up the effects on the alpha and non-alpha comments for release versions, but I've fixed that now.
Now that I've fixed the post, I can see that it's only the non-alpha comments that aren't working; the alpha comments are working as expected.
Your description is a bit confusing - are you using block comments in your code? Those should only ever be the result of post-processing - the tokens should be single-line comments within your code.
In reply to Torhal:
Thanks for the clarification! I've created a ticket for this so the devs will be able to diagnose.
Still present as of december the 4th
I just released a new version of OrderHallCommander and all alpha code is there. This is really non good.
Released addon: