This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GSOC | Extending Common Lisp support


On Jun 1, 2012, at 9:10 PM, Per Bothner wrote:

Jamison, maybe you can put together a patch to use RunTestScript,
including a started test and gnu/commonlisp/testsuite/Makefile.am
changes?


Working on this. The least-intrusive-but-least-extensible way to
get RunTestScript working is just to do this:

Index: gnu/kawa/util/RunTestScript.java
===================================================================
--- gnu/kawa/util/RunTestScript.java	(revision 7243)
+++ gnu/kawa/util/RunTestScript.java	(working copy)
@@ -54,6 +54,7 @@
   List<String> expectedErr = new ArrayList<String>();

   String[] commentSyntaxTable = {
+    "CommonLisp", ";;", "#|", "|#",
     "Scheme", ";;", "#|", "|#",
     "Q2", "#", null, null };


So that works. And I made the Makefile.am change (had to rerun aclocal
and automake and maybe autoconf before configure to get it to actually
change Makefile). But now I'm having a little philosophical dilemma
about how to craft a test script. Should I write to how it should
work, or how it's currently expected to work? I start out with this:

(setq x 42)
;; Diagnostic: warnings.lisp:1:1: warning - no declaration seen for x

So far so good. If I then add


(write x) (newline)
;; Output: 42

and run it, it fails with another "no declaration seen for x" diagnostic
on the (write x) line. That seems to be a difference between running kawa
with or without -f:


$ kawa --diagnostic-strip-directories -f gnu/commonlisp/testsuite/ warnings.lisp
warnings.lisp:1:1: warning - no declaration seen for x
42
$ kawa --diagnostic-strip-directories gnu/commonlisp/testsuite/ warnings.lisp
warnings.lisp:1:1: warning - no declaration seen for x
warnings.lisp:4:8: warning - no declaration seen for x
42


RunTestScript runs kawa like the latter, so fine, we'll add another
Diagnostic line. But if I then add

(defvar list-of-numbers (list 1 2 3))
(defun list-of-numbers (start end)
  (if (> start end)
      nil
    (cons start (list-of-numbers (1+ start) end))))

(write list-of-numbers)

in order to test the different namespaces, I get this other warning, which
seems like a bug:


warnings.lisp:12:1: warning - duplicate declaration for `list-of- numbers'


Especially considering the full -f/no -f output differences:


$ kawa --diagnostic-strip-directories -f gnu/commonlisp/testsuite/ warnings.lisp
warnings.lisp:1:1: warning - no declaration seen for x
42
warnings.lisp:15:17: warning - no declaration seen for list-of-numbers
warnings.lisp:15:34: warning - no declaration seen for 1+
(1 2 3)
$ kawa --diagnostic-strip-directories gnu/commonlisp/testsuite/ warnings.lisp
warnings.lisp:12:1: warning - duplicate declaration for `list-of- numbers'
warnings.lisp:1:1: warning - no declaration seen for x
warnings.lisp:4:8: warning - no declaration seen for x
warnings.lisp:15:17: warning - no declaration seen for list-of-numbers
warnings.lisp:15:34: warning - no declaration seen for 1+
warnings.lisp:17:8: warning - no declaration seen for list-of-numbers
42
#<procedure list-of-numbers>



That looks like running without -f (as RunTestScript does) just doesn't work correctly for Lisp2 languages.


Should we change RunTestScript to pass -f, or try to figure out why it's not respecting the separate namespaces?


-- Jamison Hope The PTR Group www.theptrgroup.com




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]