chore: swap ignore-installed with upgrade flag in nox#17259
Conversation
There was a problem hiding this comment.
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.
| if local_paths: | ||
| session.install(*local_paths, "--no-deps", "--ignore-installed") | ||
| session.install(*local_paths, "--no-deps", "--upgrade") |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
swap ignore-installed with upgrade flag in nox