I've asked a variant of this before, but as there ...
# development
w
I've asked a variant of this before, but as there doesn't appear to be an existing mechanism to create a Subsystem which can either download from a url OR be setup from a system path, is there an approach I should take on this. Two mutually exclusive subsystems? New Subsystem type?
h
In general, there is no prebuilt mechanism for subsystems to be loaded via system path. You have to use stuff from
system_binaries.py
. You also can still subclass
ExternalTool
but choose to not use the apprporiate
Get
in your rule What this means is that you can use the same subsystem and then figure out based on the options whether to load the binary via
system_binaries.py
vs
Get(ExternalTool)
w
šŸ‘ My plan was some sort of default to system, with a URL escape hatch Actually, it's even more nuanced, because one could theoretically use an ARM compiler and x86 compiler in the same project, but I feel like multiple compilers is a "later" thing at the moment
Can a
BinaryPath
be used to represent something inside a
Digest
? Or should that only be for system-level stuff?
Not sure if binary paths have to be absolute, or if they can refer to that which is within a snapshot, relatively
h
BinaryPath
is only intended for system-level stuff, absolute paths
w
Okay, I was hoping to use that with the optional ExternalTool/System Binary - to keep my toolchain model the same. I use the fingerprint in an environment to check if the toolchain changes from run to run
h
but reminder
BinaryPath
is solely an abstraction for DRY. What really matters are the underlying engine mechanisms. All that the engine (and REAPI) cares about is your argv0 is either: ā€¢ absolute path , or ā€¢ relative path to a file from
input_digest
w
Yep, I've replaced it with a string - but feels very... stringy...... šŸ¤·
šŸ™ˆ 1