Newly downloaded tests for exercise is failing to run in sbcl

So I’m just starting out. I have solved a couple of exercises with the web editor. Now I’ve downloaded my solution for pizza-pi and want to try and run the tests with sbcl. Can’t get this simple thing to work. :slight_smile:

(load “pizza-pi-test”) runs fine and returns T (true I guess?).

(pizza-pi-test:run-tests) fails saying “Package PIZZA-PI-TEST does not exist.”.

What might I be missing here? Any ideas?

How did you download your solution?
Does pizza-pi-test.lisp contain this line?

(defpackage :pizza-pi-test

I downloaded my solution using the exercism comman line tool. And pizza-pi-test.lisp contains thing. (invocation? function call?)

(defpackage :pizza-pi-test
  (:use :cl :fiveam :pizza-pi)
  (:export :run-tests))

Not sure what might be going on. I just tried it myself and it works.

Here is what I see when I evaluate (load "pizza-pi-test")

* (load "pizza-pi-test")
To load "fiveam":
  Load 1 ASDF system:
    fiveam
; Loading "fiveam"

T

Do you get any different output?

Then evaluating (pizza-pi-test:run-tests) produces:

* (pizza-pi-test:run-tests)

Running test suite PIZZA-PI-SUITE
 Running test DOUGH-RATIO .....
 Running test SPLASH-OF-SAUCES ..........
 Running test CHEESE-PLEASE .....
 Running test FAIR-SHARE ..........
 Did 30 checks.
    Pass: 30 (100%)
    Skip: 0 ( 0%)
    Fail: 0 ( 0%)

T
NIL
NIL

NOTE I ran sbcl with the following command-line sbcl --no-userinit --load ~/.quicklisp/setup.lisp to ensure that nothing in my .sbclrc was doing anything. Without loading quicklisp loading pizza-pi-test will not work.

I’m assuming that you have SBCL set up to load quicklisp when it is started…

Something is wrong with my quicklisp install it seems. I have installed it by doing (quicklisp-quickstart:install). Then to load it on startup (ql:add-to-init-file). .sbclrc contains:

#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
                                       (user-homedir-pathname))))
  (when (probe-file quicklisp-init)
    (load quicklisp-init)))

When I do (load pizza-pi-test) I do not get the same out put as you. I just get a singe T. I’m a bit lost here. Can you see what’s wrong with my setup?

Have you read Installing Common Lisp locally?

No, I had not, but have now. I’ll try to install with Roswell. However, I don’t think that’s a requirement to get this to work. Installing sbcl and quicklisp seemed easy enough, but I clearly have done something wrong.

I hope you can figure out what is going wrong. If you do, please let me know, perhaps the track’s code or documentation can be improved to catch this case.

Unfortunately I couldn’t figure out what was wrong. I hadn’t used roswell to install sbcl. I installed it using apt on Ubuntu. I also installed quicklisp using the instructions on their site. To me that seemed to be the only thing I needed to do. But that was wrong since I couldn’t get the tests to run.

However, installing sbcl with roswell worked right out of the box, so that’s what I’m using now.

Very odd. I personally don’t use Roswell. I still SBCL via homebrew on Mac.

One question I never asked - what version of SBCL was being installed originally? Maybe something weird there?

This is the version on Ubuntu 22.04:

$ apt-cache show sbcl | grep Version
Version: 2:2.1.11-1

SBCL is up to v 2.5.0 as of just recently. Out of curiosity what version of SBCL did Roswell install?

Rowsell installed 2.5.0:

$ ros run -- --version
SBCL 2.5.0.roswell