Lisp-Stat/plot

plot/vglt can't be found

Closed this issue · 23 comments

Trying to install, I cloned the package into "~/quicklisp/local-projects" and ran (ql:quicklisp :plot) and that seems to load fine, though (plot:plot ...) returns error:

The function PLOT:PLOT is undefined.
[Condition of type UNDEFINED-FUNCTION]

If I run (asdf:clear-source-registry), and (ql:quicklisp :plot/vglt) I get an error:

Component :PLOT/VGLT not found
[Condition of type ASDF/FIND-COMPONENT:MISSING-COMPONENT]

I've run and currently run many projects out of ~/quicklisp/local-projects/ just fine...

I imagine this is something simple I seem to be missing, but if it has happened to others, a fix can be stored here.

There isn't a vglt package any longer. It's vega. Try (ql:quickload :plot/vega) and see how you go. Having said that, the fact that something is looking for plot/vglt suggests that you might have the old version somewhere.

Is this working for you now?

I deleted the "plot" package in "~/quicklisp/local-projects/" and re-cloned the package into this folder, ran (ql:quickload :plot) just fine and then when running (ql:quickload :plot/vega) I get:

COMPILE-FILE-ERROR while
compiling #<CL-SOURCE-FILE "plot/vega" "pkgdcl">
[Condition of type UIOP/LISP-BUILD:COMPILE-FILE-ERROR]

Restarts:
0: [RETRY] Retry compiling #<CL-SOURCE-FILE "plot/vega" "pkgdcl">.
1: [ACCEPT] Continue, treating compiling #<CL-SOURCE-FILE "plot/vega" "pkgdcl"> as having been successful.
2: [RETRY] Retry ASDF operation.
3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
4: [RETRY] Retry ASDF operation.
5: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
--more--

Also, sorry for the late response. I appreciate you following up.

Ah, this issue is a known problem with SBCL. See Lisp-Stat/lisp-stat#14. The solution is a one-liner:

