-
Notifications
You must be signed in to change notification settings - Fork 18
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
WIP: Fix CLI use for source-only rosdistros. #44
WIP: Fix CLI use for source-only rosdistros. #44
Conversation
Hi @mikepurvis, Thanks for the PR! I won't have time to look at this for a little while. Would you be willing to add a test for this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beside the minor comment this LGTM.
source_package_xmls = wet_distro.get_source_repo_package_xmls(repo_name) | ||
if source and source_package_xmls: | ||
source_package_names = source_package_xmls.keys() | ||
source_package_names.remove("_ref") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a comment above this line why it is necessary. It took quite a bit to figure it out when reading the patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added, also filed some related tickets against rosdistro
which would help this in the future:
@sloretz Sure, but we should talk about what kind of testing strategy is desired or appropriate for this repo. Currently, there's a lot of code in here which handles corner cases pertaining to rosbuild packages (which I have no interest in attempting to support or test support for), and there's also a lot of dependence on network access, which would be pretty tricky to mock out in a way that retained the legitimacy of the test itself. Basically, would you be interested in a suite which was based on having some separate mini test rosdistros (one source-only, one source/release, one release-only) consisting of tags/hashes to repos, where the suite would build the relevant caches and then exercise some standard rosinstall_generator operations against those? Such a test would be heavily network/github dependent, but I think that's just a reality of this code— and still a huge step up from the current state affairs, which is no tests at all. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine merging this patch as-is (we don't plan to use the added feature and if you are willing to use it without tests I don't mind).
It would be nice if ros-infrastructure/rosdistro#116 would be implemented to avoid the hack in this patch. Not sure if you would like to do that before this is being merged or sometime after.
It's probably a fairly small fix, and making it now would avoid having to do a compatibility dance to change it down the road. If you guys are okay with merging both PRs and coordinating the next release, then I'll put up one for rosdistro, and then this one will be updated to remove the hack and bump up the version dependency. |
Absolutely. Thanks. |
Okay, this is updated now, but obviously this shouldn't merge until ros-infrastructure/rosdistro#117 is merged and released. |
setup.py
Outdated
@@ -8,7 +8,7 @@ | |||
setup( | |||
name='rosinstall_generator', | |||
version=__version__, | |||
install_requires=['argparse', 'catkin_pkg >= 0.1.28', 'rosdistro >= 0.5.0', 'rospkg', 'PyYAML', 'setuptools'], | |||
install_requires=['argparse', 'catkin_pkg >= 0.1.28', 'rosdistro >= 0.6.7', 'rospkg', 'PyYAML', 'setuptools'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version also needs to be updated in these two lines in the stdeb.cfg
file:
rosinstall_generator/stdeb.cfg
Lines 2 to 3 in ce4e6ec
Depends: python-argparse, python-catkin-pkg (>= 0.1.28), python-rosdistro (>= 0.5.0), python-rospkg, python-yaml | |
Depends3: python3-catkin-pkg (>= 0.1.28), python3-rosdistro (>= 0.5.0), python3-rospkg, python3-yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conflict introduced by #45 is also resolved now.
setup.py
Outdated
@@ -4,7 +4,7 @@ | |||
import sys | |||
from setuptools import setup, find_packages | |||
|
|||
install_requires=['catkin_pkg >= 0.1.28', 'rosdistro >= 0.5.0', 'rospkg', 'PyYAML', 'setuptools'] | |||
install_requires=['catkin_pkg >= 0.1.28', 'rosdistro >= 0.6.7', 'rospkg', 'PyYAML', 'setuptools'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to bump the minimum version to 0.6.8 (same below)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
c5e3af2
to
107a960
Compare
Thanks. 🚢 |
Pip doesn't do transitive dependencies so we must specify it here. This commit was needed due to ros-infrastructure/rosinstall_generator#44
Since we finished the process of transitioning away from using Bloom, we no longer have release stanzas in our rosdistro repo— it's exclusively tagged source repos. I noticed today that under these circumstances,
rosinstall_generator
was broken at the command line, which we hadn't noticed previously because our build tooling uses it by importing and calling the underlying functions directly (which among other things bypasses a lot of the wet/dry compatibility stuff).Anyway, this fix allows the following invocations to work on a source-only rosdistro where an appropriate source cache is available. Example specifying repos with dependencies:
Example specifying exact package with deps, getting tarballs:
I've also validated that this change doesn't break the
--upstream-development
flag when used with a rosdistro cache that does not include the source package xml cache (such as the one athttp://repositories.ros.org/
).