-
Notifications
You must be signed in to change notification settings - Fork 3
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
Adopt ".a3log" and ".a3sol" Extensions for Transcripts and Commands Scripts #2
Comments
In the latest dev-build (back to incrementing numbers: 2108, but still only available directly from CI) the interpreter allows creating transcript and solution files from the same run. Files are named |
this is a wonderful feature!
Thanks a lot for this! Having some unique extensions is going to help a lot. I'll update all the various projects accordingly (it's going to take some time), and the Sublime ALAN syntax too. |
Adopt to the upcoming official extensions `.a3s` and `.a3t` for ALAN3 solution files and transcripts, respectively (see alan-if/alan#2), but also preserve the old `.a3sol` and `.a3log` extensions (as secondary) for a grace period, to allow projects that are using them enough time to migrate. Also change the scope of the Alan Solution and Transcript syntaxes from `.a3sol` and `.a3log` to `.a3s` and `.a3t`, respectively, and update all package files accordingly. (closes #1)
So this could then be achieved without using redirections, but via a new dedicated command line switch? Could you give me an example of how the new command is used? (I'll have to update all the build scripts to exploit this new feature, when the next Beta is out, and maybe start using it already in the dev branches when it's available in the Alpha SDK) |
Aah, you did not know/remember/realise that the options already existed? Yes, using the command options to
The same switches are used now, but the difference is that they now don't interfere with each other. Previously which one took precedence was "random". And of course that they have dedicated extensions. The switches are documented in the alpha manual. But maybe that should also say something about how the files are created. Something like The logging options, But to be extra explicit, it is only output. You have to use command redirect to get arun to read from the command file. Unless the first command is
But you would still have to get that into the interpreter, so there's a Catch 22 there ;-) (And before you ask, yes, it would be possible to add an interpreter option to start reading from a command file without player intervention ;-), and I'm gonna add it to the backlog, as I can see some merit in having it. Not high prio though.) |
Not really, my memory is vague on this. For some reason, I've been using output redirection in all the various toolchain scripts. I don't remember why, but I think it was to avoid the timestamp in the generated transcript, since I track them in the repositories to either catch diffs or because some AsciiDoc documents need to selective include tagged regions of the transcript (dynamic code in documentation).
If I remember correctly, the
maybe some extra text clarifying what the switches do exactly, along with some practical examples, would be nice. Also, the Alpha Manual states:
Shouldn't that be
OK. I though that there was a new option to specify both the solution (input) and transcript (output) in a single command. But then, if the timestamp can be avoided (e.g. by specifying an explicit transcript filename, or via an addition switch) it doesn't change much in respect to automation of the documentation projects. It's also worth considering that now that we have formal file extensions for transcripts (
could be correctly interpreted as if it had been typed:
i.e. even if filenames are not in the correct position relatively to the switches their context is clear thanks to their extensions. I'm not sure if this has any potential benefits, but it might in the future. |
NP. You can't keep track of everything. As I use a lot of automation to there has been a
Exactly. And again, that already worked, what's new now is that you can get both with a single run. As requested in #2.
Sorry about that, yes, it was a typo but I had also forgotten to publish the last version where it was fix but was in the repo. I've done that now and also added some more elaborate descriptions.
As mentioned above the (I've long thought about improving my own regression testing tool, Jregr, with parallel execution of tests, but now that running all 1500 test in the Alan suite only takes a couple of seconds, that is no longer a need. Don't fix what's not broken or can give some other upside. Although it might still be an interesting challenge...)
I'm not sure what you are thinking here. I read the "hypothetical" but don't understand what that means, exactly. To be clear, you cannot decide the names of the output log files on the command line to |
I've been using this option too, to ensure same-randomness across every test, to avoid diffs in the transcripts. But I didn't know it would also remove the timestamp. Depending on the context, it might make unnecessary redirection to the output transcript, if the expected transcript name matches the adventure — but in the test suites, often the transcript is expected to match the solution file, because there are multiple tests for each single adventure.
OK, that's a huge relief.
They are good, they clarify better the purposes and real case uses of these options.
Hence the "hypothetical". I was just brainstorming on the possibilities these extension might add. E.g.:
could be safely understood by ARun as meaning: Execute the "mygame.a3c" adventure using the "walkthrough.a3s" solution script as input commands. I.e. the context becomes more obvious, making use of switches needless in some cases. I was just wondering whether this could dispense of the canonical switches/options pattern in some use cases, making ARun's invocation more natural like. (no Nobel-prize intuition here, just sharing some thoughts) |
Ok! Right. Thanks for sharing ideas. |
Switch to the upcoming official extensions `.a3s` and `.a3t` for ALAN3 solution files and transcripts (see alan-if/alan#2) -- fixes #1. Polish, reformat and improve repository settings files: - `.editorconfig`: - Unset `charset` for Alan files, in view of Beta8 introducing UTF-8 support, and because using of EClint with `charset = latin1` causes false positives for valid ISO files. - Add common repository settings. - `.gitattributes`: - Reformat whole file, polish it and remove unneeded rules. - `.gitignore`: - Stop ignoring `*.ifid` files. - Add `*.a3r` rule for Alan resource files. Update and improve README, mentioning upcoming UTF-8 support in Alan, and adding instructions on how to enforce EditorConfig encoding for projects.
In `tests/misc/` rename `meta-verbs.a3sol` to `meta-verbs-tests.a3sol` because the solution file contains a `script on` command that causes the creation of a `meta-verbs.a3t` file, which would interfere with out generated transcript when we'll switch to the new `.at3` and `.ats` extensions (see #128). This change is due to the fact that now ARun no longer timestamps the transcript when invoked with the `-r` switch, and because it now uses the `.a3t` extension for transcripts (see alan-if/alan#2). The new solution filename will now ensure that our test transcript is named `meta-verbs-tests.a3log`, which will not be overridden when we adopt the new `.a3t` extension for transcripts. Add `/tests/misc/meta-verbs.a3t` to Git ignore rules. Add a warning note about this in `meta-verbs.alan`.
Stop using `.a3sol` and `.a3log` extensions for solutions and transcripts and use instead the new `.a3s` and `.a3t` official extensions recently introduced in ARun (see alan-if/alan#2). This commit contains lots of changes: - Rename all `*.a3sol` and `*.a3log` files to `*.a3s` and `*.a3t` - Fix ``include::` directives in AsciiDoc sources. - Tweak all toolchain scripts to use the new extensions. - Tweak repository configurations. - Fix references to old extensions in READMEs and other MD docs. Fixes #128.
Feature Request
.a3sol
extension for generated commands scripts..a3log
extension for generated transcripts.-l
and-c
switches in the same invocation, to generate both a transcript and a commands script during the same game session (using the above extensions to distinguish them).By no means these extensions should be enforced on end users, they should be just the default extensions used by Arun and WinArun, with users being free to change them according to their will (just as it's today).
The proposal is more about providing official Alan extensions for transcripts and commands scripts which are more in line with the other native Alan 3 extensions (
.a3c
amd.a3r
), making them uniquely identifiable as Alan related files, and with all the benefits listed below (the most important being the ability to configure editors to handle them as ISO-8859-1 files, and being aware of their context).Rationale
.a3sol
extension for commands script is more intuitive than just.log
, for the.sol
extension is commonly found in IF commands scripts (more often referred to as solution files)..txt
extension proposed by WinArun is not suggestive of an IF transcript nor commands script (unlike.a3log
and.a3sol
), it's just the most common text file extension used on Windows..a3sol
and.a3log
extensions are more consistent with the other Alan file extensions (.a3c
amd.a3r
), and they can be more intuitively associated with Alan in a single glance..log
the former,.txt
the latter). Adopting these new extensions would add more consistency across the various Alan terps..log
extension for generating both transcripts and commands scripts, it can't create both in a single session via the-l -c
switches (only one of them will be honored), forcing the player to first create a commands script, and then generate a transcript using the former..txt
or.log
, which are often associated to UTF-8 encoding on most editors..a3sol
and.a3log
extensions smartly, both in terms of custom color schemes, syntax highlighting, auto-completions and snippets, as well as encoding settings (ISO-8859-1)..log
extension generated by Arun is not ideal for Git repository contents, which often add the*.log
pattern to.gitignore
, or may have other auto-generated logs with the same extension (and often different EOL normalization settings).The text was updated successfully, but these errors were encountered: