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

Failing test for #9882 #9883

Merged
merged 4 commits into from Jul 8, 2019
Merged

Conversation

dansanduleac
Copy link
Contributor

@dansanduleac dansanduleac commented Jul 4, 2019

This is a failing test that exhibits #9882

Context

Contributor Checklist

  • Review Contribution Guidelines
  • Make sure that all commits are signed off to indicate that you agree to the terms of Developer Certificate of Origin.
  • Check "Allow edit from maintainers" option in pull request so that additional changes can be pushed by Gradle team
  • Provide integration tests (under <subproject>/src/integTest) to verify changes from a user perspective
  • Provide unit tests (under <subproject>/src/test) to verify logic
  • Update User Guide, DSL Reference, and Javadoc for public-facing changes
  • Ensure that tests pass locally: ./gradlew <changed-subproject>:check

Gradle Core Team Checklist

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation
  • Recognize contributor in release notes

Signed-off-by: Dan Sanduleac <sanduleac.dan@gmail.com>
Signed-off-by: Dan Sanduleac <sanduleac.dan@gmail.com>
Signed-off-by: Dan Sanduleac <sanduleac.dan@gmail.com>
@ljacomet
Copy link
Member

ljacomet commented Jul 5, 2019

@dansanduleac Thanks for the report and test case!
I have pushed a commit that fixes the problem. Would be awesome if you could confirm that fixes the issue in your project?

@melix Because we special case constraints from virtual platforms in EdgeState#calculateTargetConfigurations, we can't defer selection for those, so I added a check for that when reporting on pending dependencies activation.

@dansanduleac
Copy link
Contributor Author

amazing! checking now

When a dependency activates a pending constraint, do not defer
selection if the pending constraint comes from a virtual platform.
Because of their special aspects, virtual platforms really need to be
handled in line each time.

Fixes gradle#9882
@ljacomet
Copy link
Member

ljacomet commented Jul 5, 2019

@dansanduleac Sorry, I just forced push this branch, reflex based on handling my own branches.

@dansanduleac
Copy link
Contributor Author

So, good news is that this indeed fixes the issue I reported.

Bad news is that I've discovered, thanks to Gradle Consistent Versions' locks, that some other commit since 5.4.1 is causing other dependencies to disappear.

Before:
image
After:
image

Constraints on this io.undertow:undertow-servlet come from

  • 2.0.22.Final
    • a published BOM
    • a library dependency
  • 2.0.15.Final
    • another library dependency

This is broken in v5.5.0-RC1-19-g64434c7, but will need to do some more bisecting to figure out where exactly it broke.

@ljacomet
Copy link
Member

ljacomet commented Jul 5, 2019

So there is something else broken that this PR does not fix? Or this PR breaks something else?
Asking to be sure 😉

@melix
Copy link
Contributor

melix commented Jul 5, 2019

One possibility is that the missing dependencies come from exclusions that were missed before.

@dansanduleac
Copy link
Contributor Author

There is something else broken that this PR does not fix. Happy to put that into another issue once I bisect it, but I thought it might be related, as it looks similar in that there is a resolved dep which is missing some transitives.

@ljacomet
Copy link
Member

ljacomet commented Jul 5, 2019

Consider filing a different issue, but first try to see if this is not indeed caused by the fixes made to exclude processing for Gradle 5.5

@dansanduleac
Copy link
Contributor Author

dansanduleac commented Jul 5, 2019

@melix you are actually right, just checked and there were some exclusions in the library! good spot

    implementation 'io.undertow:undertow-servlet', {
        // Use javax.servlet:javax.servlet-api instead
        exclude group: 'org.jboss.spec.javax.servlet', module: 'jboss-servlet-api_4.0_spec'
        exclude group: 'org.jboss.spec.javax.annotation', module: 'jboss-annotations-api_1.2_spec'
    }

However, the exclusion only shows up in the library dependency that required the higher 2.0.22.Final.
When is the exclusion meant to be picked up? I thought that if at least one incoming edge into a given node doesn't exclude X, then X would still show up as a transitive of that node.

@melix
Copy link
Contributor

melix commented Jul 5, 2019

When is the exclusion meant to be picked up? I thought that if at least one incoming edge into a given node doesn't exclude X, then X would still show up as a transitive of that node.

No, in Gradle, all paths leading to a dependency must be excluded in order for a dependency to be excluded. (Shameless plug, we explain this in the webinar).

@dansanduleac
Copy link
Contributor Author

@melix Yep, that was my understanding too.
And I think I just confused myself, as one of the "dependencies" was actually just another constraint, so the behaviour as you described is in fact correct.
Please can you hotfix 5.5 with this? :)

@ljacomet ljacomet merged commit 79c7140 into gradle:master Jul 8, 2019
@dansanduleac dansanduleac deleted the ds/failing-test branch July 8, 2019 10:37
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 this pull request may close these issues.

None yet

3 participants