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

Adjust .gitignore to work better with pantsbuild #5726

Merged
merged 3 commits into from
Sep 11, 2022
Merged
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*.egg
*.egg-info
dist
build

Choose a reason for hiding this comment

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

FYI you can name the files BUILD.pants! Many people prefer that for clarity. It allows you to avoid making this change also.

Copy link
Member Author

Choose a reason for hiding this comment

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

Interesting thought.
We don't have anything that creates build files or directories, so keeping it in .gitignore is kind of pointless.

But if we did change from BUILD to BUILD.pants, we would need this config in pants.toml:

[tailor]
build_file_name = "BUILD.pants"

https://www.pantsbuild.org/docs/reference-tailor#build_file_name

I thought we would also need to adjust [GLOBAL].build_patterns, but the default is ["BUILD", "BUILD.*"], so pants already recognizes BUILD.pants:
https://www.pantsbuild.org/docs/reference-global#build_patterns

I've done everything with BUILD files in my PoC. It'll be less work for me to keep using BUILD because that's less I have to change when I cherry-pick commits. If people would prefer BUILD.pants then that is possible.

.venv
eggs
parts
Expand Down Expand Up @@ -67,5 +66,7 @@ benchmark_histograms/
# Editor Saves
*~
\#*\#
[._]*.sw[a-p]
[._]sw[a-p]
[._]*.sw[a-px]
[._]sw[a-px]
[._]*.sw[a-p]x
[._]sw[a-p]x
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Added

* Begin introducing `pants <https://www.pantsbuild.org/docs>`_ to improve DX (Developer Experience)
working on StackStorm, improve our security posture, and improve CI reliability thanks in part
to pants' use of PEX lockfiles. This is not a user-facing addition. #5713 #5724
to pants' use of PEX lockfiles. This is not a user-facing addition. #5713 #5724 #5726
Contributed by @cognifloyd

Changed
Expand Down