ancient-vegetable-10556
06/16/2021, 5:48 PMwitty-crayon-22786
06/16/2021, 5:51 PMancient-vegetable-10556
06/16/2021, 5:51 PMwitty-crayon-22786
06/16/2021, 5:51 PM--pantsd
and --loop
hundreds-father-404
06/16/2021, 5:52 PMwatch_filesystem
? For advanced options, they're usually set in pants.toml
[GLOBAL]
watch_filesystem = false
ancient-vegetable-10556
06/16/2021, 5:52 PMancient-vegetable-10556
06/16/2021, 5:53 PMancient-vegetable-10556
06/16/2021, 5:54 PMancient-vegetable-10556
06/16/2021, 5:54 PMhundreds-father-404
06/16/2021, 5:55 PMand that has been mildly useful to me in the pastOpposite for me, it's been mildly annoying. And some users have reported frustration iirc, that you're frozen from making changes until you get back results
witty-crayon-22786
06/16/2021, 5:56 PMancient-vegetable-10556
06/16/2021, 5:56 PMhundreds-father-404
06/16/2021, 5:56 PMwitty-crayon-22786
06/16/2021, 5:56 PMwitty-crayon-22786
06/16/2021, 5:57 PMhundreds-father-404
06/16/2021, 5:57 PMthat’s a good enough reason to just remove it from the pictureWhat do you mean? I'd rather we fix the buggy restarts than have an option to disable the buggy behavior iiuc, Pants should only restart upon file changes with
--loop
, right?ancient-vegetable-10556
06/16/2021, 5:57 PMancient-vegetable-10556
06/16/2021, 5:58 PMwitty-crayon-22786
06/16/2021, 5:58 PMwitty-crayon-22786
06/16/2021, 5:59 PMancient-vegetable-10556
06/16/2021, 5:59 PMpantsd OR loop
?witty-crayon-22786
06/16/2021, 5:59 PMancient-vegetable-10556
06/16/2021, 5:59 PMhundreds-father-404
06/16/2021, 6:00 PMt’s an important part of our guarantees that if the filesystem changes somewhere below a rule that it not observe the filesystem in a “half this way, half the other way” state.Hm, then wouldn't disabling file watching violate this guarantee? Iiuc,
--no-watch-filesystem
would mean that you are acknowledging some risk of invalid builds. Otherwise, Pants makes a best effort to guarantee valid buildswitty-crayon-22786
06/16/2021, 6:01 PMwitty-crayon-22786
06/16/2021, 6:02 PMhundreds-father-404
06/16/2021, 6:02 PM--no-watch-filesystem
== zero effort, compared to "best effort". So I do think a dedicated option makes sensewitty-crayon-22786
06/16/2021, 6:02 PMwitty-crayon-22786
06/16/2021, 6:03 PMwitty-crayon-22786
06/16/2021, 6:04 PMpantsd OR loop
.ancient-vegetable-10556
06/16/2021, 6:04 PMhundreds-father-404
06/16/2021, 6:04 PM--watch-filesystem
, registered near the --pantsd
options ideally (order of registering impacts ./pants help-advanced global
). In the help message, explain that Pants normally makes a best effort to restart builds invalidated by filesystem changes. Disabling filewatching increases the risk of invalid buildsancient-vegetable-10556
06/16/2021, 6:06 PMhundreds-father-404
06/16/2021, 6:06 PMand for practicality’s sake, let’s do pantsd OR loop .I think Stu is suggesting that we validate both
pantsd
and loop
are not set if watch_filesystem
is false?
I do think we want a dedicated option because best effort > no effortwitty-crayon-22786
06/16/2021, 6:06 PMhundreds-father-404
06/16/2021, 6:06 PMwitty-crayon-22786
06/16/2021, 6:06 PMhundreds-father-404
06/16/2021, 6:07 PM--no-pantsd
(e.g. CI) and --no-loop
(default). That means in a lot of places we will no longer have any effort to check for invalid builds. That seems wrong. The default of file watching is a good one, regardless of pantsd
Afaict, you should only set --no-watch-filesystem
because of weird edges like Docker and M1switty-crayon-22786
06/16/2021, 6:08 PMhundreds-father-404
06/16/2021, 6:13 PMancient-vegetable-10556
06/16/2021, 7:50 PMancient-vegetable-10556
06/16/2021, 7:54 PMancient-vegetable-10556
06/16/2021, 7:54 PM/pantsbuild
once it’s more-or-less donewitty-crayon-22786
06/16/2021, 8:11 PMancient-vegetable-10556
06/16/2021, 8:12 PMancient-vegetable-10556
06/16/2021, 8:12 PMancient-vegetable-10556
06/16/2021, 8:17 PMwitty-crayon-22786
06/16/2021, 8:17 PMwitty-crayon-22786
06/16/2021, 8:18 PMwitty-crayon-22786
06/16/2021, 8:18 PMancient-vegetable-10556
06/16/2021, 8:21 PM