unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for meson-build-system.
@ 2024-09-04 16:26 Dariqq
  2024-09-11  6:09 ` Maxim Cournoyer
  0 siblings, 1 reply; 9+ messages in thread
From: Dariqq @ 2024-09-04 16:26 UTC (permalink / raw)
  To: 73028; +Cc: Dariqq, Florian Pelz, Ludovic Courtès, Maxim Cournoyer

Followup to 220546810830422f8ec3e6a4145fec85429914a1.

* doc/guix.texi (meson-build-system): Document #:out-of-source? parameter.

Change-Id: I730e1aef15010006a68710f8e46ce75dc50e6c67
---
 doc/guix.texi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 16c697586a..2302e0f15c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10146,6 +10146,10 @@ Build Systems
 of inputs, and they can be changed with the parameters @code{#:meson}
 and @code{#:ninja} if needed.
 
+As Meson only supports out-of-source builds the @code{#:out-of-source?}
+parameter specifies whether to search for license files in the source
+or build directory.
+
 This build system is an extension of @code{gnu-build-system}, but with the
 following phases changed to some specific for Meson:
 

base-commit: 9a03ab25ba889be27b34d5cebea05d5ac3b0a033
-- 
2.45.2





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

* [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for meson-build-system.
  2024-09-04 16:26 [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for meson-build-system Dariqq
@ 2024-09-11  6:09 ` Maxim Cournoyer
  2024-09-11 15:18   ` Dariqq
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2024-09-11  6:09 UTC (permalink / raw)
  To: Dariqq; +Cc: Ludovic Courtès, 73028, Florian Pelz

Hi Dariqq,

Dariqq <dariqq@posteo.net> writes:

> Followup to 220546810830422f8ec3e6a4145fec85429914a1.
>
> * doc/guix.texi (meson-build-system): Document #:out-of-source? parameter.
>
> Change-Id: I730e1aef15010006a68710f8e46ce75dc50e6c67
> ---
>  doc/guix.texi | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 16c697586a..2302e0f15c 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -10146,6 +10146,10 @@ Build Systems
>  of inputs, and they can be changed with the parameters @code{#:meson}
>  and @code{#:ninja} if needed.
>  
> +As Meson only supports out-of-source builds the @code{#:out-of-source?}
> +parameter specifies whether to search for license files in the source
> +or build directory.
> +

That strikes me as odd; is it useful in practice?  Otherwise I'd rather
we keep it undocumented, so that it can be removed without notice in a
future cleanup (in a 'private API' way).

-- 
Thanks,
Maxim




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

* [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for meson-build-system.
  2024-09-11  6:09 ` Maxim Cournoyer
@ 2024-09-11 15:18   ` Dariqq
  2024-09-12  0:56     ` Maxim Cournoyer
  0 siblings, 1 reply; 9+ messages in thread
From: Dariqq @ 2024-09-11 15:18 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Ludovic Courtès, 73028, Florian Pelz

Hi Maxim,


On 11.09.24 08:09, Maxim Cournoyer wrote:
> Hi Dariqq,
> 
> Dariqq <dariqq@posteo.net> writes:
> 
> 
> That strikes me as odd; is it useful in practice?  Otherwise I'd rather
> we keep it undocumented, so that it can be removed without notice in a
> future cleanup (in a 'private API' way).
> 

Ludovic asked me to document the new parameter, so I added something for 
the current behaviour.

Because I don't think the message arrived at the original issue, i 
copied below. I hope this is ok:

> On 04.09.24 16:02, Ludovic Courtès wrote:
> AFAICS these changes are not sufficient because ‘configure’ in
> meson-build-system.scm does not honor #:out-of-source? (unlike
> ‘configure’ in gnu-build-system.scm).
> 
> So if I’m not mistaken, you’ll need to change ‘configure’ as well.
> 
> You can also update doc/guix.texi under “Build Systems” to mention this
> parameter.
> 
> Last: ‘guix refresh -l meson’ shows that this is almost a world-rebuild
> change (23K dependents), so we’ll need to have this change in a separate
> branch.
> 
> Could you send an updated patch?
> 
> Thanks,
> Ludo’.

