unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: iyzsong@member.fsf.org (宋文武)
To: guix-devel@gnu.org
Subject: Re: Change defaults of 'define-record-type*' need invalidate auto-compilation caches
Date: Sat, 06 Jan 2018 23:07:39 +0800	[thread overview]
Message-ID: <87o9m7m3es.fsf@member.fsf.org> (raw)
In-Reply-To: <87shbjm3yd.fsf@member.fsf.org> ("宋文武"'s message of "Sat, 06 Jan 2018 22:55:54 +0800")


> Hello,

Send it by mistake...


For example, in the current directory, I have 'foo.scm':
--8<---------------cut here---------------start------------->8---
(define-module (foo)
  #:use-module (guix records)
  #:export (foo foo-x))

(define-record-type* <foo>
  foo make-foo foo?
  (x foo-x (default "x")))
--8<---------------cut here---------------end--------------->8---


And 'x.scm':
--8<---------------cut here---------------start------------->8---
(use-modules (foo))
(display (foo-x (foo)))
--8<---------------cut here---------------end--------------->8---


Run 'guile -L . x.scm', will output "x".

Then I change the '(default "x")' to '(default "y")' in foo.scm, and
re-run 'guile -L x.scm', it still output "x", I would expect it to
change to "y".

Only with '--fresh-auto-compile' or delete the cache of x.scm, I will
get the output "y".

Is this a bug?

  reply	other threads:[~2018-01-06 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-06 14:55 Change defaults of 'define-record-type*' need invalidate auto-compilation caches 宋文武
2018-01-06 15:07 ` 宋文武 [this message]
2018-01-08 10:37   ` Ludovic Courtès
2018-01-08 12:49     ` 宋文武

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://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9m7m3es.fsf@member.fsf.org \
    --to=iyzsong@member.fsf.org \
    --cc=guix-devel@gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).