happy-kitchen-89482
10/22/2019, 5:36 PMhappy-kitchen-89482
10/22/2019, 10:38 PMhappy-kitchen-89482
10/22/2019, 10:38 PMhundreds-father-404
10/23/2019, 12:54 AM./pants
for if the CLI args include test.*
, then if this the case and the hash has changed for the source files, run ./pants --tag=integration list globs-originally-passed-to-pants-script
. If that returns with something, then regen the PEX. Otherwise, we know it’s just unit tests and can ignore
Alternatively, introduce an env var like NO_REGEN_PEX
to turn off the mechanism 🙂
--
The reason for all this complication is that we have this logic live at the bash script level. We considered having it instead live in pants-plugins
or `src`—i.e. the logic of whether to call `./pants binary src/python/pants:local_binary && mv dist/pants.pex pants.pex`—but we decided this was too complicated. So, because this logic lives at the bash level, we can’t simply access information like `does this glob contain any targets with the tag integration
?happy-kitchen-89482
10/23/2019, 1:15 AMhappy-kitchen-89482
10/23/2019, 1:15 AMhappy-kitchen-89482
10/23/2019, 1:16 AMhundreds-father-404
10/23/2019, 1:16 AMCI=true
. As a temporary workaround, you can set that (not sure if that impacts anything else)happy-kitchen-89482
10/23/2019, 1:19 AMTRAVIS=true
it looks likehappy-kitchen-89482
10/23/2019, 1:29 AM