fukamachi / rove

#1=(yet another . #1#) common lisp testing library
BSD 3-Clause "New" or "Revised" License
152 stars 20 forks source link

The name nil does not designate any package. #30

Open arichiardi opened 5 years ago

arichiardi commented 5 years ago

Hi there, thanks for this nice package :smile:

I am trying rove and cheked out the latest version. In SBCL, when I do:

(defpackage #:resource-graph-test
  (:use :cl :resource-graph :rove))

(in-package :resource-graph-test)

(deftest path-test
  (testing "testing path splitting"
    (progn
      (ok (equal 1 0)))))

(run-suite *package*)

I receive:

The name nil does not designate any package.
   [Condition of type package-does-not-exist]
...
 0: (sb-int:%find-package-or-lose nil)
 1: (sb-int:find-undeleted-package-or-lose nil)
 2: (intern "spec-reporter" nil)
 3: (rove/reporter::make-reporter :spec :stream nil)
 4: (rove/reporter:use-reporter :spec)
 5: (sb-fasl::load-fasl-group #S(sb-fasl::fasl-input :stream #<sb-sys:fd-stream for "file /home/kapitan/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/kapitan/git/rove/main.fasl" {1003BD3EE3}> :table #(332 ..
 6: (sb-fasl::load-as-fasl #<sb-sys:fd-stream for "file /home/kapitan/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/kapitan/git/rove/main.fasl" {1003BD3EE3}> nil nil)
 7: ((flet sb-fasl::thunk :in load))
 8: (sb-fasl::call-with-load-bindings #<closure (flet sb-fasl::thunk :in load) {7F1D8F0B4A5B}> #<sb-sys:fd-stream for "file /home/kapitan/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/kapitan/git/rove/main..
 9: ((flet sb-fasl::load-stream :in load) #<sb-sys:fd-stream for "file /home/kapitan/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/kapitan/git/rove/main.fasl" {1003BD3EE3}> t)
10: (load #P"/home/kapitan/.cache/common-lisp/sbcl-1.5.8-linux-x64/home/kapitan/git/rove/main.fasl" :verbose nil :print nil :if-does-not-exist t :external-format :default)
11: (uiop/utility:call-with-muffled-conditions #<closure (lambda nil :in uiop/lisp-build:load*) {1003BD2EAB}> ("Overwriting already existing readtable ~S." #(#:finalizers-off-warning :asdf-finalizers)))
12: ((sb-pcl::emf asdf/action:perform) #<unused argument> #<unused argument> #<asdf/lisp-action:load-op > #<asdf/lisp-action:cl-source-file "rove/main" "lisp">)
13: ((lambda nil :in asdf/action:call-while-visiting-action))
14: ((:method asdf/action:perform-with-restarts (asdf/lisp-action:load-op asdf/lisp-action:cl-source-file)) #<asdf/lisp-action:load-op > #<asdf/lisp-action:cl-source-file "rove/main" "lisp">) [fast-method..
15: ((:method asdf/action:perform-with-restarts :around (t t)) #<asdf/lisp-action:load-op > #<asdf/lisp-action:cl-source-file "rove/main" "lisp">) [fast-method]
16: ((:method asdf/plan:perform-plan (t)) #<asdf/plan:sequential-plan {10038BBD83}>) [fast-method]
17: ((flet sb-c::with-it :in sb-c::%with-compilation-unit))
18: ((:method asdf/plan:perform-plan :around (t)) #<asdf/plan:sequential-plan {10038BBD83}>) [fast-method]
19: ((:method asdf/operate:operate (asdf/operation:operation asdf/component:component)) #<asdf/lisp-action:load-op > #<asdf/system:system "kasa/test"> :plan-class nil :plan-options nil) [fast-method]
 --more--

I am also just starting with Common Lisp so I might be missing something here. Any feedback is appreciated.

Thank you again!

arichiardi commented 5 years ago

I debugged a bit and at the REPL this looks like:

cl-user> (ql:quickload (string-downcase "rove/reporter/spec"))
spec"))
To load "rove/reporter/spec":
  Load 1 ASDF system:
    rove/reporter/spec
; Loading "rove/reporter/spec"

("rove/reporter/spec")

cl-user> (find-package "rove/reporter/spec")

It seems that in my case the line at this line returns nil.

I am newbie enough to stop here as I can't yet understand how packages works and why it is no finding it :smile:

arichiardi commented 5 years ago

Oh I found what would work there:

(find-package :rove/reporter/spec)
#<package "ROVE/REPORTER/SPEC">
arichiardi commented 5 years ago

Ok I patched that file but now I see:

There is no class named rove/reporter/spec::|spec-reporter|.

...

It seems it comes from a couple of down further down.

fukamachi commented 5 years ago

I suppose that your Lisp is set *print-case* as :downcase. Converting the symbol to upcased one would work on such an environment, but wouldn't with modern-mode (case-sensitive reader), which Allegro CL has. I'm considering another solution.

arichiardi commented 5 years ago

Oh, yes it does, I have even forgot about that 😅

Please feel free to dismiss this one for sure, I learned something and I am happy 😉