unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Question regarding gexp->script and program-file.
@ 2024-10-16  8:31 Arnaud Daby-Seesaram
  2024-10-23 20:30 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Arnaud Daby-Seesaram @ 2024-10-16  8:31 UTC (permalink / raw)
  To: guix-devel

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

Hi,

I have just one quick question regarding `gexp->script' and
`program-file' procedures: why is the `--no-auto-compile' flag added to
the shebangs of produced files?

Best regards,

-- 
Arnaud

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

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

* Re: Question regarding gexp->script and program-file.
  2024-10-16  8:31 Question regarding gexp->script and program-file Arnaud Daby-Seesaram
@ 2024-10-23 20:30 ` Ludovic Courtès
  2024-10-24  8:27   ` Arnaud Daby-Seesaram
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2024-10-23 20:30 UTC (permalink / raw)
  To: Arnaud Daby-Seesaram; +Cc: guix-devel

Hi,

Arnaud Daby-Seesaram <ds-ac@nanein.fr> skribis:

> I have just one quick question regarding `gexp->script' and
> `program-file' procedures: why is the `--no-auto-compile' flag added to
> the shebangs of produced files?

That’s primarily because auto-compilation would print messages the first
time you run these programs, or even every time if there’s no place to
write .go files to.

The idea is also that ‘program-file’ & co. are meant for small programs,
where compilation doesn’t matter much.

Ludo’.


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

* Re: Question regarding gexp->script and program-file.
  2024-10-23 20:30 ` Ludovic Courtès
@ 2024-10-24  8:27   ` Arnaud Daby-Seesaram
  0 siblings, 0 replies; 3+ messages in thread
From: Arnaud Daby-Seesaram @ 2024-10-24  8:27 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

Hi,

Ludovic Courtès <ludo@gnu.org> writes:
>> I have just one quick question regarding `gexp->script' and
>> `program-file' procedures: why is the `--no-auto-compile' flag added to
>> the shebangs of produced files?
>
> That’s primarily because auto-compilation would print messages the first
> time you run these programs, or even every time if there’s no place to
> write .go files to.
>
> The idea is also that ‘program-file’ & co. are meant for small programs,
> where compilation doesn’t matter much.

Thank you for your answer; it makes sense.


The current documentation of `gexp->script' (provided below) seems out
of sync.  I will try to propose a patch for it, to include the current
shebang produced by the procedure this week-end.

--8<---------------cut here---------------start------------->8---
     When “running” it through the store (*note ‘run-with-store’: The
     Store Monad.), we obtain a derivation that produces an executable
     file ‘/gnu/store/...-list-files’ along these lines:

          #!/gnu/store/...-guile-2.0.11/bin/guile -ds
          !#
          [...]
--8<---------------cut here---------------end--------------->8---


NB: If I read the code correctly, the current shebang is:
--8<---------------cut here---------------start------------->8---
#![path to guile]/bin/guile --no-auto-compile
!#
--8<---------------cut here---------------end--------------->8---

Best,

-- 
Arnaud

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

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

end of thread, other threads:[~2024-10-24  8:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-16  8:31 Question regarding gexp->script and program-file Arnaud Daby-Seesaram
2024-10-23 20:30 ` Ludovic Courtès
2024-10-24  8:27   ` Arnaud Daby-Seesaram

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