I have sent this patch for the documentation part but am still unsure 
what is meant by *sufficient* because meson cannot do in source builds.

Maybe it should not be an option at all and instead be #t 
unconditionally in 'install-license-files phase in meson-build-system?




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

* [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for meson-build-system.
  2024-09-11 15:18   ` Dariqq
@ 2024-09-12  0:56     ` Maxim Cournoyer
  2024-09-12  7:12       ` Dariqq
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2024-09-12  0:56 UTC (permalink / raw)
  To: Dariqq; +Cc: Ludovic Courtès, 73028, Florian Pelz

Hi Dariqq,

Dariqq <dariqq@posteo.net> writes:

> Hi Maxim,
>
>
> On 11.09.24 08:09, Maxim Cournoyer wrote:
>> Hi Dariqq,
>> Dariqq <dariqq@posteo.net> writes:
>> That strikes me as odd; is it useful in practice?  Otherwise I'd
>> rather
>> we keep it undocumented, so that it can be removed without notice in a
>> future cleanup (in a 'private API' way).
>> 
>
> Ludovic asked me to document the new parameter, so I added something
> for the current behaviour.
>
> Because I don't think the message arrived at the original issue, i
> copied below. I hope this is ok:
>
>> On 04.09.24 16:02, Ludovic Courtès wrote:
>> AFAICS these changes are not sufficient because ‘configure’ in
>> meson-build-system.scm does not honor #:out-of-source? (unlike
>> ‘configure’ in gnu-build-system.scm).
>> So if I’m not mistaken, you’ll need to change ‘configure’ as well.
>> You can also update doc/guix.texi under “Build Systems” to mention
>> this
>> parameter.
>> Last: ‘guix refresh -l meson’ shows that this is almost a
>> world-rebuild
>> change (23K dependents), so we’ll need to have this change in a separate
>> branch.
>> Could you send an updated patch?
>> Thanks,
>> Ludo’.
>
> I have sent this patch for the documentation part but am still unsure
> what is meant by *sufficient* because meson cannot do in source
> builds.

I'm still out of context; is there an original bug number to refer to to
better understand what was the root problem being addressed?

> Maybe it should not be an option at all and instead be #t
> unconditionally in 'install-license-files phase in meson-build-system?

Given most build phases of the gnu-build-system, which support
#:out-of-source? are reused in the meson-build-system, this argument
needs to be set to #t (which it currently is).  But perhaps there's a
way to hide it from the users, perhaps via the 'private-keywords'
variable defined in the 'lower' procedure of the (guix build-system
meson) module (I haven't tested).

-- 
Thanks,
Maxim




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

* [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for meson-build-system.
  2024-09-12  0:56     ` Maxim Cournoyer
@ 2024-09-12  7:12       ` Dariqq
  2024-09-12 12:02         ` Maxim Cournoyer
  0 siblings, 1 reply; 9+ messages in thread
From: Dariqq @ 2024-09-12  7:12 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Ludovic Courtès, 73028, Florian Pelz

Hi,

On 12.09.24 02:56, Maxim Cournoyer wrote:
> Hi Dariqq,
> 
> Dariqq <dariqq@posteo.net> writes:
> 
>> Hi Maxim,
>>
>>
>> On 11.09.24 08:09, Maxim Cournoyer wrote:
>>> Hi Dariqq,
>>> Dariqq <dariqq@posteo.net> writes:
>>> That strikes me as odd; is it useful in practice?  Otherwise I'd
>>> rather
>>> we keep it undocumented, so that it can be removed without notice in a
>>> future cleanup (in a 'private API' way).
>>>
>>
>> Ludovic asked me to document the new parameter, so I added something
>> for the current behaviour.
>>
>> Because I don't think the message arrived at the original issue, i
>> copied below. I hope this is ok:
>>
>>> On 04.09.24 16:02, Ludovic Courtès wrote:
>>> AFAICS these changes are not sufficient because ‘configure’ in
>>> meson-build-system.scm does not honor #:out-of-source? (unlike
>>> ‘configure’ in gnu-build-system.scm).
>>> So if I’m not mistaken, you’ll need to change ‘configure’ as well.
>>> You can also update doc/guix.texi under “Build Systems” to mention
>>> this
>>> parameter.
>>> Last: ‘guix refresh -l meson’ shows that this is almost a
>>> world-rebuild
>>> change (23K dependents), so we’ll need to have this change in a separate
>>> branch.
>>> Could you send an updated patch?
>>> Thanks,
>>> Ludo’.
>>
>> I have sent this patch for the documentation part but am still unsure
>> what is meant by *sufficient* because meson cannot do in source
>> builds.
> 
> I'm still out of context; is there an original bug number to refer to to
> better understand what was the root problem being addressed?
> 

