Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764

2023-04-01 Thread Leo Famulari
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 :)



Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764

2023-03-31 Thread Maxim Cournoyer
Hi Josselin,

Josselin Poiret  writes:

> Hi Maxim,
>
> Maxim Cournoyer  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



Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764

2023-03-31 Thread Andreas Enge
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




Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764

2023-03-31 Thread Josselin Poiret
Hi Leo and Andreas,

Leo Famulari  writes:

> On Thu, Mar 30, 2023 at 08:49:43PM +0200, Josselin Poiret wrote:
>> Usually errors which involve # 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


signature.asc
Description: PGP signature


Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764

2023-03-31 Thread Josselin Poiret
Hi Maxim,

Maxim Cournoyer  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


signature.asc
Description: PGP signature


Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764

2023-03-30 Thread Maxim Cournoyer
Hi Andreas,

Andreas Enge  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: ("_" #)
>
> 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



Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764

2023-03-30 Thread Leo Famulari
On Thu, Mar 30, 2023 at 08:49:43PM +0200, Josselin Poiret wrote:
> Hi Andreas,
> 
> Andreas Enge  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: ("_" #)
> 
> Usually errors which involve # 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`.


signature.asc
Description: PGP signature


Re: Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764

2023-03-30 Thread Josselin Poiret
Hi Andreas,

Andreas Enge  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: ("_" #)

Usually errors which involve # 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


signature.asc
Description: PGP signature


Syntax and gexp for ff5f34ae757d709987896d6164bf125319a0f764

2023-03-30 Thread Andreas Enge
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: ("_" #)

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