[cc-ing gambit's mailing list, so that gambit users/developers can advise us on the recent changes affecting affecting geiser in 4.9.4]
Hi Tara,
On Sun, Jan 16 2022, Tara Lorenz wrote:
Hello all,
i experience a problem with the recently released Gambit 4.9.4. One of the problems is that the builtin geiser module is named differently now, '_geiser' instead of 'gambit/geiser'. The attached patch seems to fix the problem. I have to admit that i didn't test whether older versions of gambit still work though. To make things easy, i renamed the namespace used in the geiser provided scheme-implementation to match the new upstream one. I don't know if this might lead to some controversy.
I don't use gambit myself, but i guess we could just tag a new version of the geiser-gambit package and redirect users having problems to previous geiser-gambit versions. One thing that we should do together with this patch is set geiser-gambit-minimum-version to v4.9.4, though.
I'm waiting a couple of days in case someone sees a problem with that.
The other problem i ran into was, that load-file (C-c C-l) no longer works. It seems to me that including "~~lib/gambit/prim/prim#.scm" isn't enough, 'load' will still be unknown. Thus leading to an error message complaining about an '#!unbound' var where 'load' is expected.
So you patch below doesn't fix this problem, right? Any ideas from other gambit experts? Thanks!
Cheers, jao
Cheers, Tara From 62f4c082a00e16b058da2a7b9d1327d850f884bd Mon Sep 17 00:00:00 2001 From: Tara Lorenz tara@terralonza.de Date: Sat, 15 Jan 2022 21:50:48 +0100 Subject: [PATCH] Adjust to namespace changes in gambit v4.9.4
The namespace (and path) of the builtin geiser module changed from gambit/geiser to _geiser
- geiser-gambit--parameters uses correct builtin module path
- changed namespace for the version shipping with geiser to the same as used in upstream gambit
- changed uses of namespace in geiser-gambit.el accordingly
geiser-gambit.el | 14 +++++++------- src/geiser/gambit.scm | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/geiser-gambit.el b/geiser-gambit.el index f8a80be..fc4f26f 100644 --- a/geiser-gambit.el +++ b/geiser-gambit.el @@ -126,7 +126,7 @@ If t, Geiser will use `next-error' to jump to the error's location." :group 'geiser-gambit)
;;; evaluation support when module loaded at opening -;;; the gambit/geiser# is the namespace of geiser module for gambit +;;; the _geiser# is the namespace of geiser module for gambit (defun geiser-gambit--geiser-procedure (proc &rest args) "Transform PROC in string for a scheme procedure using ARGS." (cl-case proc @@ -139,15 +139,15 @@ If t, Geiser will use `next-error' to jump to the error's location." (concat "'" (car args))) (t "#f")))
(cmd (format "(gambit/geiser#geiser:eval %s '%s)" module form)))
((load-file compile-file)(cmd (format "(_geiser#geiser:eval %s '%s)" module form))) cmd))
(format "(gambit/geiser#geiser:load-file %s)" (car args)))
((no-values)(format "(_geiser#geiser:load-file %s)" (car args)))
"(gambit/geiser#geiser:no-values)")
(t (let ((form (mapconcat 'identity args " ")))"(_geiser#geiser:no-values)")
(format "(gambit/geiser#geiser:%s %s)" proc form)))))
(format "(_geiser#geiser:%s %s)" proc form)))))
;;(defconst geiser-gambit--module-re ;; "( *module +\(([^)]+)\|[^ ]+\)\|( *define-library +\(([^)]+)\|[^ ]+\)") @@ -314,8 +314,8 @@ If t, Geiser will use `next-error' to jump to the error's location." (let* ((v (geiser-gambit--version (geiser-gambit--binary))) (gambit-version (geiser--cut-version v))) (if (version< gambit-version "4.9.4")
- `( "-:d-" ,(expand-file-name "geiser/gambit.scm" geiser-gambit-scheme-dir) "-" )
`("-:d-" "gambit/geiser.scm" "-"))))
- `( "-:d-" ,(expand-file-name "geiser/gambit.scm" geiser-gambit-scheme-dir) "-" )
`("-:d-" "_geiser" "-"))))
;;;###autoload (defun connect-to-gambit () diff --git a/src/geiser/gambit.scm b/src/geiser/gambit.scm index e7c760c..cff56ff 100644 --- a/src/geiser/gambit.scm +++ b/src/geiser/gambit.scm @@ -1,6 +1,6 @@ ;; scheme ;;; gambit.scm gambit geiser interaction -(##namespace ("gambit/geiser#")) ;; in gambit/geiser# +(##namespace ("_geiser#")) ;; in _geiser# (##include "~~lib/gambit#.scm") ;; for macro-check-string, ;; macro-absent-obj, etc
-- 2.34.1
Afficher les réponses par date
Hi Jose,
Jose Antonio Ortega Ruiz jao@gnu.org writes:
[load problem]
So you patch below doesn't fix this problem, right? Any ideas from other gambit experts? Thanks!
right, i left that out. My patch is intended to be applied on the geiser repository only. I found some time to look into that, it seems that adding the line:
(##namespace ("" load))
*after* loading the primitives should fix it. (Still wondering why the code uses the primitive forms. Does speed matter here so much?)
So, as it seems this is only changed needed on the gambit side. I will open a PR on the gambit repo.
Cheers, Tara
Hi Tara
On Thu, Jan 20 2022, Tara Lorenz wrote:
right, i left that out. My patch is intended to be applied on the geiser repository only. I found some time to look into that, it seems that adding the line:
(##namespace ("" load))
*after* loading the primitives should fix it. (Still wondering why the code uses the primitive forms. Does speed matter here so much?)
So, as it seems this is only changed needed on the gambit side. I will open a PR on the gambit repo.
Since nobody has complained, i am fine applying your patch to the geiser-gambit repo, at least to the unstable version in the master branch, and perhaps wait to tag a version until your gambit patch is released... or should we wait for that before merging anything?
Cheers, jao