prezi / gradle

A powerful build system for the JVM
www.gradle.org
0 stars 0 forks source link

Can other components be unresolved? #7

Closed lptr closed 9 years ago

lptr commented 9 years ago

Currently there is an underlying expectation in the code that only ModuleComponentSelectors (or ModuleVersionSelectors) can fail to be resolved. I guess there is no such thing that a project component is not resolveable. However, other future component types, like a library, can actually fail to resolve, right? So for example this code should not rely on the unresolved component to be a ModuleComponentSelector:

https://github.com/prezi/gradle/blob/master/subprojects/diagnostics/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/graph/nodes/UnresolvedDependencyEdge.java#L36-36

How should these be handled?

bigdaz commented 9 years ago

This is an incomplete migration from ModuleVersionSelector -> ComponentSelector. But I think it's ok to leave it for now: perhaps just leave the TODO in your code and I'll take a closer look on merging.

Probably the right way is to have 2 separate types of 'unresolved' edges: 1 for an issue resolving a selector to a component id, and a separate one for issue resolving a component id to a component. The former would not have an 'actual' component id. (It's not really correct to generate a component id from a selector like we're doing).

But I don't think we're making this any worse, so I'd leave it for now.

lptr commented 9 years ago

Thanks. Is it okay to close this issue now?

bigdaz commented 9 years ago

Yes