BobBuildTool / bob

Bob build tool - Functional cross platform build-automation tool
https://bobbuildtool.dev/
GNU General Public License v3.0
76 stars 44 forks source link

intermediate: support colon seperated tool paths #541

Closed rhubert closed 11 months ago

rhubert commented 11 months ago

Make it possible to define tools with more than one directory containing executables by handling colons in path as separator.

codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8f7a9eb) 88.31% compared to head (2b3ce92) 88.31%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #541 +/- ## ======================================= Coverage 88.31% 88.31% ======================================= Files 46 46 Lines 14509 14509 ======================================= Hits 12814 12814 Misses 1695 1695 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rhubert commented 11 months ago

I think this basically works.

The issue I faced was a package with multiple tools installed in different directories. Symlinking them was not possible as these tools tried to open files relative to the symlink...

Anyway I found another solution to solve my problem. Not sure if this is needed. What do you think?

jkloetzke commented 11 months ago

How about to just declare multiple tools? Something like this:

provideTools:
    foo: path/a
    bar: path/b

Then a consuming recipe can choose if it needs foo, bar or both. If there are multiple tools then they should have their own name. I would even introduce different names if multiple tools are in exactly the same directory. This makes refactoring in the future much easier.

I don't think that the proposed solution is viable. The original design is to have one path per tool name. Attaching an incrementing suffix looks kind of arbitrary. What should happen if this creates a name collision? The numbering will change too if some additional path is added in the middle. So all in all I would rather not go this route.