Sorry I should have added that. The problem I was trying to solve is 
https://issues.guix.gnu.org/70999.

TLDR is that meson-build-system was failing to find and install license 
files for many packages because it would search for licenses in the 
build directory rather than the source directory. (which might be 
against the terms of the license)

>> Maybe it should not be an option at all and instead be #t
>> unconditionally in 'install-license-files phase in meson-build-system?
> 
> Given most build phases of the gnu-build-system, which support
> #:out-of-source? are reused in the meson-build-system, this argument
> needs to be set to #t (which it currently is).  But perhaps there's a
> way to hide it from the users, perhaps via the 'private-keywords'
> variable defined in the 'lower' procedure of the (guix build-system
> meson) module (I haven't tested).
> 

Something like that might be a better solution. I am not sure how these 
'private-keywords' work: It looks like #:meson is one but you can 
definitly override the default meson being used. Also the 
private-arguments seem to get stripped from the arguments in the bag 
(not sure what that is exactly) so they might not be passed to the build 
phases


Would such a change require rebuilding (basically) everything given that 
currently all packages are already built with #:out-of-source? set to 
the default value #t?





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

* [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for meson-build-system.
  2024-09-12  7:12       ` Dariqq
@ 2024-09-12 12:02         ` Maxim Cournoyer
  2024-09-12 19:19           ` Dariqq
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2024-09-12 12:02 UTC (permalink / raw)
  To: Dariqq; +Cc: Ludovic Courtès, 73028, Florian Pelz

Hi Dariqq,

Dariqq <dariqq@posteo.net> writes:

[...]

>>> Maybe it should not be an option at all and instead be #t
>>> unconditionally in 'install-license-files phase in meson-build-system?
>> Given most build phases of the gnu-build-system, which support
>> #:out-of-source? are reused in the meson-build-system, this argument
>> needs to be set to #t (which it currently is).  But perhaps there's a
>> way to hide it from the users, perhaps via the 'private-keywords'
>> variable defined in the 'lower' procedure of the (guix build-system
>> meson) module (I haven't tested).
>> 
>
> Something like that might be a better solution. I am not sure how
> these 'private-keywords' work: It looks like #:meson is one but you
> can definitly override the default meson being used. Also the
> private-arguments seem to get stripped from the arguments in the bag
> (not sure what that is exactly) so they might not be passed to the
> build phases

I think your understanding is correct. The private options are accepted
on the build system, but not propagated to the lower build strata
(applied to phases).  So what we'd like here is to *not* expose an
#:out-of-source argument at the build system level, and enforce
#:out-of-source #t for the lower build code.  I guess the static #t
argument could be added to the bag arguments.

>
> Would such a change require rebuilding (basically) everything given
> that currently all packages are already built with #:out-of-source?
> set to the default value #t?

Yes.  To test this kind of change without having to wait for the world
to rebuild first, I sometimes make a copy of the build system files and
suffix them with -v2 or something. It's a bit of a pain, but faster than
waiting for 20k packages to be built.

-- 
Thanks,
Maxim




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

* [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for meson-build-system.
  2024-09-12 12:02         ` Maxim Cournoyer
@ 2024-09-12 19:19           ` Dariqq
  2024-09-14 13:41             ` Maxim Cournoyer
  0 siblings, 1 reply; 9+ messages in thread
From: Dariqq @ 2024-09-12 19:19 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Ludovic Courtès, 73028, Florian Pelz



On 12.09.24 14:02, Maxim Cournoyer wrote:
> Hi Dariqq,
> 
> Dariqq <dariqq@posteo.net> writes:
> 
> [...]
> 
>>>> Maybe it should not be an option at all and instead be #t
>>>> unconditionally in 'install-license-files phase in meson-build-system?
>>> Given most build phases of the gnu-build-system, which support
>>> #:out-of-source? are reused in the meson-build-system, this argument
>>> needs to be set to #t (which it currently is).  But perhaps there's a
>>> way to hide it from the users, perhaps via the 'private-keywords'
>>> variable defined in the 'lower' procedure of the (guix build-system
>>> meson) module (I haven't tested).
>>>
>>
>> Something like that might be a better solution. I am not sure how
>> these 'private-keywords' work: It looks like #:meson is one but you
>> can definitly override the default meson being used. Also the
>> private-arguments seem to get stripped from the arguments in the bag
>> (not sure what that is exactly) so they might not be passed to the
>> build phases
> 
> I think your understanding is correct. The private options are accepted
> on the build system, but not propagated to the lower build strata
> (applied to phases).  So what we'd like here is to *not* expose an
> #:out-of-source argument at the build system level, and enforce
> #:out-of-source #t for the lower build code.  I guess the static #t
> argument could be added to the bag arguments.
> 

This does not work. I tried adding that to the arguments in the bag (and 
reverting the previous patch) but get an error:

Unrecognized keyword: #:out-of-source?

I guess this is because meson-(cross-)build now get a keyword they don't 
know.


Maybe we could replace the install-license-files function with a version 
that has #:out-of-source? set to #t?. Not sure if there is an elegant 
way to do this?

>>
>> Would such a change require rebuilding (basically) everything given
>> that currently all packages are already built with #:out-of-source?
>> set to the default value #t?
> 
> Yes.  To test this kind of change without having to wait for the world
> to rebuild first, I sometimes make a copy of the build system files and
> suffix them with -v2 or something. It's a bit of a pain, but faster than
> waiting for 20k packages to be built.
> 

Previously i have been using the tio package for testing because it had 
no other dependencies depending on meson. However since it got upgraded 
it now depends on glib ...




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

* [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for meson-build-system.
  2024-09-12 19:19           ` Dariqq
@ 2024-09-14 13:41             ` Maxim Cournoyer
  2024-09-19 14:07               ` Dariqq
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2024-09-14 13:41 UTC (permalink / raw)
  To: Dariqq; +Cc: Ludovic Courtès, 73028, Florian Pelz

Hi Dariqq,

Dariqq <dariqq@posteo.net> writes:

> On 12.09.24 14:02, Maxim Cournoyer wrote:
>> Hi Dariqq,
>> Dariqq <dariqq@posteo.net> writes:
>> [...]
>> 
>>>>> Maybe it should not be an option at all and instead be #t
>>>>> unconditionally in 'install-license-files phase in meson-build-system?
>>>> Given most build phases of the gnu-build-system, which support
>>>> #:out-of-source? are reused in the meson-build-system, this argument
>>>> needs to be set to #t (which it currently is).  But perhaps there's a
>>>> way to hide it from the users, perhaps via the 'private-keywords'
>>>> variable defined in the 'lower' procedure of the (guix build-system
>>>> meson) module (I haven't tested).
>>>>
>>>
>>> Something like that might be a better solution. I am not sure how
>>> these 'private-keywords' work: It looks like #:meson is one but you
>>> can definitly override the default meson being used. Also the
>>> private-arguments seem to get stripped from the arguments in the bag
>>> (not sure what that is exactly) so they might not be passed to the
>>> build phases
>> I think your understanding is correct. The private options are
>> accepted
>> on the build system, but not propagated to the lower build strata
>> (applied to phases).  So what we'd like here is to *not* expose an
>> #:out-of-source argument at the build system level, and enforce
>> #:out-of-source #t for the lower build code.  I guess the static #t
>> argument could be added to the bag arguments.
>> 
>
> This does not work. I tried adding that to the arguments in the bag
> (and reverting the previous patch) but get an error:
>
> Unrecognized keyword: #:out-of-source?
>
> I guess this is because meson-(cross-)build now get a keyword they
> don't know.

Hm.  Thanks for trying it out.

> Maybe we could replace the install-license-files function with a
> version that has #:out-of-source? set to #t?. Not sure if there is an
> elegant way to do this?

Is this really the only reused phase from gnu-build-system that makes
use of #:out-of-source?  I'd expect the 'configure' to be one, also.
And in general it'd be a bit more risky; new gnu-build-system phases
that would make use of #:out-of-source could start breaking in the
future until thye are specially handled.

-- 
Thanks,
Maxim




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

* [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for meson-build-system.
  2024-09-14 13:41             ` Maxim Cournoyer
@ 2024-09-19 14:07               ` Dariqq
  0 siblings, 0 replies; 9+ messages in thread
From: Dariqq @ 2024-09-19 14:07 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: Ludovic Courtès, 73028, Florian Pelz



On 14.09.24 15:41, Maxim Cournoyer wrote:
> Hi Dariqq,
> 
> Dariqq <dariqq@posteo.net> writes:
> 
>>
>> This does not work. I tried adding that to the arguments in the bag
>> (and reverting the previous patch) but get an error:
>>
>> Unrecognized keyword: #:out-of-source?
>>
>> I guess this is because meson-(cross-)build now get a keyword they
>> don't know.
> 
> Hm.  Thanks for trying it out.
> 
Not an expert on how this works but it looks like when a phase has a 
keyword that is not being passed in by the build-system it is treated as 
#f even if there is no default parameter specified in 
install-license-files function itself.

If there is no easy other way what about leaving the parameter 
undocumented as is? Maybe Ludo can elaborate on what the original 
concern was?

>> Maybe we could replace the install-license-files function with a
>> version that has #:out-of-source? set to #t?. Not sure if there is an
>> elegant way to do this?
> 
> Is this really the only reused phase from gnu-build-system that makes
> use of #:out-of-source?  I'd expect the 'configure' to be one, also.
> And in general it'd be a bit more risky; new gnu-build-system phases
> that would make use of #:out-of-source could start breaking in the
> future until thye are specially handled.
> 

As far as I can see only the configure phase and the 
install-license-phase in gnu-build-system use that parameter. As meson 
overwrites configure with its own it only the install-license-files 
phase uses it.




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

end of thread, other threads:[~2024-09-19 14:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-04 16:26 [bug#73028] [PATCH] doc: Document usage of #:out-of-source? for meson-build-system Dariqq
2024-09-11  6:09 ` Maxim Cournoyer
2024-09-11 15:18   ` Dariqq
2024-09-12  0:56     ` Maxim Cournoyer
2024-09-12  7:12       ` Dariqq
2024-09-12 12:02         ` Maxim Cournoyer
2024-09-12 19:19           ` Dariqq
2024-09-14 13:41             ` Maxim Cournoyer
2024-09-19 14:07               ` Dariqq

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