( cd ~/common-lisp/ && wget https://asdf.common-lisp.dev/archives/asdf-3.3.5.tar.gz  && tar -xvf asdf-3.3.5.tar.gz && mv asdf-3.3.5 asdf )

Had to change the one liner to:

cd ~/quicklisp/local-projects/ && wget https://asdf.common-lisp.dev/archives/asdf-3.3.5.tar.gz && tar -xvf asdf-3.3.5.tar.gz && mv asdf-3.3.5 asdf

and then run (asdf:load-system :plot/vega). Or in other words, not (ql:quicklisp :plot/vega)

and now I have this:

The value of UIOP/PACKAGE::FROM-PACKAGE is NIL, which is not of type PACKAGE.
[Condition of type SIMPLE-TYPE-ERROR]

Restarts:
0: [STORE-VALUE] Supply a new value for UIOP/PACKAGE::FROM-PACKAGE.
1: [RETRY] Retry compiling #<CL-SOURCE-FILE "plot/vega" "pkgdcl">.
2: [ACCEPT] Continue, treating compiling #<CL-SOURCE-FILE "plot/vega" "pkgdcl"> as having been successful.
3: [RETRY] Retry ASDF operation.
4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
5: [RETRY] Retry ASDF operation.
--more--

Backtrace:
0: (SB-KERNEL:CHECK-TYPE-ERROR UIOP/PACKAGE::FROM-PACKAGE NIL PACKAGE NIL)
1: (UIOP/PACKAGE::ENSURE-IMPORT "DATA" #<PACKAGE "VEGA"> # #<HASH-TABLE :TEST EQUAL :COUNT 0 {1005D65B13}> #<HASH-TABLE :TEST EQUAL :COUNT 1 {1005D65DF3}>)
2: (UIOP/PACKAGE:ENSURE-PACKAGE #:VEGA :NICKNAMES NIL :DOCUMENTATION "A plotting backend for Plot based on Vega. The specification DSL, in PLIST format, is that of Vega-Lite. The data output representat..

I have also not done anything in terms of acquiring vega. I suppose I need to install that somewhere first?

Vega will be downloaded automatically by the browser. Nothing to install there.

Try using quicklisp the first time around to get all the dependencies: (ql:quickload :plot/vega).

When I boot up the computer and immediately open the repl and run (ql:quicklisp :plot/vega) with the same error:

The value of UIOP/PACKAGE::FROM-PACKAGE is NIL, which is not of type PACKAGE.
[Condition of type SIMPLE-TYPE-ERROR]

Restarts:
0: [STORE-VALUE] Supply a new value for UIOP/PACKAGE::FROM-PACKAGE.
1: [RETRY] Retry compiling #<CL-SOURCE-FILE "plot/vega" "pkgdcl">.
2: [ACCEPT] Continue, treating compiling #<CL-SOURCE-FILE "plot/vega" "pkgdcl"> as having been successful.
3: [RETRY] Retry ASDF operation.
4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
5: [RETRY] Retry ASDF operation.
--more--

Should I delete the effects of the one liner, delete the plot package, and start all over at this point?

Not yet. Can you load other packages? For example alexandria?

Yep! (ql:quickload :alexandria) runs fine.

CL-USER> (alexandria:factorial 40)
815915283247897734345611269596115894272000000000 (160 bits)

OK, we'll have to investigate then. Leave the upgraded ASDF in place, as we know that's required. Let's check the version with asdf::*asdf-version*, and please post the contents of pkgdcl.lisp. If you haven't changed anything in plot, leave it alone.

CL-USER> asdf::asdf-version
"3.3.5"

The local variables list in pkgdcl.lisp
contains values that may not be safe (*).

Do you want to apply it? You can type
y -- to apply the local variables list.
n -- to ignore the local variables list.
! -- to apply the local variables list, and permanently mark these
values (*) as safe (in the future, they will be set automatically.)

  • Base : 10
  • Syntax : ANSI-Common-Lisp
  • Package : CL-USER

Haven't seen this one before trying to open an file in emacs..

where is this pkgdcl.lisp? I see one in /src/vega, /src/plot/, and /src/text/.. I assume Vega?

The file is in PLOT:SRC;vega;pkgdcl.lisp

There isn't a vglt package any longer. It's vega. Try (ql:quickload :plot/vega) and see how you go. Having said that, the fact that something is looking for plot/vglt suggests that you might have the old version somewhere.

The README still has a reference to vglt. https://github.com/Lisp-Stat/plot/blob/master/README.md?plain=1#L114

README fixed, thanks.

@pierceglenn12345, can we close this issue? Are you still experiencing problems?

I've got the local-nicknames problem with a stock installation of SBCL 2.2.8.29 and the 2022-07-08, pulling lisp-stat and plot from the repos. Using the one liner helped, but leads to a new problem, for which I will file a new issue. Sure would be nice if this worked out of the box. Any chance of getting SBCL's ASDF updated or not using UIOP's local-nicknames syntax?

Sigh. The intention is that this should work 'out of the box', but SBCL's reticence to upgrade ASDF means this may not be possible. I'm going to post on the SBCL developer list asking about upgrading ASDF. If you can chime in with some support, perhaps that will help. If they're not helpful, I'll back-out the PLN. It's just a couple of lines, but frustrating because I've been removing nicknames from some of the packages to try and do things the 'right' way (with PLN).

Yeah, I'd like to see an upgrade to ASDF in SBCL. Not sure why stassats is so against it, but, then again, he's likely to be the one to feel any pain of doing so.

I think the best option is going to be to not use PLN. It's a few lines of code to change. I'll put it on my queue of things to do, but my day-job is keeping me rather busy at the moment, so it might be a while. @pierceglenn12345, are things working for you?

I've just committed a change to remove package local nicknames to close this issue. @pierceglenn12345, please open a new issue if you have further problems.