StatisticalRethinkingJulia / StatisticalRethinking.jl

Julia package with selected functions in the R package `rethinking`. Used in the SR2... projects.
MIT License
386 stars 32 forks source link

Version 0.9.0 without bounds #96

Closed karajan9 closed 4 years ago

karajan9 commented 4 years ago

Version 0.9.0 (which weirdly doesn't have a tag, by the way, I wasn't even aware that's possible) does not seem to have any bounds on its dependencies. This means whenever compat doesn't work out perfectly it installs this version instead. I learned this when I added StatisticalRethinking and instead of adding 2.2.3 and downgrading StatsBase from 0.33.0 to 0.32.2 I got StatisticalRethinking 0.9.0.

I'm not sure if that's fixable (I'm really not a Pkg guru) but if it is it would be great.

Sidenotes: I'm not quite sure why the current version can't be installed, I suspect this open compat PR on Clustering.

When I installed 0.9.0 I also stumbled upon https://github.com/tpapp/DynamicHMC.jl/issues/128 which is (I think) why this broke things for @ym-han over on Zulip.

goedman commented 4 years ago

Yes, I'm not sure when upper bounds became required with Pkg(3), but I believe that was maybe a year or so ago? Way later than Julia 1.0 with Pkg(3) was introduced. In any case, SR 0.9 is simply too old; we need to figure out why it downgraded to SR 0.9.0. I usually try to force a recent version like ] add StatisticalRethinking@2.2.3 to try to debug these version issues.

I'm still somewhat on the fence about all these bounds as I see more and more of these version storms. I think this particular issue is maybe related to the 4.0 upgrade of MCMCChains, since I integrated that (yesterday) I've seen many issues with Turing and Bijectors. On my system, in Julia 1.4, it downgrades to Turing 0.7 (if I don't work in TuringModels as a project).

karajan9 commented 4 years ago

I'm not quite sure why that was any more, I think it was because Pkg prefers to install an older version without bounds instead of a newer version and downgrading one of the dependencies. For example, in the linked issue over at DynamicHMC Pkg refused to downgrade Optim from 0.21 to 0.20 and instead installed some year old version.

I think bounds make things more complicated but I'm not convinced working without bounds is better; there was quite a long discussion about this on Discourse. Anyway, ] add StatisticalRethinking@2.2.3 seems to work well, maybe it's worth to mention that in the readme.