strong-toothbrush-3775903/22/2022, 8:28 PM
and with that from absolute to relative and a-lot-easier
-File loading. But now my testing with Pants stopped working due to the fact (I guess) that it’s hermetic and the
-File cannot be found. Is there a common way to use
-Files inside Pants? At least I couldn’t find anything related to that topic inside the docs 🙂.
-File like we did before? 🤓
enough-analyst-5443403/22/2022, 8:37 PM
Or do I pass the absolute path to theYou generally want to avoid absolute paths with Pants if possible. Think about trying to share cache hits when using a remote cache. Likely all users will have a different absolute path for a given thing and then any action pants performs that needs that path cannot have its results shared across users.-File like we did before?
But now my testing with Pants stopped working due to the fact (I guess) that it’s hermetic and theYour guess is correct. You have to declare dependencies on all the files you need. We take away that trouble for code dependencies (imports) and some other things with dep inference, but-File cannot be found.
is not one of those. So you'll need a
(s?) target to own the
and then you'll need to wire up a dependency on that target to everything that needs it.
strong-toothbrush-3775903/22/2022, 8:41 PM
-Files inside of PEXs? In my eyes they are basically parameters of execution. So of course they can change behavior or even the build but this is a matter of loading environment-variables.
enough-analyst-5443403/22/2022, 8:42 PM
strong-toothbrush-3775903/22/2022, 8:44 PM
enough-analyst-5443403/22/2022, 8:45 PM
. This trickles into tests when we configure those env vars to leak through.
strong-toothbrush-3775903/22/2022, 8:52 PM
-Files rarely have Python-specific things to them. Or do you mean when you’re executing a second language from your shell, you want the Environment-Variables loaded from the start? 🤔
enough-analyst-5443403/22/2022, 8:56 PM
strong-toothbrush-3775903/22/2022, 8:57 PM
enough-analyst-5443403/22/2022, 8:58 PM
strong-toothbrush-3775903/22/2022, 8:59 PM
happy-kitchen-8948203/22/2022, 9:10 PM
strong-toothbrush-3775903/22/2022, 9:46 PM
file” to direnv 😄. Gonna need to explain to my devs tomorrow but this does make more sense than using 3 additional libraries. I love it! Thank you so much! And Pants is happy as well 🚀