https://pantsbuild.org/ logo
#development
Title
# development
h

hundreds-father-404

04/02/2021, 7:41 AM
Would source roots make sense for a Shell implementation? If you have an
.sh
file at
src/sh/foo.sh
and it sources
src/sh/dep.sh
, would you expect to do
source dep.sh
or
source src/sh/dep.sh
? I don't think there would be an equivalent to PYTHONPATH, beyond maybe cd-ing into the source root?
c

curved-television-6568

04/02/2021, 9:37 AM
To make things relocatable I think
source dep.sh
makes the most sense
h

happy-kitchen-89482

04/02/2021, 12:57 PM
I suspect that the repo root is the only "source root" that makes sense for shell
👍 1
that is, we shouldn't do any prefix stripping
h

hundreds-father-404

04/02/2021, 3:33 PM
I think I agree with you Benjy. Too much of a recipe for confusion to have to reason about source roots
e

enough-analyst-54434

04/02/2021, 5:58 PM
Hopefully some of these modelling questions can be put to bed once and for all for the sake of an easy to follow system. It seems to me, if the language does not have the concept of an import path, no source roots. For she'll script sourcing there is no such import path (no BASH_SOURCE_PATH), so no source roots. Just the plain filesystem.
👆 1
1