all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764
@ 2023-03-30 10:51 Andreas Enge
  2023-03-30 18:49 ` Josselin Poiret
  2023-03-31  2:12 ` Maxim Cournoyer
  0 siblings, 2 replies; 9+ messages in thread
From: Andreas Enge @ 2023-03-30 10:51 UTC (permalink / raw)
  To: guix-devel; +Cc: Maxim Cournoyer

Hello,

it looks as if commit ff5f34ae757d709987896d6164bf125319a0f764 breaks
building of at least one package, perl-gd, depending on
perl-extutils-pkgconfig.

The latter is now defined as
(define-syntax perl-extutils-pkgconfig
  (identifier-syntax (perl-extutils-pkgconfig-for-target
                      (%current-target-system))))
which apparently does not play well with what is written in the former as
    (native-inputs
     (list perl-extutils-pkgconfig)) :
guix package: error: gnu/packages/gd.scm:103:2: package `perl-gd@2.73' has an invalid input: ("_" #<syntax-transformer perl-extutils-pkgconfig>)

I do not quite see where the problem lies, given that the same thing
has been working for pkg-config for quite a while now...
I noticed it on core-updates, but the commit comes from master.

Andreas



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764
  2023-03-30 10:51 Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764 Andreas Enge
@ 2023-03-30 18:49 ` Josselin Poiret
  2023-03-30 23:19   ` Leo Famulari
  2023-03-31  2:12 ` Maxim Cournoyer
  1 sibling, 1 reply; 9+ messages in thread
From: Josselin Poiret @ 2023-03-30 18:49 UTC (permalink / raw)
  To: Andreas Enge, guix-devel; +Cc: Maxim Cournoyer

[-- Attachment #1: Type: text/plain, Size: 995 bytes --]

Hi Andreas,

Andreas Enge <andreas@enge.fr> writes:

> Hello,
>
> it looks as if commit ff5f34ae757d709987896d6164bf125319a0f764 breaks
> building of at least one package, perl-gd, depending on
> perl-extutils-pkgconfig.
>
> The latter is now defined as
> (define-syntax perl-extutils-pkgconfig
>   (identifier-syntax (perl-extutils-pkgconfig-for-target
>                       (%current-target-system))))
> which apparently does not play well with what is written in the former as
>     (native-inputs
>      (list perl-extutils-pkgconfig)) :
> guix package: error: gnu/packages/gd.scm:103:2: package `perl-gd@2.73' has an invalid input: ("_" #<syntax-transformer perl-extutils-pkgconfig>)

Usually errors which involve #<syntax-transformer> somewhere are caused
by stale .go files (guile doesn't know how to recompile dependent .scm
files).  I would suggest a good old `grep -Rl --include '*.go'
perl-extutils-pkgconfig ./gnu | xargs rm`.

Best,
-- 
Josselin Poiret

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764
  2023-03-30 18:49 ` Josselin Poiret
@ 2023-03-30 23:19   ` Leo Famulari
  2023-03-31  8:15     ` Josselin Poiret
  0 siblings, 1 reply; 9+ messages in thread
From: Leo Famulari @ 2023-03-30 23:19 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: Andreas Enge, guix-devel, Maxim Cournoyer

[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]

On Thu, Mar 30, 2023 at 08:49:43PM +0200, Josselin Poiret wrote:
> Hi Andreas,
> 
> Andreas Enge <andreas@enge.fr> writes:
> 
> > Hello,
> >
> > it looks as if commit ff5f34ae757d709987896d6164bf125319a0f764 breaks
> > building of at least one package, perl-gd, depending on
> > perl-extutils-pkgconfig.
> >
> > The latter is now defined as
> > (define-syntax perl-extutils-pkgconfig
> >   (identifier-syntax (perl-extutils-pkgconfig-for-target
> >                       (%current-target-system))))
> > which apparently does not play well with what is written in the former as
> >     (native-inputs
> >      (list perl-extutils-pkgconfig)) :
> > guix package: error: gnu/packages/gd.scm:103:2: package `perl-gd@2.73' has an invalid input: ("_" #<syntax-transformer perl-extutils-pkgconfig>)
> 
> Usually errors which involve #<syntax-transformer> somewhere are caused
> by stale .go files (guile doesn't know how to recompile dependent .scm
> files).  I would suggest a good old `grep -Rl --include '*.go'
> perl-extutils-pkgconfig ./gnu | xargs rm`.

I saw this error too, but it went away after `make clean-go && make`.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764
  2023-03-30 10:51 Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764 Andreas Enge
  2023-03-30 18:49 ` Josselin Poiret
@ 2023-03-31  2:12 ` Maxim Cournoyer
  2023-03-31  8:13   ` Josselin Poiret
  1 sibling, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2023-03-31  2:12 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel

Hi Andreas,

Andreas Enge <andreas@enge.fr> writes:

> Hello,
>
> it looks as if commit ff5f34ae757d709987896d6164bf125319a0f764 breaks
> building of at least one package, perl-gd, depending on
> perl-extutils-pkgconfig.
>
> The latter is now defined as
> (define-syntax perl-extutils-pkgconfig
>   (identifier-syntax (perl-extutils-pkgconfig-for-target
>                       (%current-target-system))))
> which apparently does not play well with what is written in the former as
>     (native-inputs
>      (list perl-extutils-pkgconfig)) :
> guix package: error: gnu/packages/gd.scm:103:2: package `perl-gd@2.73' has an invalid input: ("_" #<syntax-transformer perl-extutils-pkgconfig>)
>
> I do not quite see where the problem lies, given that the same thing
> has been working for pkg-config for quite a while now...
> I noticed it on core-updates, but the commit comes from master.

I've seen this too, but it disappears if you byte-compile the project.
I'm not sure what that means, although it does seems sub-optimal that we
rely on byte-compilation for the code to evaluate correctly.

-- 
Thanks,
Maxim


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764
  2023-03-31  2:12 ` Maxim Cournoyer
@ 2023-03-31  8:13   ` Josselin Poiret
  2023-03-31  8:42     ` Andreas Enge
  2023-03-31 14:02     ` Maxim Cournoyer
  0 siblings, 2 replies; 9+ messages in thread
From: Josselin Poiret @ 2023-03-31  8:13 UTC (permalink / raw)
  To: Maxim Cournoyer, Andreas Enge; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 750 bytes --]

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

> I've seen this too, but it disappears if you byte-compile the project.
> I'm not sure what that means, although it does seems sub-optimal that we
> rely on byte-compilation for the code to evaluate correctly.

The problem actually comes from stale byte-compiled files.  If you were
to interpret everything, it would work properly.  The issue is when a
variable becomes a syntax-transformer, ie. a macro: then it should get
expanded at compile-time, but guile doesn't recompile dependents
(because it doesn't know about them).  Hence, in dependent .go files,
the variable didn't get expanded, and is then used at runtime, hence the
error.

Best,
-- 
Josselin Poiret

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764
  2023-03-30 23:19   ` Leo Famulari
@ 2023-03-31  8:15     ` Josselin Poiret
  2023-04-01 16:13       ` Leo Famulari
  0 siblings, 1 reply; 9+ messages in thread
From: Josselin Poiret @ 2023-03-31  8:15 UTC (permalink / raw)
  To: Leo Famulari; +Cc: Andreas Enge, guix-devel, Maxim Cournoyer

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

Hi Leo and Andreas,

Leo Famulari <leo@famulari.name> writes:

> On Thu, Mar 30, 2023 at 08:49:43PM +0200, Josselin Poiret wrote:
>> Usually errors which involve #<syntax-transformer> somewhere are caused
>> by stale .go files (guile doesn't know how to recompile dependent .scm
>> files).  I would suggest a good old `grep -Rl --include '*.go'
>> perl-extutils-pkgconfig ./gnu | xargs rm`.
>
> I saw this error too, but it went away after `make clean-go && make`.

Don't want to praise myself too much, but the above command should only
delete .go files which contain references to perl-extutils-pkgconfig,
thus avoiding a rebuild of all go files!

Best,
-- 
Josselin Poiret

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764
  2023-03-31  8:13   ` Josselin Poiret
@ 2023-03-31  8:42     ` Andreas Enge
  2023-03-31 14:02     ` Maxim Cournoyer
  1 sibling, 0 replies; 9+ messages in thread
From: Andreas Enge @ 2023-03-31  8:42 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: Maxim Cournoyer, guix-devel

Thanks to all who replied! I did a "make clean-go; make" and things work.
This indicates that "make" does not work as one expects it to, but indeed
I never gave a thought as to how the Makefile is constructed. It looks as
if it does not record the dependencies between the source code files, but
rather lets Guile figure them out; maybe we cannot expect miracles in
complicated situations.

Andreas



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764
  2023-03-31  8:13   ` Josselin Poiret
  2023-03-31  8:42     ` Andreas Enge
@ 2023-03-31 14:02     ` Maxim Cournoyer
  1 sibling, 0 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2023-03-31 14:02 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: Andreas Enge, guix-devel

Hi Josselin,

Josselin Poiret <dev@jpoiret.xyz> writes:

> Hi Maxim,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
>
>> I've seen this too, but it disappears if you byte-compile the project.
>> I'm not sure what that means, although it does seems sub-optimal that we
>> rely on byte-compilation for the code to evaluate correctly.
>
> The problem actually comes from stale byte-compiled files.  If you were
> to interpret everything, it would work properly.  The issue is when a
> variable becomes a syntax-transformer, ie. a macro: then it should get
> expanded at compile-time, but guile doesn't recompile dependents
> (because it doesn't know about them).  Hence, in dependent .go files,
> the variable didn't get expanded, and is then used at runtime, hence the
> error.

I thought I had cleared all .go files, but your explanation suggests I
didn't.  I probably got confused in my multiple sessions on various
machines :-).

Thanks for the explanation.

-- 
Thanks,
Maxim


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764
  2023-03-31  8:15     ` Josselin Poiret
@ 2023-04-01 16:13       ` Leo Famulari
  0 siblings, 0 replies; 9+ messages in thread
From: Leo Famulari @ 2023-04-01 16:13 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: Andreas Enge, guix-devel, Maxim Cournoyer

On Fri, Mar 31, 2023 at 10:15:06AM +0200, Josselin Poiret wrote:
> >> files).  I would suggest a good old `grep -Rl --include '*.go'
> >> perl-extutils-pkgconfig ./gnu | xargs rm`.
> >
> > I saw this error too, but it went away after `make clean-go && make`.
> 
> Don't want to praise myself too much, but the above command should only
> delete .go files which contain references to perl-extutils-pkgconfig,
> thus avoiding a rebuild of all go files!

That's much better :)


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-04-01 16:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-30 10:51 Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764 Andreas Enge
2023-03-30 18:49 ` Josselin Poiret
2023-03-30 23:19   ` Leo Famulari
2023-03-31  8:15     ` Josselin Poiret
2023-04-01 16:13       ` Leo Famulari
2023-03-31  2:12 ` Maxim Cournoyer
2023-03-31  8:13   ` Josselin Poiret
2023-03-31  8:42     ` Andreas Enge
2023-03-31 14:02     ` Maxim Cournoyer

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.