Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intermediate: support colon seperated tool paths #541

Closed
wants to merge 1 commit into from

Conversation

rhubert
Copy link
Contributor

@rhubert rhubert commented Nov 23, 2023

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

Copy link

codecov bot commented Nov 23, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rhubert rhubert marked this pull request as draft November 23, 2023 13:52
Make it possible to define tools with more than one directory containing
executables by handling colons in path as separator.
@rhubert
Copy link
Contributor Author

rhubert commented Nov 25, 2023

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
Copy link
Member

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.

@rhubert rhubert closed this Nov 25, 2023
@rhubert rhubert deleted the paths branch November 25, 2023 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants