Hey all :wave: I'm looking for a bit of context a...
# community-support
p
Hey all 👋 I'm looking for a bit of context around that different resolvable states dependencies can have in reports. There was an enum was introduced a while back (https://github.com/gradle/gradle/pull/850) that disambiguated between a binary resolution state to something more fine grained (
FAILED
,
RESOLVED
and
UNRESOLVED
). Can anyone help me understand the difference between
FAILED
and
UNRESOLVED
? Thanks!
✅ 1
v
Looking at the changes you posted, it means it is in a not-resolvable configuration and thus was not resolved. It is the
(n)
annotation in the
dependencies
task output.
With "it" I refer to "UNRESOLVED"
p
Thanks for your reply. What is it that distinguishes UNRESOLVED from FAILED?
v
Didn't I just explain it?
unresolved means it did not even try to resolve as it is in a non-resolvable configuration. failed means it was tried to be resolved but was not able to do so successfully
p
Aha! That most recent sentence is much clearer for me, thank you. I guess what I'm trying to clarify now in my mind is the semantics of not-resolvable. Under what circumstances would a dependency be not-resolvable? Is this something someone would explicitly specify themselves on a configuration?
v
Not the dependency is not-resolvable, the configuration is not-resolvable
You have various roles a configuration can have. consumable, i.e. it is not resolvable but for consumption by downstream consumers (e.g.
apiElements
) dependency bucket, i.e. neither consumable nor resolvable but where you declare dependencies on (e.g.
implementation
) resolvable, i.e. for resolving a tree of dependencies (e.g.
compileClasspath
) If you e.g. get the contents of
implementation
they will be
UNRESOLVED
as the configuration is not resolvable. If you e.g. get the contents of
compileClasspath
they will be
RESOLVED
or
FAILED
p
Aha, I see! So,
UNRESOLVED
means no attempt was made to resolve the configuration. The system knows it's not meant for resolution. This is indicated by the (n) annotation in task output, marking configurations as non-resolvable. Whereas
FAILED
could e.g. mean there was a network failure. Is that broadly correct?
v
Network failure, version does not exist, nothing at those coordinates, bitflip on the line, proxy that does not let you through, any failure to resolve
p
Got it. Appreciate your time explaining this.
👌 1