Kind not seen in an extension

I have a extension file A that includes extension file B where a kind and its parent element is defined. I have also tried the kind and parent element defined in C extension was included in extension B. But when it gets to the code in extension A, it acts like it never processed the include and errors on statement in ext A saying 1 is 2 and 2 is not a kind and then when it reaches the kind definition in ext B or C it gives me an error that it trying to redefine. A and B are one authors, C is another authors. Is there a way to enforce compilation build order so it sees C first. It would be so awesome in Inform or VSCode with the Inform extension that when you mouse over a symbol, it provides the definition that it currently knows and from where. Does Inform provide any type of troubleshooting in the regard. Of course if I put my code all in extension A then everything works like a champ.

1 Like

I actually just included extension C first in the main story.nl file so that it loaded first and the issue went away. But I thought you could have extensions include other extensions and the complier would compile all the included extensions in an extension first before compiling the extension itself. insert “shrug” emoji

1 Like

I have no clue what’s going on here, but for other people, it might be useful to know which version of Inform 7 you’re using. There was a big update last year that changed a lot of stuff about it. You can find the version either in the header of a game you make or by going to Help and About in the menu (at least in my IDE).

The compiler concatenates all of the code into a single virtual file before compiling. Now why the ordering doesn’t work like you said, I don’t know, but I’ve witnessed this phenomenon myself a number of times and had to use trial and error to determine where to put some definitions.

1 Like