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

Inject services into MinimalExternalModuleDependency instances #23232

Merged
merged 3 commits into from Dec 20, 2022

Conversation

jvandort
Copy link
Member

@jvandort jvandort commented Dec 19, 2022

Fixes #23096

All dependencies which extend AbstractModuleDependency should have their attributesFactory and capabilityNotationParser initialized. This is usually done in the DefaultDependencyFactory, though now that MinimalExternalModuleDependency extends ExternalModuleDependency and its implements extend AbstractModuleDependency, we must be sure that we initialize its services when we instantiate them. This PR does that.

Further, we ensure we properly copy all fields in instances of MinimalExternalModuleDependency when copying them. This ensures we do not leave behind dependency artifacts or other data when adding dependencies to configurations via the project DependencyHandler.

@jvandort jvandort added this to the 7.6.1 milestone Dec 19, 2022
@jvandort jvandort self-assigned this Dec 19, 2022
@gradle gradle deleted a comment from jvandort Dec 19, 2022
@jvandort jvandort force-pushed the jvandort/iss/23096/release7x/fix branch from 75d1e47 to b877054 Compare December 20, 2022 05:56
@gradle gradle deleted a comment from jvandort Dec 20, 2022
@jvandort jvandort force-pushed the jvandort/iss/23096/release7x/fix branch from b877054 to 4fed83e Compare December 20, 2022 06:10
@jvandort jvandort added the a:bug label Dec 20, 2022
@gradle gradle deleted a comment from jvandort Dec 20, 2022
@jvandort
Copy link
Member Author

@bot-gradle test this

@gradle gradle deleted a comment from jvandort Dec 20, 2022
@bot-gradle
Copy link
Collaborator

OK, I've already triggered the following builds for you:

@jvandort jvandort changed the title Fix #23096 on release7x Inject services into MinimalExternalModuleDependency instances Dec 20, 2022
@jvandort jvandort marked this pull request as ready for review December 20, 2022 06:32
@big-guy
Copy link
Member

big-guy commented Dec 20, 2022

@bot-gradle test and merge

@gradle gradle deleted a comment from jvandort Dec 20, 2022
@bot-gradle
Copy link
Collaborator

Your PR is queued. See the queue page for details.

@bot-gradle
Copy link
Collaborator

OK, I've already triggered a build for you.

@bot-gradle bot-gradle merged commit 399facb into release7x Dec 20, 2022
@blindpirate blindpirate deleted the jvandort/iss/23096/release7x/fix branch December 21, 2022 00:25
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