Re: GNU G-Golf 0.8.0-rc-3 available for testing

"pelzflorian (Florian Pelz)" <[email protected]>
Newsgroups gmane.lisp.guile.user
Message-ID <[email protected]>
Hi David.  It is interesting that pygobject has more C.

I tried adw1-demo.scm with the attached patch to replace
(current-filename), which would return #f so (dirname) throws.

It fails because it cannot find namespaces.  Guix uses libadwaita 1.4.0.
Is it too old?

florian@florianhp ~/src/g-golf/examples/adw-1 [env]$ ./adw1-demo.scm 
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/florian/src/g-golf/examples/adw-1/./adw1-demo.scm
;;; compiling /home/florian/src/g-golf/examples/adw-1/adw1-demo/window.scm
;;; compiling /home/florian/src/g-golf/examples/adw-1/adw1-demo/navigation-view.scm
;;; compiling /home/florian/src/g-golf/examples/adw-1/adw1-demo/navigation-view-demo-dialog.scm
;;; WARNING: compilation of /home/florian/src/g-golf/examples/adw-1/adw1-demo/navigation-view-demo-dialog.scm failed:
;;; No such namespace name:  "Adw" "Dialog"
;;; WARNING: compilation of /home/florian/src/g-golf/examples/adw-1/adw1-demo/navigation-view.scm failed:
;;; No such namespace name:  "Adw" "Dialog"
;;; WARNING: compilation of /home/florian/src/g-golf/examples/adw-1/adw1-demo/window.scm failed:
;;; No such namespace name:  "Adw" "Dialog"
;;; compiling /home/florian/src/g-golf/examples/adw-1/adw1-demo/style-classes.scm
;;; compiling /home/florian/src/g-golf/examples/adw-1/adw1-demo/style-classes-demo-dialog.scm
;;; WARNING: compilation of /home/florian/src/g-golf/examples/adw-1/adw1-demo/style-classes-demo-dialog.scm failed:
;;; No such namespace name:  "Adw" "Dialog"
;;; WARNING: compilation of /home/florian/src/g-golf/examples/adw-1/adw1-demo/style-classes.scm failed:
;;; No such namespace name:  "Adw" "Dialog"
;;; compiling /home/florian/src/g-golf/examples/adw-1/adw1-demo/dialogs.scm
;;; WARNING: compilation of /home/florian/src/g-golf/examples/adw-1/adw1-demo/dialogs.scm failed:
;;; No such namespace name:  "Adw" "AlertDialog"
;;; WARNING: compilation of /home/florian/src/g-golf/examples/adw-1/./adw1-demo.scm failed:
;;; No such namespace name:  "Adw" "AlertDialog"
Backtrace:
In ice-9/boot-9.scm:
  1752:10  7 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
           6 (apply-smob/0 #<thunk 7f7028915300>)
In ice-9/boot-9.scm:
    724:2  5 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
In ice-9/eval.scm:
    619:8  4 (_ #(#(#<directory (guile-user) 7f7028918c80>)))
    619:8  3 (_ #(#(#(#<directory (guile-user) 7f7028918c80>)) #<<…>))
    163:9  2 (_ #(#(#(#<directory (guile-user) 7f7028918c80>)) #<<…>))
   223:20  1 (proc #(#(#(#<directory (guile-user) 7f7028918c80>)) #))
In unknown file:
           0 (%resolve-variable (7 . show-window) #<directory (guile…>)

ERROR: In procedure %resolve-variable:
Unbound variable: show-window

Regards,
Florian
Change-current-filename.patch (text/x-patch, 6.8 KB)
From 9498143bf954971fe98873188169b1580209491d Mon Sep 17 00:00:00 2001
From: Florian Pelz <[email protected]>
Date: Wed, 8 May 2024 12:11:44 +0200
Subject: [PATCH] Change current-filename.

---
 examples/adw-1/adw1-demo.scm                             | 2 +-
 examples/adw-1/adw1-demo/animations.scm                  | 2 +-
 examples/adw-1/adw1-demo/dialogs.scm                     | 2 +-
 examples/adw-1/adw1-demo/navigation-view-demo-dialog.scm | 2 +-
 examples/adw-1/adw1-demo/navigation-view.scm             | 2 +-
 examples/adw-1/adw1-demo/preferences.scm                 | 2 +-
 examples/adw-1/adw1-demo/style-classes-demo-dialog.scm   | 2 +-
 examples/adw-1/adw1-demo/style-classes.scm               | 2 +-
 examples/adw-1/adw1-demo/welcome.scm                     | 2 +-
 examples/adw-1/adw1-demo/window.scm                      | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/examples/adw-1/adw1-demo.scm b/examples/adw-1/adw1-demo.scm
index 485c49b..d07e6fd 100755
--- a/examples/adw-1/adw1-demo.scm
+++ b/examples/adw-1/adw1-demo.scm
@@ -45,7 +45,7 @@ exec guile -e main -s "$0" "$@"
 
 
 (add-to-load-path
- (dirname (current-filename)))
+ (dirname "/home/florian/src/g-golf/examples/adw-1/adw1-demo.scm"))
 
 (use-modules (adw1-demo window))
 
diff --git a/examples/adw-1/adw1-demo/animations.scm b/examples/adw-1/adw1-demo/animations.scm
index 0ac8842..7a0b859 100644
--- a/examples/adw-1/adw1-demo/animations.scm
+++ b/examples/adw-1/adw1-demo/animations.scm
@@ -143,7 +143,7 @@
   (spring-animation-clamp-switch #:child-id "spring-animation-clamp-switch"
                                  #:accessor !spring-animation-clamp-switch)
   ;; class options
-  #:template (string-append (dirname (current-filename))
+  #:template (string-append (dirname "/home/florian/src/g-golf/examples/adw-1/adw1-demo/x")
                             "/ui/animations.ui")
   #:child-ids '("timed-animation-button-box"
                 "animation-preferences-stack"
diff --git a/examples/adw-1/adw1-demo/dialogs.scm b/examples/adw-1/adw1-demo/dialogs.scm
index 8d0c737..75a3df0 100644
--- a/examples/adw-1/adw1-demo/dialogs.scm
+++ b/examples/adw-1/adw1-demo/dialogs.scm
@@ -65,7 +65,7 @@
   (dialogs-button #:child-id "dialogs-button"
                   #:accessor !dialogs-button)
   ;; class options
-  #:template (string-append (dirname (current-filename))
+  #:template (string-append (dirname "/home/florian/src/g-golf/examples/adw-1/adw1-demo/x")
                             "/ui/dialogs.ui")
   #:child-ids '("dialogs-button")
   #:g-signal `(add-toast	;; name
diff --git a/examples/adw-1/adw1-demo/navigation-view-demo-dialog.scm b/examples/adw-1/adw1-demo/navigation-view-demo-dialog.scm
index e5212af..9ab1fe7 100644
--- a/examples/adw-1/adw1-demo/navigation-view-demo-dialog.scm
+++ b/examples/adw-1/adw1-demo/navigation-view-demo-dialog.scm
@@ -52,5 +52,5 @@
 (define-class <adw-navigation-view-demo-dialog> (<adw-dialog>)
   ;; slots
   ;; class options
-  #:template (string-append (dirname (current-filename))
+  #:template (string-append (dirname "/home/florian/src/g-golf/examples/adw-1/adw1-demo/x")
                             "/ui/navigation-view-demo-dialog.ui"))
diff --git a/examples/adw-1/adw1-demo/navigation-view.scm b/examples/adw-1/adw1-demo/navigation-view.scm
index 16303de..2d3e1c7 100644
--- a/examples/adw-1/adw1-demo/navigation-view.scm
+++ b/examples/adw-1/adw1-demo/navigation-view.scm
@@ -61,7 +61,7 @@
   (navigation-view-button #:child-id "navigation-view-button"
                           #:accessor !navigation-view-button)
   ;; class options
-  #:template (string-append (dirname (current-filename))
+  #:template (string-append (dirname "/home/florian/src/g-golf/examples/adw-1/adw1-demo/x")
                             "/ui/navigation-view.ui")
   #:child-ids '("navigation-view-button"))
 
diff --git a/examples/adw-1/adw1-demo/preferences.scm b/examples/adw-1/adw1-demo/preferences.scm
index 205c29b..bf4010a 100644
--- a/examples/adw-1/adw1-demo/preferences.scm
+++ b/examples/adw-1/adw1-demo/preferences.scm
@@ -77,7 +77,7 @@
   (subpage-2 #:child-id "subpage-2" #:accessor !subpage-2)
   (subpage-2-bt #:child-id "subpage-2-bt" #:accessor !subpage-2-bt)
   ;; class options
-  #:template (string-append (dirname (current-filename))
+  #:template (string-append (dirname "/home/florian/src/g-golf/examples/adw-1/adw1-demo/x")
                             "/ui/preferences.ui")
 
   #:child-ids '("toast-bt"
diff --git a/examples/adw-1/adw1-demo/style-classes-demo-dialog.scm b/examples/adw-1/adw1-demo/style-classes-demo-dialog.scm
index a7a3fb6..f25f4b3 100644
--- a/examples/adw-1/adw1-demo/style-classes-demo-dialog.scm
+++ b/examples/adw-1/adw1-demo/style-classes-demo-dialog.scm
@@ -83,7 +83,7 @@
   (progress-bar-switch-row #:child-id "progress-bar-switch-row"
                            #:accessor !progress-bar-switch-row)
   ;; class options
-  #:template (string-append (dirname (current-filename))
+  #:template (string-append (dirname "/home/florian/src/g-golf/examples/adw-1/adw1-demo/x")
                             "/ui/style-classes-demo-dialog.ui")
   #:child-ids '("progress-bar"
                 "status-page-dialog"
diff --git a/examples/adw-1/adw1-demo/style-classes.scm b/examples/adw-1/adw1-demo/style-classes.scm
index b908600..0b99110 100644
--- a/examples/adw-1/adw1-demo/style-classes.scm
+++ b/examples/adw-1/adw1-demo/style-classes.scm
@@ -60,7 +60,7 @@
   (style-classes-button #:child-id "style-classes-button"
                         #:accessor !style-classes-button)
   ;; class options
-  #:template (string-append (dirname (current-filename))
+  #:template (string-append (dirname "/home/florian/src/g-golf/examples/adw-1/adw1-demo/x")
                             "/ui/style-classes.ui")
   #:child-ids '("style-classes-button"))
 
diff --git a/examples/adw-1/adw1-demo/welcome.scm b/examples/adw-1/adw1-demo/welcome.scm
index ffde7b5..665f558 100644
--- a/examples/adw-1/adw1-demo/welcome.scm
+++ b/examples/adw-1/adw1-demo/welcome.scm
@@ -47,5 +47,5 @@
 
 
 (define-class <adw-demo-page-welcome> (<adw-bin>)
-  #:template (string-append (dirname (current-filename))
+  #:template (string-append (dirname "/home/florian/src/g-golf/examples/adw-1/adw1-demo/x")
                             "/ui/welcome.ui"))
diff --git a/examples/adw-1/adw1-demo/window.scm b/examples/adw-1/adw1-demo/window.scm
index e824c0a..4c19bc3 100644
--- a/examples/adw-1/adw1-demo/window.scm
+++ b/examples/adw-1/adw1-demo/window.scm
@@ -91,7 +91,7 @@
   (content #:accessor !content #:child-id "content")
   (stack #:accessor !stack #:child-id "stack")
   ;; class options
-  #:template (string-append (dirname (current-filename))
+  #:template (string-append (dirname "/home/florian/src/g-golf/examples/adw-1/adw1-demo/x")
                             "/ui/window.ui")
   #:child-ids '("toast-overlay"
                 "split-view"

base-commit: 482c0693160fba5f4a29214028dc3e9c276693da
-- 
2.41.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.