unofficial mirror of gwl-devel@gnu.org
 help / color / mirror / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Olivier Dion <olivier.dion@polymtl.ca>
Cc: gwl-devel@gnu.org
Subject: Re: Auto-create processe's output-path?
Date: Fri, 03 Jun 2022 20:43:20 +0200	[thread overview]
Message-ID: <87r14560pd.fsf@elephly.net> (raw)
In-Reply-To: <87y1yf9ga1.fsf@laura>


Olivier Dion via <gwl-devel@gnu.org> writes:

> Hi,
>
> I think it would be nice if GWL automatically creates the `output-path`
> of a process.  
>
> Currently, I have to do the following:
>
> output-path "output-of"
> packages ... "coreutils" ...
> # {
>   ...
>   mkdir {{output-path}}
>   ...
> }
>
> I don't really like this because now I need "coretutils" as a dependency
> -- which I tend to reduce to a minimal -- and I also need to manually
> call `mkdir` in my script.

I agree that using coreutils just to have mkdir only to create an output
location is inelegant.

That said: I don’t know if we should have OUTPUT-PATH at all.  It
doesn’t seem to do much other than setting the “out” environment
variable.  It seems to me that this is a vestigal remnant from simpler
times.

It is also used in PROCESS-OUTPUTS as a shared prefix for all declared
outputs.  Is this really useful enough to justify respecting it in
PROCESS-OUTPUTS?  Does it even work correctly with caching and
containerization?

(Maybe we should just remove it…?)

> Would it be possible for GWL to do this instead?

I guess we could have the GWL do this, but in some cases it may not be
desirable.  There are tools that get all offended when the parent
directory of their output files already exists.

-- 
Ricardo


  reply	other threads:[~2022-06-03 18:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02 16:33 Auto-create processe's output-path? Olivier Dion via
2022-06-03 18:43 ` Ricardo Wurmus [this message]
2022-06-03 19:05   ` Olivier Dion via
2022-06-06 10:26     ` Ricardo Wurmus
2022-06-06 13:26       ` Olivier Dion via

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://www.guixwl.org/

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

  git send-email \
    --in-reply-to=87r14560pd.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=gwl-devel@gnu.org \
    --cc=olivier.dion@polymtl.ca \
    /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.
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).