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

[feat] File exclusion in structure loaders #97

Merged
merged 1 commit into from
Jun 2, 2024

Conversation

daniwasonline
Copy link
Collaborator

Description

This PR simply adds a flagger to the structure loader for file exclusion. In any file that utilises a structure loader predicate, simply export __loader_exclude with the boolean True to exclude it from the loading process.

Why is this useful?

In structures where multiple files may be used to store code for a single structure (i.e. callsystems), having a loader exclusion flag could be very important if the structure being exported potentially meets the conditions for the predicate.

i.e. Say that you have a callsystem, but you also call a second class that happens to also be a Callsystem subclass. Having the structure loader attempt to load it when it shouldn't could cause severe consequences, including glitches and a full crash.

@daniwasonline daniwasonline added the enhancement New feature or request label Jun 2, 2024
@daniwasonline daniwasonline added this to the v3.0 milestone Jun 2, 2024
@daniwasonline daniwasonline self-assigned this Jun 2, 2024
@daniwasonline daniwasonline merged commit dabf12b into main Jun 2, 2024
1 check passed
@daniwasonline daniwasonline deleted the feat/loader-flag-exclude branch June 2, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant