efabless / volare

Version manager (and builder) for the Google sky130 and gf180mcu open-source PDKs
Apache License 2.0
57 stars 8 forks source link

volare `pdkpath` feature #83

Open dlmiles opened 3 months ago

dlmiles commented 3 months ago

Description

The function is printing the fully-qualified-filesystem-path to the PDK (from inside the volare manage storage)

Feel free to pick a better name than pdkpath

The purpose of this is to push back into the tool the implementation details of how to resolve a full-qualified-PDK-path by anything built on top of it.

Proposal

The command represents what the output may look like when this feature is in use

#  This is printing the current active selected PDK
$ volare pdkpath
/home/user/.volare/sky130/versions/cd1748bb197f9b7af62a54507de6624e30363943

This is a feature request to have the volare tool resolve the current active PDK fully qualified directory. This is so 3rd party tool and scripts do not need to know the implementation detail of how to resolve the active PDK or how the PDK is catalogued on the filesystem, that can be volare's function to manage.

It should confirm the directory exists, before returning it on STDOUT (allowing scripts to capture the value).

Nice to have features built on top, with additional arguments supplied

$ volare pdkpath 2024.02.11; echo $?
/home/user/.volare/sky130/versions/6d4d11780c40b20ee63cc98e645307a9bf2b2ab8
0

$ volare pdkpath bdc9412b3e468c102d01b7cf6337be06ec6e9c9a ; echo $?
/home/user/.volare/sky130/versions/bdc9412b3e468c102d01b7cf6337be06ec6e9c9a
0

$ volare pdkpath 001122334455667788aabbccddeeff00112233 ; echo $?
ERROR MESSAGE: PDK_VERSION not found, to STDERR only, no output to STDOUT
1

$ echo PDK=$PDK; volare pdkpath --with=PDK 2024.01.08; echo $?
PDK=sky130A
/home/user/.volare/sky130/versions/d7979feb24bf08083dcf5c013be51adec8c0bcef/sky130A
0

$ unset PDK; echo PDK=$PDK; volare pdkpath --with=PDK 2024.01.08; echo $?
PDK=
ERROR MESSAGE: PDK version not found, to STDERR only, no output to STDOUT
1

Feel free to pick a better name than pdkpath

The purpose of this is to push back into the tool the implementation details of how to resolve a full-qualified-PDK-path by anything built on top of it.