paclets / PacletServer

A paclet server for Mathematica
https://paclets.github.io/PacletServer/
29 stars 8 forks source link

Which *Mathematica* versions are supported by `PublicPacletInstall`? #47

Closed jkuczm closed 5 years ago

jkuczm commented 5 years ago

GeneralUtilities` package is not loaded at startup in 10.0, 10.4 versions that I have. This doesn't prevent paclets from being installed, but GeneralUtilities`WithMessageHandler[Paclet[...], ...] expression is returned instead of Paclet[...] expression as result of PublicPacletInstall call.

Is there a reason not to include Needs@"GeneralUtilities`" somewhere inside PublicPacletInstall package? I think it would solve this issue.


StringEndsQ was introduced in 10.1. StringEndsQ[loc, pacletFileName] test used in downloadRawPacletsToo prevents paclets from being installed in version 10.0. Using something like StringMatchQ[loc, ___ ~~ pacletFileName ~~ EndOfString] instead, should make it work.

b3m2a1 commented 5 years ago

Tried to include both of these. I've only got a copy of 11.3 so we'll see what happens.

jkuczm commented 5 years ago

Now it works in all 10+ versions.

I forgot that while System`StringEndsQ was introduced in version 10.1, but GeneralUtilities`StringEndsQ exists in 10.0. Sorry for that. So whole If[! NameQ["StringEndsQ"], ...] is not necessary, since Needs@"GeneralUtilities`" loads version of StringEndsQ.

b3m2a1 commented 5 years ago

@jkuczm Eh it doesn't hurt to have it I guess. It's just a dead code path. If you think this issue has run its course feel free to close it. If there's other stuff to discuss leave it open.