Compiler Version in .a3c Storyfiles #49
-
@thoni56, a few question about the ALAN compiler version stored in Compiler Version StateIn static char *decodeState(int c) {
static char state[2] = "\0\0";
switch (c) {
case 0: return ".";
case 'd': return "dev";
case 'a': return "alpha";
case 'b': return "beta";
default:
state[0] = header->version[3];
return state;
}
} What would the When is So, it seems impossible to tell if an adventure was compiled with a developer snapshot by looking at In terms of compatibility, a dev snapshot could contain (as it's often the case) new features which are not present in the latest Beta release, so running an adventure compiled with a dev snapshot on Beta interpreter could actually lead to errors, even if they belong to the same version. Or is it the case that the above scheme is intended for official releases only, meaning that anything relating to dev builds is unchecked since only developers should be fiddling with such tests, and they are expected to know what they are doing (i.e. use same-version SDK tools) and they are doing it at their own risk? The ALAN SchemeI'm also not entirely sure how the ALAN scheme works in general, since I've only seen it being used within Beta stage. From what I understood from the above code, once ALAN reaches the stable stage with v3.0.0, the state byte will become But after ALAN becomes stable, will there still be Beta and Alpha releases, e.g. I've seen the comment on compatibility rules found in void checkVersion(ACodeHeader *header)
{
/* Strategy for version matching is:
1) Development interpreters/games require exact match
2) Alpha, Beta and Release interpreters will not run development games
3) Alpha interpreters must warn if they run beta or release games
4) Beta interpreters may introduce changes which are not alpha compatible,
if the change is a strict addition (i.e. if not used will not affect
alpha interpreters, example is introduction of a new opcode if it is
done at the end of the list)
5) Release interpreters should run alpha and beta games without problems
NOTE that we are working with a non-reversed version string/word here.
*/ but even in this context, I'm not entirely sure what "Development interpreters/games" refers to, since dev snapshots are not leaving any print in the adventure header. Hopefully these questions of mine might also help you see the code comments through the eyes of someone who's looking at it for the first time, in terms of small additions or tweaks to the source comments that could make the code more accessible to newbies. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
...
Yes, just a reasonable fallback. Many modern C-compilers warns for switches that don't have cases for all possible values, so that is another reason.
"dev" was actually an even earlier state than alpha, so before all the alphas, there were "dev" versions. I'm quite confident that this is what is refered to in the code. So "dev" is not the snapshots. dev -> alpha -> beta -> release E.g 3.0dev34 -> 3.0alpha14 -> 3.0beta9 -> 3.0
Yes, that is a good summary, snapshots are not marked except in the packaging, and a developer should know ;-) This state is not completely to my liking since snapshots do tend to be used by some people, like you ;-) But for those few it is probably easy to pick another snapshot and try again, or ask about the problem. Maybe an important point is that you should never release a game that has been compiled with a snapshot.
To sum up how I think I have been thinking about this:
In a way you could see Alan using semantic versioning, but only for non-dev/alpha/beta releases. For dev/alpha/beta the state replaces the second dot, but an increment in the last number for a beta version, indicates that since it is not an official "official" release, that "patch" might be more than that, and the next "real" release will stabilize that minor (at least) version. 3.0beta1 means first "patch" after "alpha" on the way towards 3.0, and 3.1beta12, well, you get it. Not totally clean or clear, and I've been thinking about changing it of and on, but all automation does it this way, and I think most people intuitively feel what 3.0beta9 means (almost 3.0, but not quite yet...).
+1 |
Beta Was this translation helpful? Give feedback.
...
Yes, just a reasonable fallback. Many modern C-compilers warns for switches that don't have cases for all possible values, so that is another reason.
"dev" was actually an even…