libmir/numir

Update mir-algorithm dependency to 0.6.6

jmh530 opened this issue · 3 comments

Can the mir-algorithm dependency be updated to 0.6.6?

I bring this up because of a post on the forum. I spent a surprising amount of time going through dub issues before figuring out my issue.

I have a project that directly uses functions from mir-algorithm and numir. My version of mir-algorithm is 0.6.6 and my version of numir is 0.0.4 (Windows 7 using dub, compiling with --compiler=ldmd2).

I get issues similar to either #1001 or #1037 on dub. As far as I can tell, the problem is that numir has an older dependency on mir-algorithm than my copy.

When I updated numir's dub.json to depend on mir-algorithm 0.6.6 and re-built, my code compiled without errors.

I did not submit a pull request myself to change as I have not tested numir to see if everything still works with the latest version.

Another option is changing

    "dependencies": {
        "mir-algorithm": "~>0.4.3",
        "mir-random": "~>0.2.2"
    },

to

    "dependencies": {
        "mir-algorithm": ">=0.4.3",
        "mir-random": ">=0.2.2"
    },

but probably less preferable if backwards compatibility breaks.

Thank you for reporting this! To be honest, I've never take care of dub's version 😞 .

From my understanding, because "~>0.4.3" is ">=0.4.3 <0.5.0", you could not use "0.6.6" (not < 0.5.0 )
(https://code.dlang.org/package-format?lang=json#version-specs)
So how about this?

    "dependencies": {
        "mir-algorithm": ">=0.4.3 <0.7.0",
        "mir-random": ">=0.2.2 <0.3.0"
    }

And I will update the upper bound of version to mir's latest when I release new numir 0.0.x and update lower bound when I release new numir 0.y.0.

I'm planning to add some version compatibility test in .travis.yml

ping @ShigekiKarita See PR#7 for a fix. There were some issues with unittests failing when I bumped up the version. You might consider adding some travis-ci support as in mir-algorithm.

I merged it https://github.com/ShigekiKarita/numir/releases/tag/v0.0.5
now mir-algorithm 0.4.3-0.6.9 and mir-random 0.2.2-0.2.5 is available