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

Fix Forge 50 (1.20.6) #219

Merged
merged 14 commits into from
Jul 1, 2024
Merged

Fix Forge 50 (1.20.6) #219

merged 14 commits into from
Jul 1, 2024

Conversation

Jab125
Copy link
Member

@Jab125 Jab125 commented Jun 9, 2024

@Jab125 Jab125 changed the title Fix Forge 51 Fix Forge 50 (1.20.6) Jun 9, 2024
@Jab125 Jab125 marked this pull request as ready for review June 9, 2024 13:16
@JustDoom
Copy link

1.21 exists now but this would still be very nice

@@ -148,3 +148,53 @@ jobs:
with:
name: Reproducible Build ${{ matrix.os }} (${{ matrix.java }}) Results
path: build/reports/

# Special case this test to run on Java 21
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note (mostly for myself): this can be removed in 1.7 since the Fabric API test requires it

@@ -37,6 +37,14 @@ public static String intermediary(Project project) {
return intermediaryNamespace(project).toString();
}

/**
* Returns the runtime intermediary namespace of the project.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: maybe production instead? There is a dev runtime too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also applies in dev runtime I believe

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't dev runtime named though

@@ -50,10 +50,10 @@ public abstract class MixinExtensionApiImpl implements MixinExtensionAPI {
public MixinExtensionApiImpl(Project project) {
this.project = Objects.requireNonNull(project);
this.useMixinAp = project.getObjects().property(Boolean.class)
.convention(project.provider(() -> !LoomGradleExtension.get(project).isNeoForge()));
.convention(project.provider(() -> !LoomGradleExtension.get(project).isNeoForge() && (!LoomGradleExtension.get(project).isForge() || !LoomGradleExtension.get(project).getForgeProvider().usesMojangAtRuntime())));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic here is a bit ugly, it could be better for readability to use a block lambda.

@shedaniel Do you remember if there's any reason why we have this set to false for Fabric? Upstream 1.6 has it on true: https://github.com/FabricMC/fabric-loom/blob/c4d36fac4ea7ccd1ef9526aa138139a154c8f581/src/main/java/net/fabricmc/loom/extension/MixinExtensionApiImpl.java#L51-L52
(possibly for common projects that need their refmap to be transformed? But that's not needed if refmaps are removed altogether)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe old forge mods should have this as false

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's fine. I think we could change it for Fabric if it didn't break common projects not getting refmaps on old Forge (arch plugin could set it to true?)

src/main/java/net/fabricmc/loom/util/Constants.java Outdated Show resolved Hide resolved
src/test/resources/projects/neoforge/1206/build.gradle Outdated Show resolved Hide resolved
src/test/resources/projects/forge/1206/build.gradle Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting these to match our checkstyle rules (or at least have proper indentation and brace placement) would be good but not strictly necessary

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a copy paste of Forge's MDK

rlnt added a commit to AlmostReliable/almostunified that referenced this pull request Jun 23, 2024
@Juuxel Juuxel changed the base branch from dev/1.6 to dev/1.7 July 1, 2024 16:08
@Juuxel Juuxel merged commit 4574f4a into architectury:dev/1.7 Jul 1, 2024
105 checks passed
Juuxel added a commit that referenced this pull request Jul 1, 2024
Co-authored-by: shedaniel <[email protected]>
Co-authored-by: Juuz <[email protected]>
Juuxel added a commit that referenced this pull request Jul 1, 2024
Co-authored-by: shedaniel <[email protected]>
Co-authored-by: Juuz <[email protected]>
rlnt added a commit to AlmostReliable/almostunified that referenced this pull request Aug 22, 2024
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