-
Notifications
You must be signed in to change notification settings - Fork 33
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
Refuses to work with new Ink versions (state is always Null). #68
Comments
Thanks for this, fixed the issue for me. I just updated INK_VERSION_CURRENT to 21 and it works now. I was going mad trying to work out why the demo files worked and mine didn't no matter how simple I made the story. |
I believe support for Ink 1.1.1 is a work in progress : #69 |
I just ran into this problem myself. The odd thing is: I import stories written by Inky 0.14.1, which internally uses It is Yet, suddenly Inky generates v21 JSON and I run into this crash. This has only happened recently, and I have no idea what changed. Any ideas what's going on here? |
@mttkay Hey mate,
It doesn't matter what version of Inky you wrote the stories in, it's all about what version of But remember, |
Are you sure about that? The file you point to is just a test. And you can see here that it also supports a different compiler backend, inks-compiler: https://github.com/y-lohse/inkjs/blob/1a79adf99cbcd15f1da7e13ab2504ef7f4dcc7e6/src/tests/compile.js#L10 When searching for inklecate and inkjs, I found a discussion around inklecate going away at some point and being replaced by something called Plus, I don't have inklecate installed on my machine:
so I am not sure how Inky would be able to shell out to it? 🤔 That all said, if Inky does not package its own copy of inklecate, and if it's not installed on my system, then where is it called from and how did it suddenly update to emit different file formats? Pretty confusing ecosystem! |
Ah, I think I understand better now how these tools relate to each other. So Meaning, you can't use it directly in JavaScript and Inky is an Electron app so is written in JS. So that NPM module is just a JS wrapper that shells out to the That leaves the question: where is this inklecate binary installed, and by which process did this suddenly update without my intervention? Again, the version of Inky I use hasn't been updated in a while but the difference in file formats emitted started only happening a few weeks ago. So there must be some moving parts here that I fail to understand. Or maybe Inky doesn't actually shell out to inklecate at all, and uses the native JS compiler instead, inkjs-compiler. But then again, that one is bundled with Inky and locked in package.json, so I am not sure either how that could suddenly start writing out v21 JSON. |
This is where Inky invokes inklecate: https://github.com/inkle/inky/blob/master/app/main-process/inklecate.js I am not familiar with Electron, but it looks like it packages binaries for Mac, Windows and Linux? 🤔 |
Describe the bug
I was trying to set up a super basic Ink scene to get started and I kept getting an error spiral. A lot of stuff under story.gd would randomly be Null.
To Reproduce
Here's the Ink JSON I was using:
{"inkVersion":21,"root":[["^Hello World!","\n",["done",{"#f":5,"#n":"g-0"}],null],"done",{"#f":1}],"listDefs":{}}
Expected behavior
I didn't change anything about the Ink handler script (besides adding the correct filepath), so I was expecting it to print
`Hello World!
The End
`
Solution
Turns out (to the best of my knowledge) that inkgd noticed that root_object["inkVersion"] was 21, while INK_VERSION_CURRENT was 20, so it would throw an error and crash. Since story generation is done in a separate thread, the error never showed up and the main thread continued as usual, but without an actual story to be working off of.
I ended up commenting out the return call on line 164 of story.gd so that it would be forced to continue with story creation even if the Ink version was higher than expected. I imagine there's more elegant solutions, but I wanted to drop this here in case some future soul has a similar experience.
Environment:
The text was updated successfully, but these errors were encountered: