guildhall icon indicating copy to clipboard operation
guildhall copied to clipboard

Install problems when (read-set! keywords 'prefix) is in init.scm

Open ijp opened this issue 13 years ago • 2 comments

Reported by tupi (David Pirotte) on #guile

david@rascar:/usr/local/src/guildhall 4 $ make
./env /usr/local/bin/guile-tools compile -Wunbound-variable -Warity-mismatch -Wformat -o "guildhall/ext/wt-tree.go" "guildhall/ext/wt-tree.scm"
wrote `guildhall/ext/wt-tree.go'
./env /usr/local/bin/guile-tools compile -Wunbound-variable -Warity-mismatch -Wformat -o "guildhall/spells/algebraic-types.go" "guildhall/spells/algebraic-types.scm"
Backtrace:
In ice-9/boot-9.scm:
2658: 19 [resolve-interface (guildhall spells algebraic-types ...) #:select ...]
2583: 18 [#<procedure 8682620 at ice-9/boot-9.scm:2571:4 (name #:optional autoload version #:key ensure)> # ...]
2850: 17 [try-module-autoload (guildhall spells algebraic-types helpers) ()]
2189: 16 [save-module-excursion #<procedure 89fa390 at ice-9/boot-9.scm:2851:17 ()>]
2861: 15 [#<procedure 89fa390 at ice-9/boot-9.scm:2851:17 ()>]
In unknown file:
   ?: 14 [primitive-load-path "guildhall/spells/algebraic-types/helpers" #f]
In ice-9/eval.scm:
 480: 13 [#<procedure 862f6a0 at ice-9/eval.scm:474:4 (exp)> (library # # # ...)]
In ice-9/psyntax.scm:
1098: 12 [expand-top-sequence ((library # # # ...)) () ((top)) ...]
 981: 11 [scan ((library # # # ...)) () ((top)) ...]
1205: 10 [syntax-type (#(syntax-object library # ...) (# # # ...) (# #) ...) () ...]
1414: 9 [expand-macro #<procedure 868dfc0 at ice-9/r6rs-libraries.scm:120:2 (stx)> ...]
In ice-9/r6rs-libraries.scm:
 174: 8 [#<procedure 868dfe0 (name name* version espec ispec body)> # # () ...]
In ice-9/boot-9.scm:
 621: 7 [map #<procedure 868a210 at ice-9/r6rs-libraries.scm:175:19 (im)> (# # #)]
2658: 6 [resolve-interface (guildhall spells string-utils) #:select ...]
2583: 5 [#<procedure 8682620 at ice-9/boot-9.scm:2571:4 (name #:optional autoload version #:key ensure)> # ...]
2850: 4 [try-module-autoload (guildhall spells string-utils) ()]
2189: 3 [save-module-excursion #<procedure 8a027e0 at ice-9/boot-9.scm:2851:17 ()>]
2861: 2 [#<procedure 8a027e0 at ice-9/boot-9.scm:2851:17 ()>]
In unknown file:
   ?: 1 [primitive-load-path "guildhall/spells/string-utils" #f]
In ice-9/boot-9.scm:
 106: 0 [#<procedure 874c5a0 at ice-9/boot-9.scm:97:6 (thrown-k . args)> wrong-type-arg ...]

ice-9/boot-9.scm:106:20: In procedure #<procedure 874c5a0 at ice-9/boot-9.scm:97:6 (thrown-k . args)>:
ice-9/boot-9.scm:106:20: Wrong type (expecting symbol): 8
make: *** [guildhall/spells/algebraic-types.go] Error 1
david@rascar:/usr/local/src/guildhall 5 $ 

ijp avatar Sep 04 '12 17:09 ijp

The problem is, as far as I can see, that that read option interferes with srfi-97 names for modules. This is a guile issue, and not one that really has an obvious solution, however there are two options as far as I can see.

  1. Go through and change all srfi-97 module names to guile-format srfi names.
  2. Find out where the user's init file gets loaded during a build, and make sure it doesn't.

2 seems like the appropriate resolution, since I don't see why we should need access to the user's config file while building.

ijp avatar Sep 04 '12 17:09 ijp

hmm, after some back and forth with tupi he clarified that init.scm is not .guile, which I thought it was. init.scm is not documented in guile's manual, but it is in guile's NEWS. This file AFAICT always gets read, so it needs to be a solution in guile.

ijp avatar Sep 04 '12 19:09 ijp