catkin / xylem

A tool for resolving dependencies in a platform agnostic way.
Apache License 2.0
1 stars 1 forks source link

Version ranges and geq condition for any_version in rules files #10

Open NikolausDemmel opened 10 years ago

NikolausDemmel commented 10 years ago

Here is a proposal for how to realize this: http://xylem.readthedocs.org/en/latest/spec.html#any-version-and-version-ranges

This does require os plugins to provide an order on versions for rule lookup, but not for rule file loading / expanding / saving.

Feel free to comment / discuss in this issue.

NikolausDemmel commented 10 years ago

cc @wjwwood @tfoote @dirk-thomas @esteve

tfoote commented 10 years ago

Looks reasonable. I'd also clarify on a collision who wins in a case like this:

precise, raring, utopic: [foo]
any_version>=trust: [bar]

Presumably the explicit rule would take precedence.

NikolausDemmel commented 10 years ago

Yes, the explicit rule you win. I do not want to forbid this, since that would again make rule file parsing dependent on the OS plugin knowledge.

One could argue that the test suite for rosdistro could check and forbid this, but I don't see a real need. Also the following seems reasonable to me:

foo:
  osx:
    any_version>=mavericks:
      homebrew: libfoo
    mavericks:
      macports: libfoo-1
    yosemite:
      macports: libfoo-2