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

If dependency project has no variants, mention that there are none #28970

Open
mathjeff opened this issue Apr 25, 2024 · 2 comments · May be fixed by #28971
Open

If dependency project has no variants, mention that there are none #28970

mathjeff opened this issue Apr 25, 2024 · 2 comments · May be fixed by #28971
Labels

Comments

@mathjeff
Copy link
Contributor

Current Behavior

Currently I'm finding that if I declare a dependency (with attributes) on a project that declares no variants, then the error message from Gradle says:

> Could not resolve all task dependencies for configuration ':subproject2:conf'.
   > Could not resolve project :subproject1.
     Required by:
         project :subproject2
      > No matching variant of project :subproject1 was found. The consumer was configured to find attribute 'attrA' with value 'value1' but:
          - None of the variants have attributes.

rather than saying something more like:

No variants were found.

Expected Behavior

It would be nice if Gradle would mention that no variants were found rather than saying that every variant had no attributes

Context (optional)

No response

Steps to Reproduce

See https://github.com/mathjeff/gradle-samples-2/tree/main/resolve-attributes-with-no-variants

Gradle version

8.7

Build scan URL (optional)

No response

Your Environment (optional)

No response

mathjeff added a commit to mathjeff/gradle that referenced this issue Apr 25, 2024
…n that

instead of saying that every variant has no attributes

Fixes: gradle#28970

Signed-off-by: Jeff Gaston <gastoj3@gmail.com>
@mathjeff
Copy link
Contributor Author

Also somewhat related to #12126

@ov7a
Copy link
Member

ov7a commented Apr 29, 2024

Thank you for providing a PR with a fix! The responsible team will review it.

@ov7a ov7a added in:dependency-resolution engine metadata and removed to-triage labels Apr 29, 2024
github-merge-queue bot pushed a commit that referenced this issue May 8, 2024
…n that

instead of saying that every variant has no attributes

Fixes: #28970

Signed-off-by: Jeff Gaston <gastoj3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants