polite-secretary-23285
02/15/2022, 4:57 PMIncremental Adoption
-section in the documentation but got stuck at running ./pants count-loc '**'
.
it fails with: BinaryNotFoundError: Cannot find unzip
on ['/bin', '/usr/bin', '/usr/local/bin']
I'm on NixOS and unzip is indeed not located in any of those paths (by design), but it's available through $PATH
.
any hints?fast-nail-55400
02/15/2022, 5:02 PMpolite-secretary-23285
02/15/2022, 5:08 PMhappy-kitchen-89482
02/15/2022, 5:14 PMhundreds-father-404
02/15/2022, 5:14 PMhappy-kitchen-89482
02/15/2022, 5:14 PMhundreds-father-404
02/15/2022, 5:15 PMThe hardest part of the change is figuring out what the option should be called and what subsystem it belongs toBenjy any thoughts? My intuition is to add to
[GLOBAL]
because this is used to find core binaries? But ugh that scope is already hugepolite-secretary-23285
02/15/2022, 5:16 PMfast-nail-55400
02/15/2022, 5:16 PMSubsystem
subclass with the option to use to specify the search path. Example in https://github.com/pantsbuild/pants/blob/e475d56d5ea149ffeb9fb0d4e316df6aeafd11ec/src/python/pants/backend/go/subsystems/golang.py#L65-L75.
2. Update find_unzip
and related functions to take the new Subsystem
as an argument.
3. Use the function defined on the `Subsystem`to be similar to go_search_paths
in place of the SEARCH_PATHS
constant.hundreds-father-404
02/15/2022, 5:17 PMunzip
, zip
, tar
). It's probably less boilerplate to have a single option for all 3 binaries, but I'm curious as a Nix user if you would want tighter control?happy-kitchen-89482
02/15/2022, 5:20 PMpolite-secretary-23285
02/15/2022, 5:21 PMhappy-kitchen-89482
02/15/2022, 9:32 PMpolite-secretary-23285
02/15/2022, 9:47 PMhappy-kitchen-89482
02/24/2022, 11:47 PM