Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

[BUG] peerOptionals can cause ERESOLVE in peerSet, but aren't included in tree #223

@isaacs

Description

@isaacs

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.

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions