guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#38390] Gash 0.2.0


From: Timothy Sample
Subject: [bug#38390] Gash 0.2.0
Date: Sun, 08 Dec 2019 17:11:10 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Jan,

Jan Nieuwenhuizen <address@hidden> writes:

> Timothy Sample writes:
>
> [cc: address@hidden]
>
> Hi Timothy,
>
>> There’s one last thing I need from you (besides an OK on your test
>> whenever you get to it).
>
> I just found two things I'm not too happy about.  Both stem from using
> our bootstrap guile-2.0.9.  Previously, I used guile-2.0 (= 2.0.14) to
> compile the .go files that were later used during bootstrap.

I did all of my bootstrapping tests with the bootstrap Guile.  I’ve
attached my package definition for reference (it belongs in
“commencement.scm”).  The reason I say this is to reassure you that
going from 2.0.14 to 2.0.9 shouldn’t be too disruptive.

> When I build `gash-boot' on my real experimental `wip-boot' guix branch
> at gitlab (https://gitlab.com/janneke/guix/tree/wip-boot) like so
>
>     ./pre-inst-env guix build -e '(@@ (gnu packages commencement) gash-boot)'
>
> and run gash, I get:
>
> 20:44:25 janneke@dundal:~/src/guix/wip-boot [env]
> $ ./pre-inst-env guix build -e '(@@ (gnu packages commencement) gash-boot)'
> /gnu/store/hihv59xdpqfnijb5i2mi0g8wg09qphi4-gash-boot-0.1.50-c1b8
> 20:44:32 janneke@dundal:~/src/guix/wip-boot [env]
> $ /gnu/store/8bl7iqln6qaajr3d6kwbyvkzy2gvr4rf-gash-boot-0.1.50-c1b8/bin/gash 
> --version
> %% Shift/Reduce conflict (shift 1, reduce 106) on 'NEWLINE' in state 242
>

Snipping a thousand more “Shift/Reduce” warnings....

>
> Backtrace:
> In ice-9/boot-9.scm:
> 3966: 19 [#<procedure 152f880 at ice-9/boot-9.scm:3961:3 ()>]
> 1645: 18 [%start-stack load-stack ...]
> 1650: 17 [#<procedure 1534540 ()>]
> In unknown file:
>    ?: 16 [primitive-load 
> "/gnu/store/8bl7iqln6qaajr3d6kwbyvkzy2gvr4rf-gash-boot-0.1.50-c1b8/bin/gash"]
> In ice-9/eval.scm:
>  505: 15 [#<procedure 13fba20 at ice-9/eval.scm:499:4 (exp)> (define # # #)]
> In ice-9/psyntax.scm:
> 1101: 14 [expand-top-sequence ((define (main args) (setenv "SHELL" #) ...)) 
> () ...]
> 1259: 13 [#<procedure 1488120 at ice-9/psyntax.scm:1067:36 ()>]
> 1605: 12 [expand-simple-lambda (# . #) () (()) ...]
> 1509: 11 [parse ((# . #) (# . #)) () () ...]
> In ice-9/boot-9.scm:
>  625: 10 [map #<procedure 1538f60 at ice-9/psyntax.scm:1510:50 (x)> (# #)]
> In ice-9/psyntax.scm:
> 1257: 9 [#<procedure 1538f60 at ice-9/psyntax.scm:1510:50 (x)> (# . #)]
> 1186: 8 [syntax-type (# #) (# #) (# # #) ...]
>  579: 7 [syntax-type main (# #) (#) ...]
>  293: 6 [get-global-definition-hook main (public gash gash)]
> In ice-9/boot-9.scm:
> 2708: 5 [#<procedure 14a3f20 at ice-9/boot-9.scm:2696:4 (name #:optional 
> autoload version #:key ensure)> # ...]
> 2981: 4 [try-module-autoload (gash gash) #f]
> 2320: 3 [save-module-excursion #<procedure 15389f0 at 
> ice-9/boot-9.scm:2982:17 ()>]
> 3001: 2 [#<procedure 15389f0 at ice-9/boot-9.scm:2982:17 ()>]
> In unknown file:
>    ?: 1 [primitive-load-path "gash/gash" ...]
>    ?: 0 [setlocale 6 ""]
>
> ERROR: In procedure setlocale:
> ERROR: In procedure setlocale: Invalid argument
> [1]20:44:45 janneke@dundal:~/src/guix/wip-boot [env]
> $ 
>
> If I set LC_ALL=C 
>
>     LC_ALL=C
> /gnu/store/8bl7iqln6qaajr3d6kwbyvkzy2gvr4rf-gash-boot-0.1.50-c1b8/bin/gash
> --version
>
> then I (of course) still get the Shift/Reduce warnings and everything
> "seems" to work.  It seems that the empty locale is problematic for
> guile 2.0.9 or our bootstrap environment.  I just tried a patch and
> pushed to my wip-0.2.0.

I added (at the last minute) the call to “setlocale” to normalize some
differences between Guile 2 and Guile 2.2 (I was getting test failures
without it).  From reading Guile’s NEWS, version 2.2 started
initializing the locale automatically, so I “backported” that to Guile 2
by calling “setlocale” with an empty string (as discussed in the
manual).  Anyway, this is definitely my fault!  Perhaps it should try
that and then fall back on “(setlocale LC_ALL "C")” if there is a
problem.  I’ll figure it out before releasing.

> I am less cheerful about the Shift/Reduce warnings; I am afraid they
> might break something somewhere during the bootstrap build.  Any ideas
> why these surface at this time?  I'll play some more with
> lalr.upstream.scm versions...

My understanding is that these are spurious.  There is upstream commit
92b64f9b3c02b0086a4aea7cbe7dc38376768150 which is not included in Guile
2.0.9 but included in later versions (maybe starting with 2.0.10 – I
don’t recall).  The commit message is “No more unexpected shift-reduce
conflicts with LR driver.”  See <https://github.com/schemeway/lalr-scm>.
Since the newer versions are fine with the parser, and I have parsed
oodles of shell script using Guile 2.0.9, I think the these warnings are
just the result of a bug.  :)


-- Tim

Attachment: gash-boot.scm
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]