Problem with an I6 dropin in 6M62?

I have been in the habit of using an easy I6 line in my projects:

To say perform/@ (ph - phrase): (- if (0==0) {ph} -).

Which allows manipulation of the world within text using “perform”

say “Sally throws the shirt into the suitcase[perform now the red shirt is in Sally’s suitcase].”

I’ve noticed that this seems to break compile on 6M62 with the “I have no idea what happened” error:
Translating the Source - Failed
The application ran your source text through the Inform 7 compiler, as usual, and it found no problems translating the source. Something must have gone wrong all the same, because the second stage of the process - using the Inform 6 compiler to turn this translated source into a viable story file - turned up errors. This should not happen. The errors are written out on the Console tab, but will only make sense to experienced Inform 6 users (if even to them).
The best option now is probably to reword whatever was last changed and to try again…

Has anyone encountered this happening or know what might have changed that causes this error?
I can include the I6 line in the source text, but if the code actually uses it is when the error occurs.

That’s interesting.

The generated code is

    ParaContent(); print "Sally throws the shirt into the suitcase";! [4: perform now the red shirt is in the suitcase]
    ParaContent(); if (0==0) (((I126_suitcase == ContainerOf(I127_red_shirt))))! [5: ~.~]
    ParaContent(); print "."; new_line; .L_Say3; .L_SayX3;RulebookFails(); rtrue;

whereas in previous versions you get

    say__p=1;ParaContent(); print "Sally throws the shirt into the suitcase";ParaContent(); if (0==0) { MoveObject(I126_red_shirt,I125_suitcase); }ParaContent(); print "."; new_line; .L_Say3; .L_SayX3;
    RulebookFails(); rtrue;

So in 6M62 the compiler is generating code appropriate to “if the shirt is in the suitcase”, rather than “now the shirt is in the suitcase”.

I don’t know if this counts as a bug, since you’re bending the language’s use of phrases a bit. Still worth reporting, though.

You can sort of work around this by using explicitly-defined phrases rather than “now” assertions. This works:

	say "Sally throws the shirt into the suitcase[perform move the red shirt to the suitcase]."

(Because “move X to Y” is a phrase in the standard rules.) It’s not going to be as convenient for a lot of cases, though.

I thought “move something to something” was deprecated?

This also fails to compile (move works):

[code]“Test”

To say perform/@ (ph - phrase): (- if (0==0) {ph} -).

Test Room is a Room.

The companion cube is a thing. The companion rhombus is a thing.

After jumping:
say “You seem to have shaken something loose[perform move companion cube to test room].”

Yourself can be contrite.

The description of the player is “You are [if contrite]guilty of violence[otherwise]good to go[end if].”

Instead of attacking:
Say “Your violence gives you a sense of guilt.[perform now the player is contrite]”;[/code]

Is there perhaps a better version of the I6 phrase to use? (I know nothing of Inform 6 and have just lifted that snippet from a number of other sources.)

No, you’re thinking of the general “change something…” phrase.

Or possibly “remove (object) from play,” which is now deprecated in favor of “now (object) is nowhere.” At least, that’s what I was thinking of when I was thinking, “Yeah, isn’t Hanon right?”

It looks to me as though the only reason that “move something to something” isn’t redundant compared to “Now something is in something” is that “move” allows for “not printing a room description”–or is it that, e.g., “move the rock to the holder of the player” works even when the holder of the player is a supporter, and you can’t say “now the rock is in the holder of the player” when the holder of the player is a supporter?

That’s what I think.

But the reason is irrelevant to the discussion. The phrase is not deprecated and it works for this (weird) case. There is no equivalent phrase for “now the player is contrite”, because “change…” was deprecated and removed several versions ago. You could invent one for this case, but it sort of ruins the point of having a simple abbreviation.

Yeah, I wasn’t trying to discuss the “perform” trick, just which phrases are deprecated and why. (Because at least to me it’s useful to remind myself of that.) For what it’s worth I tested it and “now the rock is in the holder of the player” works perfectly well when the holder is a supporter.

Since there seems to be a general trend toward deprecating things that can just as easily be done with “now,” there might be an argument for deprecating the generic “move X to Y” and keeping a special phrase for “move the player, without printing a room description.” (Even “move [backdrop] to all [description]” seems like it could be turned into a “now,” if “[backdrop] is in all [description]” was checkable as a condition–in any case that’s already a special-cased phrase.) I wrote a test thing in which something which may or may not be the player gets moved without printing a room description but that doesn’t seem like it would be very useful–if the general case were deprecated it would be pretty easy for someone to write a phrase to mimic that behavior, if they really need it.

Back to the main thing, it seems as though writing a phrase to hook into this is particularly pointless, because instead of writing a phrase for “change the player to contrite” you could just write a phrase “To say perform now the player is contrite,” which would also allow you to drop [perform now the player is contrite] into something you say and have it work.

About the original issue, Emily had this to say:

So now we have an official stance, which is always nice to have. :slight_smile: Since it’s undocumented behaviour in the first place, it’s hard to see how he could document the changes…