This warning just needs to be traced in one place for all commands,
there's no need for the resolver to know about it. Moving the warning
out of the Resolver will make it easier to change how we provide the
option.
make_link_collector() was in self_outdated_check, a module responsible
for checking whether the currently-running pip is outdated, but is
imported by things that has nothing to do with this outdated check. Move
the function to be a class method in LinkCollector so the module
hierarchy makes more sense.
The RequirementSet implementation conflates requirements incorrectly in
a lot of places. This means the (new) resolver would get incomplete
requirements.
The removes all RequirementSet.add_requirement() calls outside of the
legacy resolver, so the new resolver can get the unmodified list of
requirements specified by the user, allowing for more sophisticated
requirement merging.
This introduces a new general option --unstable-feature that can be used
to opt into "preview" features in pip not enabled by default. Currently
the only available feature is "resolver".
A stub resolver interface (which would fail on invocation) is provided
to respond to the flag.
The --unstable-feature option is hidden from --help since the resolver
does not yet work. This suppression should be removed when we release
the resolver for general/public testing.
This gives us a concrete place to put the new resolver code and
resolver-specific modules (`resolution.resolver`).
The reason for another level of hierarchy compared to other modules
is to allow us to move other modules here as they
become implementation details of the legacy resolver. Examples I
have in mind are: `req.req_set`, `req.req_install`,
`req.constructors`, and `operations.prepare`.
Now we can refactor this to be globally managed, and it will have the
same behavior as it does currently (if there is any
PreviousBuildDirError it will not be cleaned up).
This mirrors the current logic within the individual requirement-related
commands (install, wheel) for setting options.no_clean, which is used to
determine whether we need to delete directories.
Next, we'll add the actual directories to track and remove them from
being managed by other objects.