Add support for colon seperated list of library homes#140
Add support for colon seperated list of library homes#140
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #140 +/- ##
========================================
Coverage 63.72% 63.73%
========================================
Files 1065 1065
Lines 55141 55161 +20
Branches 4084 4085 +1
========================================
+ Hits 35139 35157 +18
- Misses 20002 20004 +2 ☔ View full report in Codecov by Sentry. |
|
Hello past me. |
|
Hi @ChrisspyB , while I'm an outsider here, there are a couple of questions open by this feature:
Maybe there's already an answer for these but I couldn't find it in the tests (I skipped the code) |
|
Hi @pmaciel. I will have to review this myself too as it was a long time ago, but from what I remember.
The intention is the first found path takes precedence. The precedence for lookups is HOME=$FIRST_PATH:$SECOND_PATH
Yes, as these are allowed with the current implementation. In these cases we resolve to the first home. e..g the
I was completely unaware of this functionality, and it seems very likely that these changes would break it... (e.g. what if I set 2 homes for A and 2 homes for B...?). |
|
@ChrisspyB I don't think there will be reasonable progress on this one, can we close it and reopen it once it is ready? |
|
Won't do |
Allows setting multiple homes in a colon seperated string. e.g.
ECKIT_HOME=/path/to/home1:/path/to/home2This is useful for libraries which like to search for multiple configs, which may be in distinct directories. LocalPathName's tilde expansion
~eckit/filewill match the first existing file from[/path/to/home1/file1, /path/to/home2/file]. If none exist, the first is used.No change in behaviour is intended if a single home is set.
If LIB_HOME is not set, there is a change in behaviour in the tilde expansion:
~eckit/file1->libraryprefix/file1,libraryprefix/../file1,libraryprefix/../../file1,libraryprefix/../../../file1.../file1~eckit/file1->libraryprefix/file1,libraryprefix/../file1,libraryprefix/../../file1,libraryprefix/../../file1,/file1note This does mean that LIB_HOME cannot be set to directories whose path contains a colon.