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

Use unique contexts for installer library lookup #190

Merged
merged 1 commit into from
May 27, 2024

Conversation

sciwhiz12
Copy link
Member

This PR fixes a current issue with the generation of the legacy installer profile that causes the tools used in the processor steps to not be included in the libraries section, causing the tools to not be downloaded.

The fix is to change the context used for calling temporaryConfiguration to be unique for each given tool, rather than using a constant context.

The use of a constant context meant that each call to temporaryConfiguration resulted in the same configuration being returned. As temporaryConfiguration only adds the requested libraries on the first use of the configuration (as it checks if the configuration is first empty before adding the requested dependencies), any subsequent invocation with the same context, even with different dependencies as arguments, would just return the configuration from the first invocation unchanged.

The use of a constant context meant that each call to
`temporaryConfiguration` resulted in the same configuration being
returned.

As `temporaryConfiguration` only adds the requested libraries on the
first use of the configuration, any subsequent invocation with the same
context, even with different dependencies as arguments, would just
return the configuration from the first invocation unchanged.
@sciwhiz12 sciwhiz12 added the bug Something isn't working label May 27, 2024
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented May 27, 2024

  • Publish PR to GitHub Packages

Last commit published: 63a42392ab071c55ddbf7b72e3d67d1bbbd68be4.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #190' // https://github.com/neoforged/NeoGradle/pull/190
        url 'https://prmaven.neoforged.net/NeoGradle/pr190'
        content {
            includeModule('net.neoforged.gradle.common', 'net.neoforged.gradle.common.gradle.plugin')
            includeModule('net.neoforged.gradle', 'mixin')
            includeModule('net.neoforged.gradle', 'dsl-neoform')
            includeModule('net.neoforged.gradle', 'dsl-common')
            includeModule('net.neoforged.gradle', 'dsl-mixin')
            includeModule('net.neoforged.gradle.neoform', 'net.neoforged.gradle.neoform.gradle.plugin')
            includeModule('net.neoforged.gradle.mixin', 'net.neoforged.gradle.mixin.gradle.plugin')
            includeModule('net.neoforged.gradle', 'vanilla')
            includeModule('net.neoforged.gradle', 'dsl-userdev')
            includeModule('net.neoforged.gradle.platform', 'net.neoforged.gradle.platform.gradle.plugin')
            includeModule('net.neoforged.gradle', 'dsl-vanilla')
            includeModule('net.neoforged.gradle', 'common')
            includeModule('net.neoforged.gradle', 'utils')
            includeModule('net.neoforged.gradle', 'platform')
            includeModule('net.neoforged.gradle', 'dsl-platform')
            includeModule('net.neoforged.gradle', 'neoform')
            includeModule('net.neoforged.gradle.userdev', 'net.neoforged.gradle.userdev.gradle.plugin')
            includeModule('net.neoforged.gradle', 'userdev')
            includeModule('net.neoforged.gradle.vanilla', 'net.neoforged.gradle.vanilla.gradle.plugin')
        }
    }
}

@marchermans marchermans merged commit a5c57e3 into neoforged:NG_7.0 May 27, 2024
32 of 34 checks passed
@sciwhiz12 sciwhiz12 deleted the fix-installer-profile-tools branch May 27, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants