For these dependency graphs:
# case a
root -> (x, y@1)
x -> PEEROPTIONAL(z)
z -> PEER(y@2)
# case b
root -> (x) PEEROPTIONAL(y@1)
x -> PEEROPTIONAL(y@2)
# case c
root -> (x) PEEROPTIONAL(y@1)
x -> PEER(z)
z -> PEEROPTIONAL(y@2)
The peerOptional dependency is included in the peerSet, raising an ERESOLVE conflict at the peerSet generation stage, even though the peerOptional dependencies will not actually be added to the tree.
In --force mode, the peerSet generation error is ignored, since we produce a better warning by waiting until we conflict at the tree generation stage. Since there is no actual conflict, no warning is generated.
But in default mode, we see the error in the peerSet generation, and raise the error early, assuming that there will be no resolution possible.
We should never have a situation where we crash without --force, but do not raise a warning with --force.
We should never warn about a dependency that we are not going to actually install.