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

Compiler crashes when compiling our known good set of ink files. #973

Closed
acolchagoff opened this issue Sep 29, 2022 · 7 comments · Fixed by #986
Closed

Compiler crashes when compiling our known good set of ink files. #973

acolchagoff opened this issue Sep 29, 2022 · 7 comments · Fixed by #986

Comments

@acolchagoff
Copy link

acolchagoff commented Sep 29, 2022

Describe the bug

attempting to compile my set of ink files with the inklecate.js command. it generates a blob of what appears to be javascript and then spits out an error with stack trace. we know this set of files is good because we frequently compile them in inky.

To Reproduce

the following command:
node ./node_modules/inkjs/dist/inklecate.js ./story/main.ink

Expected behavior

a .json file will be generated

Ink files

I'm not sure if we can post them here, its a large set of files. if the answer lies in there but I could privately send them over. There are more than 20 files.

Environment

debian linux

Additional context

the stack trace that follows the compiler error:

Error: Compilation failed.
at t.get (/home/andrew/magehand/node_modules/inkjs/dist/inklecate.js:16:275289)
at t.Compile (/home/andrew/magehand/node_modules/inkjs/dist/inklecate.js:16:273961)
at Object. (/home/andrew/magehand/node_modules/inkjs/dist/inklecate.js:16:276752)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47

@justinmulwee
Copy link

This might be my fault by messing up an external function fallback. We'll test some more and then comment again or close.

@smwhr
Copy link
Collaborator

smwhr commented Oct 3, 2022

@justinmulwee if you can reproduce it with a smaller set of files, this would be very helpful. The compiler is tested against a few hundred test cases, but it is always possible we missed a bug !

@acolchagoff
Copy link
Author

okay I pulled @justinmulwee 's latest (we're working on a project together) and it still produces the same error.

@acolchagoff
Copy link
Author

I'm using

node --version
v12.22.12

@justinmulwee
Copy link

We've discovered it's simply including other ink files that causes the error. Are we not supposed to use it like this?
Check out this zip.
importme.zip
test.ink is just a hello world type of file which imports importme.ink. This works fine in inky. If I compile it like this however,

node ./node_modules/inkjs/dist/inklecate.js ./test.ink

It gives the same error described above. If I comment out the INCLUDE line at the top of test.ink, it compiles without complaint. Is this a bug or are we missing something? And thanks for taking a look.

@smwhr
Copy link
Collaborator

smwhr commented Oct 11, 2022

Thanks for the zip. I'll test it and get back to you (i've been quite busy last week and am also full until saturday, but be sure i'll get to it eventually !)

@smwhr
Copy link
Collaborator

smwhr commented Oct 21, 2022

Ok, found the problem !
It'll be fixed in the upcoming release.

Be aware that following a community decision, inklecate is now inkjs-compiler.

@smwhr smwhr closed this as completed Oct 21, 2022
@smwhr smwhr mentioned this issue Oct 21, 2022
2 tasks
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

Successfully merging a pull request may close this issue.

3 participants