victorious-wire-62055
12/08/2023, 6:52 PMcheck
. 2) Possibly as a result, the caching gets busted - re-running check without changes validates all the dependencies again.
I'm setting this up as a public github module - I just wanted to check what other details are helpful to include in a bug report.victorious-wire-62055
12/08/2023, 6:53 PMvictorious-wire-62055
12/08/2023, 8:27 PMhappy-kitchen-89482
12/09/2023, 3:31 AMlittle-pilot-11155
01/24/2024, 11:44 AMgo_module
target into a separate BUILD file (like go.BUILD
)
2. Make sure Golang code is not mixed with other language code (as store them in separate directories)
3. In pants.toml
update build patterns and add an alias to tweak it, for instance:
[GLOBAL]
build_patterns = [
"BUILD",
"BUILD.*",
# Enable Golang builds by default.
"go.BUILD",
]
[cli.alias]
disable-go = "--build-patterns=\"['BUILD', 'BUILD.*']\" --build-ignore=\"['./path/to/your/go/code/*']\""
Now, you can add disable-go
to your Pants command, and get faster execution, if you are only working with other languages. For example pants disable-go tests ::
. The difference (with cached results) for me was around 80s speedup.
# With Golang
84.52s user 17.61s system 308% cpu 33.094 total
# Without Golang
6.55s user 0.50s system 98% cpu 7.157 total
happy-kitchen-89482
01/24/2024, 11:00 PMmany-beard-49972
02/25/2024, 1:10 PMhappy-kitchen-89482
02/26/2024, 6:47 PM