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 force-pushed the spr/main/3ba8d8f0 branch from 57c7fea to 5e3f300 Compare July 17, 2024 13:00
@maciektr maciektr force-pushed the spr/main/3ba8d8f0 branch 2 times, most recently from beead3d to 8a59b68 Compare October 20, 2024 18:40
@maciektr maciektr force-pushed the spr/main/3ba8d8f0 branch 2 times, most recently from cc55fb9 to d1e14cf Compare October 26, 2024 20:38
@maciektr maciektr force-pushed the spr/main/3ba8d8f0 branch 3 times, most recently from f3db9da to 0fb9853 Compare November 4, 2024 22:52
@maciektr maciektr force-pushed the spr/main/3ba8d8f0 branch 2 times, most recently from 836e39b to d2c9ab4 Compare November 19, 2024 21:01
@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
Member

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
Member

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
Member

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
Member

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