Skip to content
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

RFC Bytecode version in releases/--help #472

Open
Skrylar opened this issue Sep 13, 2018 · 3 comments
Open

RFC Bytecode version in releases/--help #472

Skrylar opened this issue Sep 13, 2018 · 3 comments

Comments

@Skrylar
Copy link
Contributor

Skrylar commented Sep 13, 2018

Third-party runtimes seem to be sensitive to the version of bytecode emitted, but it is not always obvious what version of Inklecate is needed for that. In a particular downstream situation (y-lohse/inkjs#217) using 0.8.2 results in bytecode that is too new, while 0.8.1 works. In the current state it is easy for an update to break compatibility (to be expected) but the resulting confusion of "which version should I use?" is not good for prospective new users.

I have recommended that downstream mention the most recent known-good version. I also recommend that any other third party implementations do this, although they seem to want to write it off as a "maintenance issue."

Upstream (here), inklecate should probably carry a version stamp. Most software does, so including a line that looks something like:

$ mono inklecate.exe -h
the ink compiler (v0.8.2, bytecode 18)
[..]

Version scraping can be automated easily, but how to integrate the stamping is something I don't know about (since I don't use the MS IDE.)

git describe $(git rev-parse HEAD) will respond with the closest tag, so the usual tagged release works out. Non-release versions end up with names like "sometag~commitsbehind" but usually projects just go with the commit hash git rev-parse HEAD for unreleased editions.

I might be able to fiddle a script together to go through recent releases, compile a sample script and check the ink version. The result of that can at least go in to a simple markdown file (doesn't solve the -h situation, but does solve discoverability.)

Thoughts?

@joethephish
Copy link
Member

Yeah, adding the official release version + the save version to the inklecate binary sounds like a sensible thing to do.

I have a set of helper scripts that I use when I want to do a new ink release, and I already have it prompting me for the new release number for the purpose of tagging. So what I could do is add a line to the script that injects it somewhere pre-compilation.

Will try to bear this in mind next release!

@fragmental
Copy link

Is this related to this error, in the unity plugin?

Exception: Version of ink used to build story was newer than the current verison of the engine

I made the json using inky and it says the version is "19", but the version of the unity plugin I'm using seems to expect version "18".

@Skrylar
Copy link
Contributor Author

Skrylar commented Sep 20, 2018

I made the json using inky and it says the version is "19", but the version of the unity plugin I'm using seems to expect version "18".

Yup. Versions between 0.8.1 and 0.8.2 produce version 18 files. (You need 0.8.1 for ink-js currently.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants