Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor -> move simple resolver to separate mod #1452

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maciektr
Copy link
Contributor

@maciektr maciektr commented Jul 17, 2024

Stack:

⚠️ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

@maciektr maciektr requested a review from mkaput November 25, 2024 14:42
@maciektr maciektr marked this pull request as ready for review November 25, 2024 14:42
@maciektr maciektr requested a review from a team as a code owner November 25, 2024 14:42
Comment on lines +37 to +40
let algo_primitive = env::var("SCARB_UNSTABLE_PRIMITIVE_RESOLVER")
.ok()
.map(|var| var.as_str() == "true")
.unwrap_or(true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather model config as "enable" rather than "disable"

Suggested change
let algo_primitive = env::var("SCARB_UNSTABLE_PRIMITIVE_RESOLVER")
.ok()
.map(|var| var.as_str() == "true")
.unwrap_or(true);
let algo_primitive = env::var("SCARB_PUBGRUB")
.ok()
.map(|var| {
let s = var.as_str();
s == "true" || s == "1"
})
.unwrap_or(false);

registry: &dyn Registry,
package_id: &PackageId,
dependency: &ManifestDependency,
) -> anyhow::Result<ManifestDependency> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: import the result directly

summaries: &[Summary],
registry: &dyn Registry,
lockfile: Lockfile,
) -> anyhow::Result<Resolve> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: import the result directly

Perhaps in the future this conflict could be resolved, but currently,
please upgrade your dependencies to use latest versions of their dependencies.
"});
let algo_primitive = env::var("SCARB_UNSTABLE_PRIMITIVE_RESOLVER")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
let algo_primitive = env::var("SCARB_UNSTABLE_PRIMITIVE_RESOLVER")
let algo_primitive = env::var("SCARB_UNSTABLE_PRIMITIVE_DEPENDENCY_RESOLVER")

_summaries: &[Summary],
_registry: &dyn Registry,
_lockfile: Lockfile,
) -> anyhow::Result<Resolve> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: import the result directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants