Repository navigation
Work on fixing Any/Not holderset compile errors - #3792
Merged
Merged
Conversation
pupnewfster
marked this pull request as ready for review
December 5, 2026 22:50
XFactHD
requested changes
Dec 6, 2026
XFactHD
approved these changes
Dec 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Still needs comments/documentation and testing, and also figuring out the best way to handle patching in a version toPlaceholderLookupProvider$UniversalLookupas that just casts between types so I am unsure the best way to handle it, should we have it just create a delegate instead of cast? Alternatively if we loosen the checks in the codecs and the toString forAnyHolderSet, we could make it so that theAnyHolderSetthat is placeholder can just be serialized to anything (as it doesn't actually write any data), though then the error for accessing the "unbound" contents won't be able to reference what registry it is attempted to be for. Though I still think this might be the best solution (and then would lower the overhead of some of the patches for adding support for the unbound one.I also for now have it so that the holder getter method is non defaulted so that we can find new patch sites easier between ports. I think this makes sense, but I also decided it was cleaner to useHolderSetinstead of the more specificAnyHolderSettype for purposes of not having to use FQNs in patches and so that multiloader mods can more easily just default it if they want in their custom getter. But I am wondering if that is worth it for the extra checks/casts needed in theAnyHolderSetcodecsStill needs testing, but in theory this should work to fix the compile errors relating to Any/Not holdersets. I went ahead and made the unbounded any holderset not require knowing the type as it is just for serialization, and then that reduces the number of necessary patches vs just returning a cast version of it. There are a couple TODOs in the AnyHolderSet I added that I am unsure about the best handling of, but we might want to address before merging.