Skip to content
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

Add QA check for include ordering in .dme files #83

Merged
merged 2 commits into from
Jul 21, 2024

Conversation

blinkdog
Copy link
Collaborator

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:

#include "_maps\_basemap.dm"
#include "code\__byond_version_compat.dm"
#include "code\_compile_options.dm"
#include "code\_debugger.dm"
#include "code\world.dm"
#include "code\__DEFINES\_click.dm"
#include "code\__DEFINES\_globals.dm"
#include "code\__DEFINES\_profile.dm"

_maps and code are both folders, and _ comes before c alphabetically, so the path beginning with _maps comes first.

code\world.dm and code\__DEFINES\_click.dm, the folders code are identical, so we compare on world.dm and __DEFINES. Here world.dm is a file, so it comes before the folder __DEFINES in the ordering, despite __DEFINES coming before world.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.

@blinkdog blinkdog self-assigned this Jul 21, 2024
@github-actions github-actions bot added the GitHub Our very own Babylon. label Jul 21, 2024
@blinkdog blinkdog merged commit cbf5b49 into master Jul 21, 2024
17 of 18 checks passed
@blinkdog blinkdog deleted the windows-desktop-dme branch July 21, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GitHub Our very own Babylon.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant