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

Selectively disabling certain packages from being handled by Hunter #557

Open
themarpe opened this issue May 1, 2022 · 5 comments
Open

Comments

@themarpe
Copy link

themarpe commented May 1, 2022


Should we add in support to selectively skip certain packages being handled by Hunter, as is done by turning off whole Hunter with HUNTER_ENABLED=OFF currently?

Something along the lines of HUNTER_SKIP_PACKAGE_[package_name] specifying if hunter_add_package for X package should do nothing, resulting in find_package to search from the system/...,

Eg: -D HUNTER_SKIP_PACKAGE_nlohmann_json=ON

Not sure how deep the changes would have to be to support such use case and/or if this would make sense.

Main usecase I see is selecting certain dependency from system for means of packaging (eg relying on nlohmann json from system package manager, so dependencies are kept inline, etc...)

Thoughts?

@NeroBurner
Copy link

Although I understand the wish for this feature it is a can of worms resulting in many many headaches

https://hunter.readthedocs.io/en/latest/faq/interaction-with-other-package-managers.html

@themarpe
Copy link
Author

themarpe commented May 2, 2022

I agree, but not in cases where Hunter is used also as a private package management system. Eg. getting certain dependencies that an executable/library relies on, but only internally. In that case I think it makes sense to then use Hunter for ease of use (eg requiring no extra user work to supply such dependencies), but still gives the freedom to switch out to an external library, for others, when required. (eg to not have conflicts, when creating a deb file, etc...)

@traversaro
Copy link

Hello @NeroBurner ! We were discussing about this issue in luxonis/depthai-core#1021 (comment), and I guess it is just easier to ask you: are you interested in reviewing a proposal for this feature or not? Thanks in advance!

@NeroBurner
Copy link

yes, if the feature is well tested and invalidates the cache to prevent issues mentioned in the FAQ

@traversaro
Copy link

Thanks! I implemented the super barebone logic in https://github.com/traversaro/hunter/tree/fix557, suggestions for how to handle disabling cache when HUNTER_SKIP_PACKAGE_<packageName> is used are welcome. As this is extremely advanced option (that in general is discouraged) I wonder if it could make sense to just permit to use only when caching is explicitly disabled (but I do not know if there is any way to disable all caching).

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

No branches or pull requests

3 participants