-
Notifications
You must be signed in to change notification settings - Fork 170
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
Add support for --sources-cache-dir to update verb #845
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #845 +/- ##
=======================================
Coverage 75.00% 75.00%
=======================================
Files 42 42
Lines 3317 3317
=======================================
Hits 2488 2488
Misses 829 829
Continue to review full report at Codecov.
|
I am torn between approving this as-is since it's a net improvement and concern that improving the piecemeal support for this option is going to increase its usage and create more inconsistency. Looking back it seems like this feature, introduced in 2c5cae3 is meant primarily (possibly exclusively) for testing. looking for usage of Line 303 in 9850258
This is the fetching of the sources list for use as the argument default so that's fine. Lines 52 to 61 in 9850258
I haven't figured out if this is dead code or not but if it's at all usable right now it won't be affected by this patch without further work. rosdep/src/rosdep2/sources_list.py Lines 472 to 473 in 9850258
This usage is the initialization of an optional kwarg rosdep/src/rosdep2/sources_list.py Lines 554 to 555 in 9850258
This usage is likewise the initialization of an optional kwarg All uses of the latter two functions within rosdep2 pass the optional kwarg. I think the smallest delta from this patch which would give me the confidence to approve it would be to make the kwarg required (or at least start throwing warnings up when no sources_cache_dir is provided) If we just ignore rospack ( If we wanted to do something more holistic like a refactoring which creates a single context object for the sources list directory, sources cache directory, and other similar parameters which should persist through all rosdep operations and use that ubiquitiously I could see that being a good direction to go as well. As pointed out, it doesn't seem like this has ever been implemented for update operations, which at least means that we've only ever written to a consistent incorrect default directory but If this is all "a lot" and we want to punt, I think we can do an even smaller thing and just suppress the help for this flag and consider it just for testing (as it is used in tests). |
A more complete solution is provided in #908 . It was not only the sources cache, but also the meta cache that goes by default into |
I found three major references to
ad 3) This only disables rosdep usage, so no problem. ad 1 and 2) In both cases, the So I agree with @nuclearsandwich that the wisest option would probably be to hide Would that be acceptable? |
From what I can tell, support for this option was only implemented for the
install
verb.From
rosdep update --help
: