Add QA check for include ordering in .dme files #83
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About The Pull Request
I talked with @Madtankdriver on Discord yesterday, and he pointed out that Starfly doesn't build properly from a ZIP download from GitHub.
I was able to reproduce the error, and it seems the Windows desktop application DreamMaker will re-arrange the #include order of the files to a fairly specific ordering; to wit: files before folders, then alphabetically, recursively down the tree.
So, for example, the first eight entries in Starfly's dme file are:
_maps
andcode
are both folders, and_
comes beforec
alphabetically, so the path beginning with_maps
comes first.code\world.dm
andcode\__DEFINES\_click.dm
, the folderscode
are identical, so we compare onworld.dm
and__DEFINES
. Hereworld.dm
is a file, so it comes before the folder__DEFINES
in the ordering, despite__DEFINES
coming beforeworld.dm
alphabetically.We can manually edit the .dme file, and our CI pipeline will build the file with the manually edited ordering just fine.
However, users who download our code and click Compile in DreamMaker will get a bunch of errors when DreamMaker re-arranges the files into DreamMaker canonical ordering.
This PR adds a GitHub Action to perform a QA check to ensure the ordering in the .dme file is the canonical DreamMaker file ordering. If it fails, it tells the PR author that this change will likely prevent the code from building when people use it with DreamMaker.
Why It's Good For The Game
Being able to Compile and run the code with standard DreamMaker tools is important.
People can try things out on private servers they run locally.
The entry level to start coding / mapping / making sprites on BYOND games is DreamMaker.
Our code should be able to Compile and run when people download a ZIP from GitHub.