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

Don't restart Pantsd when requirements.txt and pyproject.toml change if using target generators (Cherry-pick of #14829) #14831

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions src/python/pants/option/global_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -1573,19 +1573,17 @@ def compute_pantsd_invalidation_globs(

# Explicitly specified globs are already relative, and are added verbatim.
invalidation_globs.update(
(
"!*.pyc",
"!__pycache__/",
".gitignore",
# TODO: This is a bandaid for https://github.com/pantsbuild/pants/issues/7022:
# macros should be adapted to allow this dependency to be automatically detected.
"requirements.txt",
"3rdparty/**/requirements.txt",
"pyproject.toml",
"3rdparty/**/pyproject.toml",
*bootstrap_options.pantsd_invalidation_globs,
("!*.pyc", "!__pycache__/", ".gitignore", *bootstrap_options.pantsd_invalidation_globs)
)
if bootstrap_options.use_deprecated_python_macros:
invalidation_globs.update(
(
"requirements.txt",
"3rdparty/**/requirements.txt",
"pyproject.toml",
"3rdparty/**/pyproject.toml",
)
)
)

return tuple(invalidation_globs)

Expand Down