Skip to content

Check whether to load databases after sync mode check #207

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Keats
Copy link
Collaborator

@Keats Keats commented Apr 16, 2025

Closes #205

@wes-a2ai
Copy link
Contributor

wes-a2ai commented Apr 17, 2025

Config:

[project]
# Note: do not update the lockfile from this project since we're testing whether an upgrade
# url is updated by 10 months to upgrade the version/source of the packages
name = "project-upgrade"
r_version = "4.4"
repositories = [
    {alias = "PPM", url = "https://packagemanager.posit.co/cran/2025-04-12"},
    {alias = "PPM-old", url = "https://packagemanager.posit.co/cran/2025-04-01"}
]

dependencies = [
    "ggplot2"
]
# Sync with PPM commented out
$ rv -c example_projects/project-upgrade/rproject.toml sync
Nothing to do

# Sync with PPM uncommented
$ rv -c example_projects/project-upgrade/rproject.toml sync
Nothing to do

# Upgrade showing only changed packages
$ rv -c example_projects/project-upgrade/rproject.toml upgrade
- ggplot2
+ ggplot2 (3.5.2, binary from https://packagemanager.posit.co/cran/2025-04-12) in 0ms
- pillar
+ pillar (1.10.2, binary from https://packagemanager.posit.co/cran/2025-04-12) in 0ms

} else {
false
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You can just do

fn is_matching_resolved_dep(&self, dep: &ResolvedDependency) -> bool {
    self.name == dep.name.as_ref() && self.version == dep.version
}

It can also be inlined since it's only used once

src/main.rs Outdated
dep.from_lockfile = true;
}
})
.collect::<Vec<_>>();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

can we just create a new vec rather than mutating? I also don't think it's going to be super useful for that to be parallel, did you notice a difference?

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.

rv upgrade fails to resolve if git package present
2 participants