hundreds-father-404
03/17/2022, 4:41 PMcwd
, but Stu pointed out that's probably a misnomer. So far we have current_directory
, build_file_directory
, current_dir
, and build_file_dir
proposedbitter-ability-32190
03/17/2022, 4:46 PMhere
? đhundreds-father-404
03/17/2022, 4:47 PMpath/to/BUILD
rather than path/to/
?bitter-ability-32190
03/17/2022, 4:48 PMcurrent
might be a bad idea because it's value is relative to the file
⢠dir
instead of directory
.bitter-ability-32190
03/17/2022, 4:48 PM__file__
as that has semantics and build files ARE Python đhundreds-father-404
03/17/2022, 4:49 PMPurePath
so that you can do things like here() / "../parent_dir"
w/o violating our ban on imports. (Calling str()
on PurePath
converts it)bitter-ability-32190
03/17/2022, 4:50 PMDo you think people might be confused if it's path/to/BUILD rather than path/to/?Yes if the idea is if it is a dir đ
hundreds-father-404
03/17/2022, 4:50 PMbuild_file_dir
? Hopefully there is zero ambiguity therebitter-ability-32190
03/17/2022, 4:50 PM__path__ / "../parent_dir"
works just as well. All pathlbi types are immutable, so no concern on that frontbitter-ability-32190
03/17/2022, 4:51 PMhundreds-father-404
03/17/2022, 4:51 PMpath / "../parent_dir" works just as well.Ack. Another reason I prefer a function is I think it might be more intuitive for non-Python folks like JVM users, and better integrate with the
./pants help build-symbols
I'm itching to makefast-nail-55400
03/17/2022, 4:58 PMfast-nail-55400
03/17/2022, 4:59 PMbuild_file().directory
(i.e., a named attribute on some container) be better?hundreds-father-404
03/17/2022, 5:00 PMcurved-television-6568
03/17/2022, 6:19 PMhundreds-father-404
03/17/2022, 6:19 PMcurved-television-6568
03/17/2022, 6:20 PMcurved-television-6568
03/17/2022, 6:21 PMhundreds-father-404
03/17/2022, 6:21 PMbuild_file_dir
okay with you? I figure it removes any ambiguity, and isn't very hard to type eithercurved-television-6568
03/17/2022, 6:45 PM