high-egg-2153
03/10/2021, 9:03 PMhundreds-father-404
03/10/2021, 9:07 PMhigh-egg-2153
03/10/2021, 9:15 PMhundreds-father-404
03/10/2021, 9:19 PMhigh-egg-2153
03/10/2021, 9:25 PMwitty-crayon-22786
03/10/2021, 9:37 PMwitty-crayon-22786
03/10/2021, 9:46 PMhigh-egg-2153
03/10/2021, 9:46 PMwitty-crayon-22786
03/10/2021, 9:47 PMwitty-crayon-22786
03/10/2021, 9:47 PMhigh-egg-2153
03/10/2021, 9:48 PMwitty-crayon-22786
03/10/2021, 9:48 PM@rules
, but in order to know what to watch, specific APIs need to be used to access the filesystemhigh-egg-2153
03/10/2021, 9:50 PMwitty-crayon-22786
03/10/2021, 9:50 PMcontents = await Get(DigestContents, PathGlobs(["my/version/file.txt"]))
version_content = contents[0].content.decode()
high-egg-2153
03/10/2021, 9:51 PMhigh-egg-2153
03/10/2021, 9:54 PMwitty-crayon-22786
03/10/2021, 9:55 PMos.read
/ etc with better sandboxinghigh-egg-2153
03/10/2021, 9:57 PMbusy-vase-39202
03/11/2021, 12:07 AMIt is not safe to use os.path or pathlib.Path like you normally would because this can break caching. Instead, Pants has several mechanisms to work with the file system in a safe and concurrent way.
witty-crayon-22786
03/11/2021, 5:49 PMwitty-crayon-22786
03/11/2021, 5:54 PM