SciNim / nimblas

BLAS for Nim
http://scinim.github.io/nimblas
Apache License 2.0
42 stars 5 forks source link

nimblas >= 0.2.2 requires nim > 0.19.9 #7

Closed xbello closed 5 years ago

xbello commented 5 years ago

I have installed the latest stable Nim (0.19.4). I installed Arraymancer, that requires nimblas >= 0.2.1, thus installing the latest nimblas 0.2.2. The issue is that commit https://github.com/unicredit/nimblas/commit/3e3af262de5daec809322543f5f64b7b31db8a3b includes a lot of Complex32, Complex64 and procs from the complex module that are only available in the latest (and devel) branch of Nim, i.e. 0.19.9, ant not in the stable release.

I think that nimblas 0.2.2 should require "nim >= 0.19.9" in its nimblas.nimble file, or it's going to break other packages. Currently it states that "nim >= 0.11.2" is enough which is no longer true.

andreaferretti commented 5 years ago

Sorry, my bad, I did not realize that that PR had a dependency on such a recent version of Nim, otherwise I would have postponed its acceptance.

I am not sure what is the best thing to do now that 0.2.2 is tagged anyway. Maybe I should add "nim >= 0.19.9" in the requirements and tag a new 0.2.3 version?

xbello commented 5 years ago

Honestly, I don't know either. I was looking at this https://help.github.com/en/articles/editing-and-deleting-releases, deleting the current 0.2.2 release, adding the nim >= 0.19.9 requirement, and re-release it.

andreaferretti commented 5 years ago

Ok, I tried that. Let me know if it works (you may have to nimble uninstall nimblas before doing that)

mratsim commented 5 years ago

Arraymancer will work with Nim devel, but my CI is broken :/.

andreaferretti commented 5 years ago

Sorry for that! :-( Is there a way to selectively depend on a different version? Something like

if nimVersion >= "0.19.9:
  require "nimblas >= 0.2.2"
else:
  require "nimblas 0.2.1"

At least for a transition period.

Otherwise, if you have any suggestion, I am open, but I am not sure how to fix this once that PR has been accepted

andreaferretti commented 5 years ago

Maybe I could wrap the new imports added by @chimez with a block like

when nimVersion >= "0.19.9":
xbello commented 5 years ago

Ok, I tried that. Let me know if it works (you may have to nimble uninstall nimblas before doing that)

It fails, but correctly: "nimblas 0.2.2 needs 0.19.9". At least I know that I have to install an older nimblas or a newer Nim and try again. I think now the problem is at Arraymancer, that should pin nimblas version to 0.2.1 if they want to keep "nim >= 0.19.0", or require "nim >= 0.19.9".

andreaferretti commented 5 years ago

Uhm, I hoped that nimble algorithm for resolving dependencies was smarter and would try nimblas 0.2.1.

@mratsim @xbello what do you suggest to do at this point?