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

Possible mistake in [[compat]] docs #1454

Closed
dehann opened this issue Oct 17, 2019 · 9 comments
Closed

Possible mistake in [[compat]] docs #1454

dehann opened this issue Oct 17, 2019 · 9 comments

Comments

@dehann
Copy link
Contributor

dehann commented Oct 17, 2019

With the recent zeptodoctor auto-merging, I was forced back to the Pkg.jl docs and found this part to be confusing:

[compat]
Example = "1.2, 2"

will result in [1.2.0, 3.0.0).

Since I get error messages locally that would suggest the actual behavior is in fact (not as advertised):

Example = [1.2.0-1.3.0, 2.0.0-3.0.0]

but not any of the versions including 1.3.1, 1.4, 1.5, ....

EDIT: Perhaps its specific to the leading zero case -- i.e. ExampleB = 0.2, 1

It might be a bug or documentation error, but after some trail and error I have been forced to do this (and is really the only way I could get broad version apertures):
https://github.com/JuliaRobotics/IncrementalInference.jl/pull/414/files#diff-910a7b3ca0075d545dcec45cb7335ca9R47

Part of the problem might be that the following case is not documented either:

Example = "^0.1" == "0.1.0-0.2.0"

My current understanding is that there is no way to define a compatibility which stretches from
0.x through 1.0 or 1.x
or is there and I'm just not finding it?

Reference

In the docs just above this:
https://julialang.github.io/Pkg.jl/v1/compatibility/index.html#Caret-specifiers-1

  • I'm on Julia 1.2
@DilumAluthge
Copy link
Member

Your issue here is specific to the leading zero case.

@DilumAluthge
Copy link
Member

What compat range are you trying to use?

@DilumAluthge
Copy link
Member

I suspect that #1410 will meet your needs. But that PR is not ready yet.

@DilumAluthge
Copy link
Member

If you need to document 0.x through 1.x, you’ll need to list out all of the breaking versions, for example 0.5, 0.6, 0.7, 0.8, 1.0, 1.1, 1.2, 1.3

@DilumAluthge
Copy link
Member

DilumAluthge commented Oct 17, 2019

But ask yourself: do I really need to maintain compatibility with all of those different versions? Can’t I just drop compat for the 0.x versions and use a nice simple compat entry such as ^1.0.0?

@DilumAluthge
Copy link
Member

^1.0.0 means that you are compatible with 1.0, 1.1, 1.2, 1.3, and so on. But you are not compatible with 2.0.

@dehann
Copy link
Contributor Author

dehann commented Oct 17, 2019

Out of roughly 100 package dependencies, most of them are still in the v0.x range, and all moving along day by day. That means I need to write long lists of dependencies which randomly need to be updated. I still think there should probably be an option for easily scoping [0.x, 1.0]. But also, the current docs are somewhat misleading regarding a leading zero or not.

@DilumAluthge
Copy link
Member

I still think there should probably be an option for easily scoping [0.x, 1.0].

#1410

@dehann
Copy link
Contributor Author

dehann commented Oct 21, 2019

oh great, thanks! That's much simpler to work with!

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

No branches or pull requests

2 participants