adam-singer / dart-carte-du-jour

Pub documentation generation system
www.dartdocs.org
Other
25 stars 8 forks source link

Find the latest version #26

Closed hanguokai closed 10 years ago

hanguokai commented 10 years ago

We can't depends on the order of versions list. I guess the return version list is just alphabetical order by String, not by version. For examples, 0.10 is in front of 0.2.

    "versions": [
        "0.10.0",
        "0.2.10+1",
        "0.2.7+0",
        ...
   ]

Currently, the code just get list.last, it maybe not correct. To find the correct latest version, we may need to parse version string to a Version object.

adam-singer commented 10 years ago

@hanguokai do you know if there are any libraries for dealing with semantic versioning in dart? The current code was enough to get a prototype going, this is a great bug find.

adam-singer commented 10 years ago

version.dart looks like a good file to use

adam-singer commented 10 years ago

@hanguokai added the pub version.dart library https://github.com/financeCoding/dart-carte-du-jour/commit/fae2075860c699753753f7e613828b1e339cc5c8

jmesserly commented 10 years ago

fyi, I noticed that "quiver" seems a bit off, order is:

0.8.0 0.7.0 0.6.1 0.6.0 0.5.0 0.3.0 0.18.2 0.18.1 0.18.0-dev 0.18.0 0.17.0 0.15.0 0.14.0+docs 0.14.0 0.13.0 0.12.3 0.12.2 0.12.1 0.12.0 0.11.0 0.10.4 0.10.3 0.10.2 0.10.0 0.1.0

Wonder if it's missing this fix?

jmesserly commented 10 years ago

p.s. This. Project. Is. Awesome. :+1:

adam-singer commented 10 years ago

@jmesserly the functionality is there but the sort is not being called before creating the index.html page. https://github.com/financeCoding/dart-carte-du-jour/issues/49

Should be able to take care of this tonight.