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

Transformation fails in project that depends on itself #13353

Closed
cesar1000 opened this issue Jun 6, 2020 · 4 comments
Closed

Transformation fails in project that depends on itself #13353

cesar1000 opened this issue Jun 6, 2020 · 4 comments

Comments

@cesar1000
Copy link

I have a project that contains an implementation dependency to itself through a binary dependency. The preferProjectModules resolution strategy is then used to replace the dependency with a project dependency to look like this:

image

Applying a transformation in this configuration in a clean build crashes, since the transformation is applied to the output artifact of the project itself which, of course, doesn't exist:

* What went wrong:
Execution failed for task ':scythe:runtime:kaptKotlin'.
> Could not resolve all files for configuration ':scythe:runtime:_classStructurekaptKotlin'.
   > Failed to transform runtime.jar to match attributes {artifactType=class-structure, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for StructureArtifactTransform: /Users/cpuerta/temp/oss/scythe/runtime/build/libs/runtime.jar.
         > /Users/cpuerta/temp/oss/scythe/runtime/build/libs/runtime.jar (No such file or directory)

In order to repro, use the repo from #13329 (shared with @ljacomet, @melix and @jjohannes), pull to the latest master, and run:

rm -rf scythe/runtime/build
./gradlew :scythe:runtime:compileKotlin -Pscythe.apply

Environment: Gradle 6.5
Build scan: https://scans.gradle.com/s/rogy6bluv22gg

@jjohannes
Copy link
Contributor

jjohannes commented Jun 8, 2020

This is kind of related #10484.

Although this issue here should be solved in a way that we do not get and error (while #10484 might be solved by giving the right error).

@cesar1000
Copy link
Author

Yeah, I would expend the self-dependency to either be dropped automatically or cause an error.

@bmuskalla bmuskalla added the in:dependency-resolution engine metadata label Apr 7, 2021
@stale
Copy link

stale bot commented Apr 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@stale stale bot added the stale label Apr 13, 2022
@stale
Copy link

stale bot commented Jun 29, 2022

This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Gradle or if you have a good use case for this feature, please feel free to to let know so we can reopen the issue. Please try to provide steps to reproduce, a quick explanation of your use case or a high-quality pull request.

@stale stale bot closed this as completed Jun 29, 2022
@wolfs wolfs closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants