Is there any reason why native code is re-built ev...
# development
Is there any reason why native code is re-built every time I run a command? For a 5 minute code change, I'm on about 45 minutes of trying to commit it - between these compilation cycles, and pre-commit taking 10-15 minutes doing... something...
Copy code
sj@tinyrick pants-completions % PY=python3.9 ./pants --changed-since=origin/main fmt lint
[=== 00:00 Building native code... ===]
   Compiling pyo3-build-config v0.16.6
   Compiling engine v0.0.1 (/Users/sj/Developer/oss/pants-completions/src/rust/engine)
   Compiling pyo3-ffi v0.16.6
   Compiling pyo3 v0.16.6
    Building [=======================> ] 444/445: engine
Does this happen when something in the builtin goals change?
We've been hacking on the engine much more the past month for the Docker feature, but it shouldn't be every time you run a command. Maybe every time you pull main if you don't do so frequently
Nope, cloned a new repo from main, created a branch, compiled, and then when doing linting/formatting, I got hit with I think 4-5 more compiles along the way - and I've only touched 3 python files (
Okay, just happened again and I committed and pushed my code, then haven't touched anything since - i went in to test a
./pants completions
run - and it re-built. Almost feels like a timeout
besides the redundant builds, have you exported
in order to speed up rust builds by avoiding the optimizations of a production build? (Want a faster compile box)
Nope, went for release as usual. I don't mind the one-off build time, for faster runtime
The setup I use is the same as always, it feels like there is something new causing it to re-build spuriously, which is concerning.
👍 1
Yeah, that sounds all sorts of wrong
All kinds of wrong, and all kinds of frustrating. I mean, 6 core i5, so not top of the line, but it's no slouch of a computer. Still takes several minutes for the re-compilation each time