Skip to content

Commit

Permalink
Include nested gitignores with pants_ignore to ignore for file watching
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Arellano committed Apr 2, 2023
1 parent 76b1fc0 commit 61ad6fe
Show file tree
Hide file tree
Showing 7 changed files with 370 additions and 72 deletions.
13 changes: 1 addition & 12 deletions pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,11 @@ plugins = [
pantsd_invalidation_globs.add = [
"!*_test.py",
"!BUILD",
# NB: The `target` directory is ignored via `pants_ignore` below.
"src/rust/engine/**/*.rs",
"src/rust/engine/**/*.toml",
]
# Path patterns to ignore for filesystem operations on top of the builtin patterns.
pants_ignore.add = [
# venv directories under build-support.
"/build-support/*.venv/",
# We shouldn't walk or watch the rust compiler artifacts because it is slow.
"/src/rust/engine/target",
# We want to .gitignore Java .class files, but pants should pay attention to them.
"!*.class",
# We also want to override the .gitignore'd pants.pex file
"!/pants.pex",
# Ignore node modules for docs processing tools
"/docs/node_modules",
"!src/python/pants/engine/internals/native_engine.so*",
]

build_ignore.add = [
Expand Down
2 changes: 0 additions & 2 deletions src/python/pants/option/global_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,8 +920,6 @@ class BootstrapOptions:
Patterns from `[GLOBAL].pants_ignore` take precedence over these files' rules. For
example, you can use `!my_pattern` in `pants_ignore` to have Pants operate on files
that are gitignored.
Warning: this does not yet support reading nested gitignore files.
"""
),
)
Expand Down
1 change: 1 addition & 0 deletions src/rust/engine/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/rust/engine/fs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ rlimit = "0.8"
serde = "1.0.136"
task_executor = { path = "../task_executor" }
tokio = { version = "1.21", features = ["fs"] }
walkdir = "2"
workunit_store = { path = "../workunit_store" }

[dev-dependencies]
Expand Down
Loading

0 comments on commit 61ad6fe

Please sign in to comment.