unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* configurable guile backtrace in builder (was: services: base: Add extra-env support to guix-configuration)
       [not found]   ` <87r0vas5zx.fsf_-_@gnu.org>
@ 2023-02-01 18:31     ` Maxim Cournoyer
  2023-02-08  9:39       ` configurable guile backtrace in builder Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Maxim Cournoyer @ 2023-02-01 18:31 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Mathieu Othacehe, guix-devel

+CC guix-devel

Hello!

Ludovic Courtès <ludo@gnu.org> writes:

> Hi!
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> Side topic: I wonder if (with some changes to the daemon -- perhaps in
>> DerivationGoal::startBuilder) in nix/libstore/build.cc we could leak the
>> COLUMNS variable to be able to control the Guile builder backtrace
>> width.
>
> As a rule of thumb, I think we should keep the build environment
> unchanged forever—no changes to the set of environment variables and
> files/directories present in the build environment.
>
> It’s important because the whole reproducibile-by-construction approach
> depends on that.

I understand it can be risky to change anything on the builder side for
reproducibility.  Would you have an idea of the angle this problem
should be approached from, where the goal is to have a configurable
Guile backtrace width in the builder?

-- 
Thanks,
Maxim


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

* Re: configurable guile backtrace in builder
  2023-02-01 18:31     ` configurable guile backtrace in builder (was: services: base: Add extra-env support to guix-configuration) Maxim Cournoyer
@ 2023-02-08  9:39       ` Ludovic Courtès
  2023-02-08 16:09         ` Maxim Cournoyer
  2023-02-09  9:24         ` Attila Lendvai
  0 siblings, 2 replies; 4+ messages in thread
From: Ludovic Courtès @ 2023-02-08  9:39 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Mathieu Othacehe, guix-devel

Hi Maxim,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:

[...]

>> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>>
>>> Side topic: I wonder if (with some changes to the daemon -- perhaps in
>>> DerivationGoal::startBuilder) in nix/libstore/build.cc we could leak the
>>> COLUMNS variable to be able to control the Guile builder backtrace
>>> width.
>>
>> As a rule of thumb, I think we should keep the build environment
>> unchanged forever—no changes to the set of environment variables and
>> files/directories present in the build environment.
>>
>> It’s important because the whole reproducibile-by-construction approach
>> depends on that.
>
> I understand it can be risky to change anything on the builder side for
> reproducibility.

It’s not that it’s risky, it’s something we should never do; it’s crucial.

> Would you have an idea of the angle this problem should be approached
> from, where the goal is to have a configurable Guile backtrace width
> in the builder?

How about passing #:env-vars '(("COLUMNS" . "200")) to
‘gexp->derivation’ (in the build system), or adding a phase that sets
that environment variable?

HTH,
Ludo’.


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

* Re: configurable guile backtrace in builder
  2023-02-08  9:39       ` configurable guile backtrace in builder Ludovic Courtès
@ 2023-02-08 16:09         ` Maxim Cournoyer
  2023-02-09  9:24         ` Attila Lendvai
  1 sibling, 0 replies; 4+ messages in thread
From: Maxim Cournoyer @ 2023-02-08 16:09 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Mathieu Othacehe, guix-devel

Hello,

Ludovic Courtès <ludo@gnu.org> writes:

> Hi Maxim,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>
> [...]
>
>>> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>>>
>>>> Side topic: I wonder if (with some changes to the daemon -- perhaps in
>>>> DerivationGoal::startBuilder) in nix/libstore/build.cc we could leak the
>>>> COLUMNS variable to be able to control the Guile builder backtrace
>>>> width.
>>>
>>> As a rule of thumb, I think we should keep the build environment
>>> unchanged forever—no changes to the set of environment variables and
>>> files/directories present in the build environment.
>>>
>>> It’s important because the whole reproducibile-by-construction approach
>>> depends on that.
>>
>> I understand it can be risky to change anything on the builder side for
>> reproducibility.
>
> It’s not that it’s risky, it’s something we should never do; it’s crucial.

Okay.

>> Would you have an idea of the angle this problem should be approached
>> from, where the goal is to have a configurable Guile backtrace width
>> in the builder?
>
> How about passing #:env-vars '(("COLUMNS" . "200")) to
> ‘gexp->derivation’ (in the build system), or adding a phase that sets
> that environment variable?

That sounds like a reasonable solution to me!  It's pretty "fixed" while
I would have preferred a user-configurable value, but it's better than
the current situation, so I'd say let's go for it on core-updates!

-- 
Thanks,
Maxim


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

* Re: configurable guile backtrace in builder
  2023-02-08  9:39       ` configurable guile backtrace in builder Ludovic Courtès
  2023-02-08 16:09         ` Maxim Cournoyer
@ 2023-02-09  9:24         ` Attila Lendvai
  1 sibling, 0 replies; 4+ messages in thread
From: Attila Lendvai @ 2023-02-09  9:24 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: Maxim Cournoyer, Mathieu Othacehe, guix-devel

> How about passing #:env-vars '(("COLUMNS" . "200")) to
> ‘gexp->derivation’ (in the build system), or adding a phase that sets
> that environment variable?


i assume printed guile backtraces should not be part of the normal output of any package.

and then why not introduce an env variable (or some other way) that only affects the backtrace, and nothing else?

-- 
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
If the source of fear is the unknown, and fear is the only way to be controlled, then knowledge is the only way to be free.



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

end of thread, other threads:[~2023-02-09  9:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20230107181938.14334-1-othacehe@gnu.org>
     [not found] ` <871qo0j1zn.fsf@gmail.com>
     [not found]   ` <87r0vas5zx.fsf_-_@gnu.org>
2023-02-01 18:31     ` configurable guile backtrace in builder (was: services: base: Add extra-env support to guix-configuration) Maxim Cournoyer
2023-02-08  9:39       ` configurable guile backtrace in builder Ludovic Courtès
2023-02-08 16:09         ` Maxim Cournoyer
2023-02-09  9:24         ` Attila Lendvai

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