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

1.19.4 feature backports #347

Merged
merged 20 commits into from
Oct 1, 2023

Conversation

cocona20xx
Copy link
Contributor

@cocona20xx cocona20xx commented Sep 28, 2023

Backports the following changes required for or related to QFAPI sync:

Also ran the licenser, which created... quite the few file changes that were just updating copyright year numbers. Tell me if I should revert that or not, please.

If there's more that needs to be done please let me know, this is a draft PR for a reason—I'm not sure if I caught everything that's absolutely necessary!

cocona20xx and others added 18 commits September 27, 2023 23:30
- Currently, only one flag, `OPTIONAL`, exists.
- Modified DynamicRegistrySyncMixin in order to implement these flags. Due to the Redirect mixin header used to implement the flag filtering being taken directly from FAPI, the header of DynamicRegistrySyncMixin was changed to mention FabricMC copyright, in accordance with QSL contribution rules in CONTRIBUTING.md
- Modify DynamicRegistryFlagManager to use Identifiers over RegistryKeys internally, in order to avoid generic-related jank.
- Fix mixin ported from FAPI by correcting method target string to use Quilt Mappings.
- Implement very basic tests.
- Added protected helper method DynamicMetaRegistryImpl#isFrozen for use in DynamicRegistryFlagManager
- Added DynamicMetaRegistryImpl#LOGGER with the name "quilt_dynamic_registries" as a logger for catching exceptions related to the setting of flags
- Removed the ability to disable dynamic registry flags, changed the signature of the related flag-enabling methods from enableFlag -> setFlag (on both DynamicRegistryFlag and DynamicRegistryFlagManager)
- DynamicRegistryFlagManager#setFlag now throws an IllegalStateException if a mod attempts to enable a flag when dynamic registries are frozen. This is caught and printed to the logger mentioned prior in DynamicRegistryFlag calls
- Added varargs for setting DynamicRegistryFlag values on dynamic registry creation
- Improved DynamicRegistryFlag#OPTIONAL javadocs slightly
One of them needs a more specific wording change, so it's going to be done in another commit since that's easier for us

Co-authored-by: Ennui Langeweile <[email protected]>
accidentally dropped a word

guh
Hopefully the final style change moment

Co-authored-by: Ennui Langeweile <[email protected]>
- Added back methods to DynamicMetaRegistry with the same signature as the old ones to avoid binary incompatibility. These are marked as deprecated and should be removed in a breaking/major QSL release.
* Implement tweak to Tags API to append `tags/` to the start of Dynamic Registries for tag creation that do not already have said path appended to the start of them already.
This behavior also exits in FAPI as of the most recent release, and so adding it to QSL unifies the behavior of pure QSL and the upcoming QFAPI release in that regard.
This can easily be moved to the Registry API to reduce intra-module requirements, but was put in the Tags API as that's the part of the game that is being modified here.

* Move TagManagerLoaderMixin from Tags API to Registry API so that Tags API does not need to depend on Registry API for one very small mixin

* Modify mixin injector name to be more descriptive and have `quilt$` prefix for debugging

* Revert changes to quilt_tags.mixins.json

* Added tests for tag namespace changes

* go go gadget license generation

---------

Co-authored-by: Ennui Langeweile <[email protected]>
No, you cannot use the `minecraft` namespace and blow up the world
@OroArmor
Copy link
Member

OroArmor commented Sep 28, 2023

Are you on windows? That messes up the licenser. If you revert the commit i can push a commit with the correct headers.

@cocona20xx
Copy link
Contributor Author

cocona20xx commented Sep 28, 2023

Are you on windows? That messes up the licenser

nope, I'm on macOS, and it's worked fine in the past. If the headers are malformated in this case too, it might be a more general issue with the copyright year incrementing function?
Also, looking at the headers they all look fine, as mentioned prior it's almost all just updating the copyright year range to contain 2023

@OroArmor
Copy link
Member

Hm interesting. Not sure at all, but yeah i would revert that last commit for now

@EnnuiL
Copy link
Contributor

EnnuiL commented Sep 28, 2023

Are you on windows? That messes up the licenser

nope, I'm on macOS, and it's worked fine in the past. If the headers are malformated in this case too, it might be a more general issue with the copyright year incrementing function? Also, looking at the headers they all look fine, as mentioned prior it's almost all just updating the copyright year range to contain 2023

The fix would be to backport the license header change, since yeah, the range is a lost cause

@cocona20xx
Copy link
Contributor Author

Are you on windows? That messes up the licenser

nope, I'm on macOS, and it's worked fine in the past. If the headers are malformated in this case too, it might be a more general issue with the copyright year incrementing function? Also, looking at the headers they all look fine, as mentioned prior it's almost all just updating the copyright year range to contain 2023

The fix would be to backport the license header change, since yeah, the range is a lost cause

Ah, uh, how would that be done? Discussion is going on when it comes to licenser bs in the discord as well fyi, that's probably a better place to handle this technicality specifically.

@cocona20xx
Copy link
Contributor Author

Other than the licenser issues, this should be good to go ahead. Going to make it into a normal PR.

@cocona20xx cocona20xx marked this pull request as ready for review September 29, 2023 20:27
@EnnuiL EnnuiL merged commit e3ce69e into QuiltMC:1.19.4 Oct 1, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants