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

REQUIRE version specification syntax is a common source of confusion #7763

Closed
ssfrr opened this issue Jul 28, 2014 · 5 comments
Closed

REQUIRE version specification syntax is a common source of confusion #7763

ssfrr opened this issue Jul 28, 2014 · 5 comments
Labels
packages Package management and loading

Comments

@ssfrr
Copy link
Contributor

ssfrr commented Jul 28, 2014

in #7757 @IainNZ brought up that the REQUIRE syntax is a source of confusion for a pretty large number of people, so I figured it might be worth an issue to brainstorm.

see https://pythonhosted.org/setuptools/pkg_resources.html#requirement-objects for how setuptools in python parses package requirements.

https://pythonhosted.org/setuptools/pkg_resources.html#parsing-utilities describes how version numbers comparison works (e.g. trailing .0s are dropped, so 2.4 is equivalent to 2.4.0)

Certainly complicates the parser, but at least there's a formal spec given.

In the interest of having an example in the thread:

FooProject >= 1.2
PickyThing<=1.6,!=1.9.6,<2.0,==2.4.0
SomethingWhoseVersionIDontCareAbout

This would describe that FooProject had to be 1.2.0 or greater, PickyThing could be anything from 1.6.0(inclusive) to 2.0.0(non inclusive), except for 1.9.6. 2.4.0 is OK too. SomethingWhoseVersionIDontCareAbout can be any version.

In general I wouldn't expect most packages to need this much specificity, and the currently common

julia 0.3-

would become

julia >=0.3

(though this wouldn't catch 0.3-rc1 if we're following the same parsing rules as python)

@shashi
Copy link
Contributor

shashi commented Jul 29, 2014

I think for me the reason for confusion (cc #7757) was that the documentation doesn't make it very clear. Quoting from http://julia.readthedocs.org/en/latest/manual/packages/#requirements

For example, the line:
Distributions 0.1
is satisfied by any version of Distributions greater than or equal to 0.1.0.

I thought that 0.3-rc1 is >= 0.3.0 although upon reflection I realised I was wrong.

The only reference to Package 0.3- syntax is in the docs is:

If you want to indicate that any 0.1.x version will do, you will want to write:
Distributions 0.1 0.2-
The 0.2- “pseudo-version” is less than all real version numbers that start with 0.2.

It takes quite some effort to infer from this what Distributions 0.2- alone would do.

Improving the docs can be a first step here, although I'd have liked explicit intervals like (0.1 0.2] etc.

@jiahao jiahao changed the title REQUIRE version specificaion syntax is a common source of confusion REQUIRE version specification syntax is a common source of confusion Jul 30, 2014
@StefanKarpinski
Copy link
Member

It takes quite some effort to infer from this what Distributions 0.2- alone would do.

I guess this may not be entirely obvious, after all. Please feel free to add some verbiage to clarify it.

@jakebolewski
Copy link
Member

@tkelman I think you may want to tackle this one for your own sanity

@tkelman
Copy link
Contributor

tkelman commented Oct 16, 2015

The current format is beyond fixing. Explaining it more won't suddenly fix the broken intuition people have about it. Should eventually be replaced with a more verbose specification, a la #11955

@jakebolewski
Copy link
Member

I agree, closing this issue in favor of #11955.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages Package management and loading
Projects
None yet
Development

No branches or pull requests

6 participants