unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Phil <phil@beadling.co.uk>
To: zimoun <zimon.toutoune@gmail.com>
Cc: "Ludovic Courtès" <ludo@gnu.org>, guix-devel@gnu.org
Subject: Re: Compile skribilo doc containing guix channel references
Date: Sun, 06 Nov 2022 22:12:28 +0000	[thread overview]
Message-ID: <87h6zbn35f.fsf@beadling.co.uk> (raw)
In-Reply-To: <86wn87lxwv.fsf@gmail.com>

Hi Simon,

zimoun writes:

> I am missing how the Skribilo file is it compiled?  At “guix pull” time?
> Or manually when running the script compile-docs.scm?
>

At the moment compilation is only manual and from inside the repo clone:
guix environment skribilo guile -- guix repl -- compile-docs.scm

Making it part of guix pull is an interesting idea given this is where
standard package compilation takes place.  For this to work any code
references would have to be of the form:
(use-modules (my-module foo)
(package->code my-package)

rather than direct access to scheme files in the repo clone using:
(source :file "foo.scm" :definiton 'my-package)

The advantage of using pacakge->code is that the documentation
compilation is then decoupled from the repo clone and can be generated
anywhere guix can be run (just like guix pull).

The 2 disadvantages are 1) Files in the repo, but not part of the guix
module system cannot be referenced, 2) The pretty-printing of packages
generated using package->code does not perfectly reproduce the format in
the repo clone - although they are functionally identical.

For example inputs are referenced fully qualified in-situ - eg
(@ (foo bar) baz), rather than just referencing baz in the inputs, and
importing (foo bar) at the top of the module.  Comments etc, are also
lost too.

If there was a nice way of referencing the uncompiled scheme files in
the channel without needing the repo cloned that would be perfect IMHO.
I don't think this is possible tho?


  reply	other threads:[~2022-11-06 22:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30 20:46 Compile skribilo doc containing guix channel references Phil
2022-10-31 21:56 ` Phil
2022-11-02 11:36 ` Ludovic Courtès
2022-11-04 22:13   ` Phil
2022-11-05 16:40     ` Phil
2022-11-05 18:03       ` Ludovic Courtès
2022-11-06 18:50         ` zimoun
2022-11-06 22:12           ` Phil [this message]
2022-11-07  8:37             ` zimoun
2022-11-07  9:21           ` Ludovic Courtès
2022-11-07  9:47             ` zimoun
2022-11-10 11:58               ` Ludovic Courtès
2022-11-10 12:39                 ` zimoun
2022-11-17 14:54                   ` Ludovic Courtès
2022-11-05 17:58     ` Ludovic Courtès

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=87h6zbn35f.fsf@beadling.co.uk \
    --to=phil@beadling.co.uk \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /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).