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

Cannot mutate content repository descriptor when using jarJar.component #914

Closed
SquidDev opened this issue Mar 28, 2023 · 3 comments · Fixed by #915
Closed

Cannot mutate content repository descriptor when using jarJar.component #914

SquidDev opened this issue Mar 28, 2023 · 3 comments · Fixed by #915
Assignees
Labels
bug Relates to or reports a bug in the codebase

Comments

@SquidDev
Copy link
Contributor

Steps to reproduce:

  1. Download the latest MDK

  2. Add a jarJar dependency and a call to jarJar.component(it) inside the publication. Alternatively, apply the following patch:

    index 010471f..f7900b8 100644
    --- a/build.gradle
    +++ b/build.gradle
    @@ -123,6 +123,7 @@ repositories {
         // flatDir {
         //     dir 'libs'
         // }
    +    mavenCentral()
     }
     
     dependencies {
    @@ -131,6 +132,8 @@ dependencies {
         // The userdev artifact is a special name and will get all sorts of transformations applied to it.
         minecraft 'net.minecraftforge:forge:1.19.4-45.0.29'
     
    +    jarJar(group: 'com.google.code.gson', name: 'gson', version: '[2.0,3.0)')
    +
         // Real mod deobf dependency examples - these get remapped to your current mappings
         // implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency
     
    @@ -167,6 +170,7 @@ publishing {
         publications {
             mavenJava(MavenPublication) {
                 artifact jar
    +            jarJar.component(it)
             }
         }
         repositories {
  3. Start a build. You will receive a Cannot mutate content repository descriptor 'BUNDELED_-1772914211(file:/home/squid/.gradle/caches/forge_gradle/bundled_deobf_repo)' after repository has been used error

Further notes:

I realise this is a similar report to #912. However, this pattern of using jarJar.component is documented and (AFAIK) expected to work, so does feel like a bug

@sciwhiz12 sciwhiz12 added the bug Relates to or reports a bug in the codebase label Mar 29, 2023
@marchermans
Copy link
Contributor

@Matyrobbrt Will you take care of this?

@Matyrobbrt Matyrobbrt self-assigned this Mar 29, 2023
@Matyrobbrt
Copy link
Contributor

I'll take a look in a couple of hours.

@SquidDev
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Relates to or reports a bug in the codebase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants