From: divoplade <d@divoplade.fr>
To: "Jérémy Korwin-Zmijowski" <jeremy@korwin-zmijowski.fr>,
srfi-64@srfi.schemers.org,
"Mailing list Guile User" <guile-user@gnu.org>
Subject: Re: test-equal: actual returned value is #f when tested expression raises execption
Date: Sat, 20 Feb 2021 12:26:46 +0100 [thread overview]
Message-ID: <f8847b4715694d992c4c11f137a73700b9441433.camel@divoplade.fr> (raw)
In-Reply-To: <e15e635b612f75cfb14675ac07453d6fb40934e3.camel@korwin-zmijowski.fr>
Hello,
This is what I understand from guile. I am no expert, so maybe it is
not 100% accurate!
Le samedi 20 février 2021 à 12:03 +0100, Jérémy Korwin-Zmijowski a
écrit :
>
> Running `guile -L . char-sets-test.scm` in the file location will
> produce the following output :
>
> $ guile -L . char-sets-test.scm
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;; or pass the --no-auto-compile argument to disable.
> ;;; compiling /tmp/char-sets-test.scm
> ;;; WARNING: compilation of /tmp/char-sets-test.scm failed:
> ;;; no code for module (char-sets)
From now on, char-sets-test.scm has been compiled, but guile did not
find password-valid?, so it assumed that this function will be
available at run time when needed. Maybe some crazy macro expansion,
who knows?
>
> And now, I rerun the tests :
>
> $ guile -L . char-sets-test.scm
> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
> ;;; or pass the --no-auto-compile argument to disable.
> ;;; compiling /tmp/char-sets-test.scm
> ;;; compiling ./char-sets.scm
> ;;; compiled /home/jeko/.cache/guile/ccache/3.0-LE-8-4.4/tmp/char-
> sets.scm.go
> ;;; char-sets-test.scm:10:2: warning: possibly unbound variable
> `password-valid?'
> ;;; compiled /home/jeko/.cache/guile/ccache/3.0-LE-8-4.4/tmp/char-
> sets-
> test.scm.go
> %%%% Starting test harness-char-sets (Writing full log to "harness-
> char-sets.log")
> # of expected passes 1
Guile did not re-compile the test, because the code did not change, but
remembered from last time that password-valid? was potentially missing,
so it issues the warning again when loading the bytecode. However,
since now there's a char-sets.scm, it can use the module and find the
function, and everything works correctly.
Everything works because guile does not inline code from a module to
another. So the warning is just a warning. You don't need to worry.
next prev parent reply other threads:[~2021-02-20 11:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-20 11:03 test-equal: actual returned value is #f when tested expression raises execption Jérémy Korwin-Zmijowski
2021-02-20 11:26 ` divoplade [this message]
2021-02-20 12:09 ` Jérémy Korwin-Zmijowski
2021-02-21 14:21 ` Taylan Kammer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f8847b4715694d992c4c11f137a73700b9441433.camel@divoplade.fr \
--to=d@divoplade.fr \
--cc=guile-user@gnu.org \
--cc=jeremy@korwin-zmijowski.fr \
--cc=srfi-64@srfi.schemers.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).