Skip to content

chore: swap ignore-installed with upgrade flag in nox#17259

Draft
ohmayr wants to merge 1 commit into
mainfrom
switch-ignore-installed-with-upgrade
Draft

chore: swap ignore-installed with upgrade flag in nox#17259
ohmayr wants to merge 1 commit into
mainfrom
switch-ignore-installed-with-upgrade

Conversation

@ohmayr
Copy link
Copy Markdown
Contributor

@ohmayr ohmayr commented May 26, 2026

swap ignore-installed with upgrade flag in nox

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request replaces the --ignore-installed flag with --upgrade in several session.install calls within noxfile.py.j2. The reviewer points out that using --upgrade for local paths and local dependency paths might cause pip to skip installation if the package version has not changed, potentially ignoring local code modifications. They suggest using --force-reinstall instead to ensure local changes are always picked up.

Comment on lines 534 to +535
if local_paths:
session.install(*local_paths, "--no-deps", "--ignore-installed")
session.install(*local_paths, "--no-deps", "--upgrade")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using --upgrade for local paths can cause pip to skip installation if the package version has not changed. This means local code changes might not be reflected in the test session. To ensure local changes are always reinstalled, use --force-reinstall instead of --upgrade.

    if local_paths:
        session.install(*local_paths, "--no-deps", "--force-reinstall")

dep_paths = [str(deps_dir / dep) for dep in core_dependencies_from_source]

session.install(*dep_paths, "--no-deps", "--ignore-installed")
session.install(*dep_paths, "--no-deps", "--upgrade")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

For local dependency paths, using --upgrade might prevent pip from reinstalling them if the version hasn't been bumped. Using --force-reinstall ensures that local modifications are always picked up.

    session.install(*dep_paths, "--no-deps", "--force-reinstall")

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.

1 participant