I’ve posted about rule order before, but I think this is a little different. Unless there’s something missing, I7 is ordering these rules in an unambiguously wrong way:
[code]
Alley is a room. Street is south of Alley.
Report going (this is the report traveling impediments rule):
say “You trudge forward with difficulty…”;
The report traveling impediments rule is listed before the report being followed rule in the report going rulebook.
Report going to a room (this is the report being followed rule):
say “Out of the corner of your eye, you catch a flicker of movement.”;
The report being followed rule is listed before the describe room gone into rule in the report going rulebook.[/code]
From these declarations, it seems to me the only correct ordering is:
Report traveling impediments
Report being followed
Describe room gone into
But when this compiles, the actual order is:
Report being followed
Report traveling impediments
Describe room gone into
If I remove the “to a room” from the preamble of the Report being followed rule, the order is different, but still wrong:
report being followed
describe room gone into
report traveling impediments rule
I think I just figured out why. Rule ordering directives are processed in source order - no attempt is made to ensure that they all hold at the end of the ordering process. If I reverse the declarations, it works correctly. Is this a bug? If it’s not, it should be more clearly documented:
…this says what happens in the case of a direct conflict, but it’s ambiguous about what happens when a non-conflicting order is possible. I’m sure attempting to honor the ordering in a case like this would slow the compiler down, but I’d appreciate it. Rule order is very important!