#6 wildcard versions
Closed: Fixed 7 years ago Opened 7 years ago by ignatenkobrain.

Wildcard requirements allow for any version where the wildcard is positioned.

*, 1.* and 1.2.* are examples of wildcard requirements.

* := >=0.0.0
1.* := >=1.0.0 <2.0.0
1.2.* := >=1.2.0 <1.3.0

What's the difference between this one and tilde? I can't see difference from first glance in examples.

With a tilde there's the example ~1.2.3 := >=1.2.3 <1.3.0, which you can't do with a wildcard. But I think you could normalize wildcards into tilde form and work from there, except maybe the total * case.

FWIW, crates.io doesn't allow publishing wildcard dependencies anymore.
http://doc.crates.io/faq.html#can-libraries-use--as-a-version-for-their-dependencies

@jistone they disallow only *, but 1.* will still work out.

OK, but 1.* is easily mapped to ~1, and 1.2.* to ~1.2.

@jistone yeah, so normalizing should be done easily ;) I'll make sure to find volunteer on meeting ;)

Log in to comment on this ticket.

Metadata