QuiltMC / quilt-loom

MIT License
22 stars 18 forks source link

Multi metadata processing #12

Open Kneelawk opened 2 years ago

Kneelawk commented 2 years ago

This PR

This pull-request adds support for processing of multiple metadata kinds in the same project as well as fixing interface injectors, which did not function with multiple metadata kinds present before.

Changes to API

This changes the existing quilt-loom api in one breaking way: the metadataPriorities block has been renamed to metadataConfig.

This also adds a new configuration block, dependencyMetadataConfig that allows users to configure processing of dependencies' metadata separately from that of their own project's metadata.

In both of these blocks, a new method ignore has been added, that disables processing of the given metadata type.

loom {
    metadataConfig {
        ignore("fabric.mod.json")
    }

    dependencyMetadataConfig {
        priority("quilt.mod.json", 5)
    }
}

Features Added

Things Fixed

Testing

I have tested this in my own mod projects. So far I have tested:

Things Left To Do

I would like to also add remapping of multiple metadatas' mixins when the metadatas use different mixins. [Done]

Kneelawk commented 2 years ago

From what I can tell, the main thing dependency metadata is used for is applying transitive access wideners.

Kneelawk commented 2 years ago

This will need to be squashed like the last PR.

Kneelawk commented 2 years ago

I just noticed that in projects with multiple metadata kinds, if the different metadata kinds reference different access widener files, then only the access widener from the highest-priority metadata will be remaped.

I can fix this in the morning if you need me to.

Kneelawk commented 2 years ago

Ok, I've added the ability to remap different accesswideners from quilt.mod.json and fabric.mod.json metadata files.

Kneelawk commented 2 years ago

I am not sure how to go about rebasing this onto the latest commit.

TheGlitch76 commented 2 years ago

I am not sure how to go about rebasing this onto the latest commit.

That's okay; I will handle it locally when i get a chance to review this PR.