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

Does not compile with CoffeeScript 2.7.0 #12

Open
lss4 opened this issue Oct 19, 2023 · 0 comments
Open

Does not compile with CoffeeScript 2.7.0 #12

lss4 opened this issue Oct 19, 2023 · 0 comments

Comments

@lss4
Copy link

lss4 commented Oct 19, 2023

I tried compiling the engine with the CoffeeScript version I've installed on my system (2.7.0) and it's failing with this error in several places (combat.coffee, adventure.coffee).

See jashkenas/coffeescript#4752 for more info about this error. I think it was valid with CoffeeScript 1.x but now forbidden in newer ones due to it producing invalid JS in some cases.

Looks like the related code needs a refactor, but I'm very new to JS and CoffeeScript in general so I'm not sure which way will it produce JS that actually works...

EDIT: Newer CoffeeScript has deprecated the use of --join and a warning will be given for its usage. Changing the build command to use the suggested command pattern (cat a.coffee b.coffee c.coffee | coffee --compile --stdio > bundle.js) works fine here.

EDIT 2: Added some initial changes. These changes at least allowed the code to compile and work as expected. I'm currently playing through the demo game with the newly compiled JS and while there are some rough edges in the compiled code (like slightly altered variable names in some places), no gameplay misbehaviors or crashes have been observed so far.

EDIT 3: So far looking good. Was able to complete a playthrough of the demo game without any issue.

lss4 added a commit to lss4/eburp that referenced this issue Oct 23, 2023
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

1 participant