pub fn resolve_guppy(&self, ctx: &GlobalContext<'_>) -> Result<FeatureMap> {
        // Ignore the features-only set for now.
        // TODO: It would be interesting to test against it in the future.
        let (initials, _) = self.pf.make_feature_sets(ctx.graph())?;

        // Note that guppy is more flexible than cargo here -- with the v1 feature resolver, it can
        // evaluate dependencies one of three ways:
        // 1. include dev deps (cargo build --tests)
        // 2. avoid dev deps for both feature and package resolution (cargo install,
        //    -Zavoid-dev-deps)
        // 3. consider dev deps in feature resolution but not in final package resolution. This is
        //    what a default cargo build without building tests does, but there's no way to get that
        //    information from cargo's APIs since dev-only dependencies are filtered out during the
        //    compile phase.
        //
        // guppy can do all 3, but because of cargo's API limitations we restrict ourselves to 1
        // and 2 for now.
        let version = match (self.v2, self.include_dev) {
            (true, _) => CargoResolverVersion::V2,
            (false, true) => {
                // Case 1 above.
                CargoResolverVersion::V1
            }
            (false, false) => {
                // Case 2 above.
                CargoResolverVersion::V1Install
            }
        };

        let target_platform = self.make_target_platform()?;
        let host_platform = self.guppy_current_platform()?;

        let mut cargo_opts = CargoOptions::new();
        cargo_opts
            .set_resolver(version)
            .set_include_dev(self.include_dev)
            .set_target_platform(target_platform)
            .set_host_platform(host_platform);
        let intermediate_set = CargoSet::new_intermediate(&initials, &cargo_opts)?;
        let (target_features, host_features) = intermediate_set.target_host_sets();

        Ok(FeatureMap::from_guppy(target_features, host_features))
    }
Resolves data for this query using Guppy.
internal-tools/cargo-compare/src/common.rs