-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix: get lenient config if only some deps fail #242
Conversation
@@ -336,22 +336,28 @@ allprojects { Project currProj -> | |||
def resolvableConfigs = findProjectConfigs(proj, confNameFilter, confAttrSpec) | |||
def resolvedConfigs = [] | |||
resolvableConfigs.each({ config -> | |||
def resConf = config.resolvedConfiguration | |||
ResolvedConfiguration resConf = config.getResolvedConfiguration() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to just use lenient configuration everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point - double checking now but in the end it results in the same so I don't see why not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests fail for Kotlin if it's only lenient config...We can look into next? Can we merge the way it is since it's a fix for a bug?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my point of view sure, but maybe leave a comment for the next person trying to simplify this? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, will try Stepsize for this! :)
@@ -455,20 +461,26 @@ allprojects { Project currProj -> | |||
def resolvableConfigs = findProjectConfigs(proj, confNameFilter, confAttrSpec) | |||
def resolvedConfigs = [] | |||
resolvableConfigs.each({ config -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be extracted into a common function that returns an array of resolved configurations?
36b9d4e
to
921c3c1
Compare
🎉 This PR is included in version 3.24.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR modifies files linked to issues tracked in Stepsize. You might want to review their status, priority, and scope. Use Lenient Configuration by default
extract to a common function
Mention [stepsize] in a comment if you'd like to report some technical debt. See examples here. |
What this does
When a configuration cannot be fully resolved we don't resolve any of its dependencies, often returning an empty graph. It's better to return a partial result than none, like Gradle would. For this, instead of only using fully Resolved Configuration, in case of an error, we can log the failed dependencies and use Lenient Configuration instead