-
Notifications
You must be signed in to change notification settings - Fork 17
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
Trouble with grammar version 2 declaration with Inform 6.43 #119
Comments
The core of the problem seems to be that Inform 6.43 doesn't like |
Thanks for looking into this. If you're on Linux you can use runtest.bash in the tests folder to see if something is broken before creating the pull request |
I tracked down the appearance of the problem to DavidKinder/Inform6@2f1bd4a. Then I moved around where PunyInform/tests/test-parser.inf Lines 83 to 89 in ef880bd
If I put I'm not clear why that change in the compiler was deemed necessary and I'll explore that question later. I'm left with four questions for you:
|
Thanks for the heads-up. Looks like the compiler has a problem though, not the library? Maybe you need to make a check at that point in the code in verbs.c and only set grammar version if it hasn't been set already?
2 & 4. PunyInform sets grammar version at one point only, and it's in the very first file to be included, long before creating any actions. Surely, it can't get any more correct or less risky than that?
|
Ah, I see now. SceneryReply does refer to actions, of course! In some cases when using the Inform 6 compiler, it's safe to refer to things that haven't been defined yet, and they will be backpatched without problems. It's hard to know as a user when it's safe and when it's not. I think it's fine if that SceneryReply routine has to move to after the inclusion of globals.h, which would put it after the code that sets the grammar version. It can even be moved to after the inclusiong of puny.h, as long as it's before the inclusion of ext_cheap_scenery.h Sometimes in PunyInform projects, you need to create a constant referring to a routine before including puny,h, and then define the routine itself after including puny,h, because the routine can't be compiled until puny.h has been compiled, but it has to be present before puny.h is included. This isn't one of those cases though. |
I made the suggested changes. If this works for you, I think you should mention this new restriction in the PunyInform documentation. |
To restate my withdrawal of #120: I have withdrawn my pull request because it is premature and probably the wrong thing to do. It appears that a more viable fix is to change the Inform6 compiler. We will wait until the discussion at https://intfiction.org/t/placement-of-constant-grammar-version-2/68141 is complete before addressing what might need to be done with PunyInform. |
Now that I've released
inform6unix
for Inform 6.42, I started a new development branch pulling in the latest Inform 6.43 code. It looks like PunyInform is doing some stuff that's no longer legal.This is a brief taste. I'll work on fixing this and do a pull request.
The text was updated successfully, but these errors were encountered: