quaint-telephone-89068
02/07/2023, 5:54 PM> This addresses the ../../../docs.html example listed in @huonw's #17616 (comment) on #17616: The correct incantation would allow running in the working directory of the script, and the docs.html would be at the digest root automatically.
>
> @huonw if you're game, I'd love some verification that this does what you want.
(Thanks @chrisjrn for waiting while I was on leave.)
I had a play with this. I think the new working directory default is a good change 👍
However, I found I got kinda confused for two reasons:
1. the newand its defaultroot_output_directory
2. behaviour whenisn't found, but that's not directly related to the change here, so I've filed #18183output_files
* * *
For 1, I think there's tension between:
1. "internal" commands, like(npm ciin the case study in #17616 (comment)).:node_modules
2. archive/external ones.
In particular, with the change here, it seems likeetc. will be installing tonpm ciand then moving to$CHROOT/path/to/target/node_modulesfor later commands that use it.$CHROOT/node_moduleshappens to handle this fine (it'll traverse parents), but this seems rife for confusion (e.g. commands that don't traverse parents) and conflicts (e.g. if there's two commands that have their own "internal"/"private"npm(aka resolves), and both of those are pulled into the same sandbox 💥 ).node_modules
Proposal: MaybeI'm fine with this default, and will make this change. pantsbuild/pantscould continue to default toroot_output_directory, but a user can set it to/(or whatever) to do relocation, if they want?"."
user
02/07/2023, 10:07 PM