Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#279 When loading .fas a symbol is referenced by name with different case

Stable_release
open
nobody
None
1
2014-06-18
2013-12-09
Anton Vodonosov
No

In the cl-mongo project there is a constant +mongo-port+.

When we compile cl-mongo - everything is OK.
But when we later load compile .fas file, error happens "The variable |+mongo-port+| is unbound."

Two important nuances

1

The cl-mongo source code spells they symbol name in different cases sometimes:

(defconstant +mongo-port+ 27017)
  ;;...
(defvar *mongo-default-port* +MONGO-PORT+ "port for the default connection.")
  ;; ...
(defun switch-default-connection (name &key (host "localhost") (db "test") (port +MONGO-PORT+))
  ;; ...
  )

This by itself should not cause problems in default reader mode.

2

The error only happens when we recompile all the cl-mongo dependencies, together with cl-mongo. It looks like some of the dependency library compilation has a side-effect on the compiler, so that the .fas file produced can not be loaded later.

The steps to reproduce.

First, install exactly the same quicklisp version where I observe the bug:

curl -O http://beta.quicklisp.org/quicklisp.lisp

(load "quicklisp.lisp")
(quicklisp-quickstart:install :path "quicklisp-temp/")
(ql-dist:install-dist "http://beta.quicklisp.org/dist/quicklisp/2013-11-11/distinfo.txt" :replace t :prompt nil)
(quit)

Now we have this quicklisp installed in the directory quicklisp-temp. Lets reproduce the problem:

rm -rf ~/.cache/common-lisp/ecl*
~/lisps/ecl-bin-44c86e08/bin/ecl -norc -load quicklisp-temp/setup.lisp -eval '(ql:quickload :cl-mongo)' -eval '(quit)'
;;
;; lot of output
;;
The variable |+mongo-port+| is unbound..

References

The version of cl-mongo where the problem happens can be browsed at github at this URL:
https://github.com/fons/cl-mongo/tree/bb1f807a17c960dc81bebd5e8a2df5d0886d422a

Discussion


Anonymous


Cancel   Add attachments