gwl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auto-create processe's output-path?


From: Ricardo Wurmus
Subject: Re: Auto-create processe's output-path?
Date: Fri, 03 Jun 2022 20:43:20 +0200
User-agent: mu4e 1.6.10; emacs 28.1

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 via email to

[Prev in Thread] Current Thread [Next in Thread]