-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
rosdep: Added m2r package #35827
rosdep: Added m2r package #35827
Conversation
e13f61b
to
ad9e708
Compare
I had to force version 0.2.1 in pip on bionic because the newest version can be installed, but it is broken (probably python3-only, but released to python 2). I think the syntax I used should work, but I'm apparently the first one to do it so I'm rather checking if you think the same. |
Hmm, this is the output of rosdep install with the PR:
Apparently installing the package is not a problem, but verifying installation is. |
Solution for the pip version constraint provided in ros-infrastructure/rosdep#909 . |
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.
Two things here:
- This seems to be a python package, so I would have expected this to be in rosdep/python.yaml.
- The upstream repository is now archived and says "no more updates". Should we really be adding this in at this time?
Alternatively, there is https://github.com/CrossNox/m2r2 which is a fork updated for newer versions of Sphinx. This could be used for the Python 3.7+ distros, but not for Python 2.7 (bionic) or Python 3.6 (focal). m2r2 says it is API-compatible with m2r, although it might be compatible with slightly different versions of tooling (regarding Sphinx, I'm not sure if it's compatible with Sphinx 1, or only with Sphinx 2). So, what about the following? m2r:
alpine:
pip:
packages: [m2r2]
arch:
pip:
packages: [m2r2]
debian:
'*': [m2r]
buster:
pip:
packages: ['m2r<0.3']
fedora: [python3-m2r]
gentoo:
pip:
packages: [m2r2]
nixos: [m2r]
opensuse: [python3-m2r]
osx:
pip:
packages: [m2r2]
ubuntu:
'*': [m2r]
bionic:
pip:
packages: ['m2r<0.3'] This would use distro packages for m2r where available, m2r2 on the "rolling" distros which tend to be very up-to-date, and pip m2r < 0.3 for bionic and focal which use Python 2.7 (still pending ros-infrastructure/rosdep#909). |
@peci1 this turned into something of a big one, thanks for your patience while we review it.
This is, I think a bit of a gut-call. I tend to follow Debian's lead, if the Debian package is
I flagged this in my review comments before catching up on the conversation that you tested and found the same results (and submitted a PR which potentially fixes it!) yourself. In order to review the rest of this change without a significant review and release on the rosdep side I still advocate removing this form, and thus, leaving this key undefined on bionic.
Unless m2r2 is a drop in replacement which provides a compatible |
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.
One of the key definitions is not compatible with current versions of rosdep and should not be merged at this time. The rest looks good as is.
rosdep/base.yaml
Outdated
'*': [m2r] | ||
bionic: | ||
pip: | ||
packages: ['m2r<0.3'] |
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.
packages: ['m2r<0.3'] | |
packages: ['m2r'] |
This form will not error during rosdep install
but rosdep does not support detecting this as installed. If the "current" version of m2r does not work on Bionic and there is no packaged version, I think the best thing is leaving it undefined.
Thanks for the extensive feedback, @nuclearsandwich ;)
No problem, I'll move it there.
One more idea: I could create a rdmanifest file in some of our repos and specify
Ah, right, I've missed that there would be a name difference... It is API compatible, but up to this "detail" :) I'll thus make one m2r-only key and one m2r2-only. |
I am boring and prefer to keep things conventional. But I appreciate the amount of effort being put in to making this dependency available wherever possible even if "unconventional". My advice is: if you're not going to be the one using this dependency on the affected platforms, then leaving it blank for now is the way to go. If you're working to support these platforms because you need that support there, it's another matter entirely. I would lean toward a solution that above all else: does not require a user running In either, case you always have the option of using custom rosdep sources in addition to the upstream sources in your project! Since these are pip/source dependencies any way there is no way to use them in the official ROS package builds.
Yeah, my guiding principle here is that if the source code / package itself has to be aware of the difference between two different dependency solutions then those should be different rosdep keys. |
I actually am the one who wants to use it =) And since Melodic EOL is coming, I'd like to leave the project in a good shape before the EOL.
I have the impression that source installs are handled "out of the box" by rosdep (only the buildfarm ignores them). Or am I wrong?
What do you mean by unusual? The proposed rdmanifest would just run something like
Sure.
I agree. You as a maintainer have the last word and I think we've already discussed everything related. So please go on and give a definitive decision whether the bionic/buster keys should be added or not. |
I have no problem admitting that my own experience is so concentrated on the build farm delivery that I have no idea. All rosdistro PRs require two reviewers and I think it's time for me to call in backup early. @cottsay do you have more experience with the
I appreciate the acknowledgement. I'm definitely not trying to wear you down but also recognize that this has been a long one. My motivation for asking whether you were going to be using the atypical definitions was to figure out whether continuing to iterate was worthwhile. Since you are and you're trying to set Melodic packages up to go out with up-to-date support, I do not want to shut that down prematurely. If the discussion is blocking forward progress elsewhere, we could split the buster and bionic handling into a follow-up PR. |
@peci1 how do you want to proceed here. Due to rosdep's current behavior. I don't think that the official definitions can include a version discriminator in the key definition. My preference would be to leave the key undefined in the official sources if the later versions are unsuitable on bionic, and allow you and others who need it to add it in via custom sources. |
I have none, sorry :( |
I think the proposed solution is the best now taking into account Melodic EOL. I'll update the PR. |
I've updated the PR as suggested. |
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.
Somehow managed to dismiss my own review. It does require a second to merge.
Please add the following dependency to the rosdep database.
Package name:
m2r
Package Upstream Source:
https://github.com/miyakogi/m2r
Purpose of using this:
This package allows including Markdown files in RST docs, as e.g. mentioned here: https://stackoverflow.com/a/46012023/1076564 .
Links to Distribution Packages
penSUSE: python-cbor2
Checks