proud-dentist-22844
05/20/2021, 5:48 AMPER_RESTART_IF_SUCCESSFUL
ie cache/memoize in memory, but only when it exits successfully.
wdyt?hundreds-father-404
05/20/2021, 5:57 AMPER_RESTART
to be PER_RESTART_ALWAYS
vs PER_RESTART_SUCCESSFUL
hundreds-father-404
05/20/2021, 1:47 PMPER_RESTART
is used atm, we use await Get(ProcessResult, Process)
instead of await Get(FallibleProcessResult, Process)
. This causes Pants to error if return code != 0, which restarts Pantsd
But your change is still an excellent suggestion. About to put up a PR to fixproud-dentist-22844
05/20/2021, 1:59 PMPER_RESTART_SUCCESSFUL
🙂hundreds-father-404
05/20/2021, 2:20 PMhundreds-father-404
05/20/2021, 2:35 PMproud-dentist-22844
05/20/2021, 3:29 PMhundreds-father-404
05/20/2021, 3:30 PMIt errors if it is not accessible.Cool, so then you don't actually need #12094. Although, again, still a good change regardless
hundreds-father-404
05/20/2021, 3:33 PMPER_SESSION_{ALWAYS,SUCCESSFUL}
. Iiuc, per-restart means the lifetime of the pants daemon, which ideally lives for a while like multiple days
A session is a call to ./pants
. Meaning, ./pants test ::
would run your rule once and memoize it across all your tests. But then calling ./pants test ::
again would re-run the processproud-dentist-22844
05/20/2021, 3:34 PMproud-dentist-22844
05/20/2021, 3:34 PMPER_SESSION_SUCCESSFUL
would be great.hundreds-father-404
05/20/2021, 3:49 PMI assumed that pants would survive the error.Yeah, that's actually a really great suggestion. Opened https://github.com/pantsbuild/pants/issues/12096 for more graceful failure modes
hundreds-father-404
05/20/2021, 4:01 PMPER_SESSION
. I'm not very clear on how to implement that one, although asked Stu if he could weigh in when he has a moment (he's on paternity leave)proud-dentist-22844
05/20/2021, 4:02 PMhundreds-father-404
05/20/2021, 7:50 PMNEVER == PER_SESSION
🚀 this PR changes the name to reflect that https://github.com/pantsbuild/pants/pull/12100