GNU bug report logs -
#35387
unpack phase in gnu-build-system is non-deterministic
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35387 in the body.
You can then email your comments to 35387 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#35387
; Package
guix
.
(Tue, 23 Apr 2019 07:17:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Christopher Baines <mail <at> cbaines.net>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Tue, 23 Apr 2019 07:17:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I believe that the direnv package has encountered an issue with the
gnu-build-system [1].
1: https://issues.guix.info/issue/35386
Due to the combination of the 'setup-go-environment phase from the
go-build-system, and the 'unpack phase of the gnu-build-system, there
are two directories to be considered by first-subdirectory when called
from the unpack phase.
It seems from direnv that this either consistently, with the package
working on one machine, or failing consistently on another.
To avoid issues like this in the future, I think it would be good to
have first-subdirectory raise an error if it's behaviour could be
non-deterministic.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#35387
; Package
guix
.
(Tue, 23 Apr 2019 14:37:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 35387 <at> debbugs.gnu.org (full text, mbox):
Hi Chris,
Christopher Baines <mail <at> cbaines.net> skribis:
> I believe that the direnv package has encountered an issue with the
> gnu-build-system [1].
>
> 1: https://issues.guix.info/issue/35386
>
> Due to the combination of the 'setup-go-environment phase from the
> go-build-system, and the 'unpack phase of the gnu-build-system, there
> are two directories to be considered by first-subdirectory when called
> from the unpack phase.
>
> It seems from direnv that this either consistently, with the package
> working on one machine, or failing consistently on another.
>
> To avoid issues like this in the future, I think it would be good to
> have first-subdirectory raise an error if it's behaviour could be
> non-deterministic.
‘file-system-fold’ is just a wrapper around ‘readdir’ so the order in
which it sees directory entries is non-deterministic.
What about writing it like this:
(define (first-subdirectory directory)
"Return the file name of the first sub-directory of DIRECTORY."
(match (scandir directory
(lambda (file)
(and (not (member file '("." "..")))
(file-is-directory? (string-append directory "/"
file)))))
((first . _) first)))
The result will be deterministic since ‘scandir’ sorts entries.
Thanks,
Ludo’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#35387
; Package
guix
.
(Tue, 30 Apr 2019 07:03:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 35387 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hi Chris,
>
> Christopher Baines <mail <at> cbaines.net> skribis:
>
>> I believe that the direnv package has encountered an issue with the
>> gnu-build-system [1].
>>
>> 1: https://issues.guix.info/issue/35386
>>
>> Due to the combination of the 'setup-go-environment phase from the
>> go-build-system, and the 'unpack phase of the gnu-build-system, there
>> are two directories to be considered by first-subdirectory when called
>> from the unpack phase.
>>
>> It seems from direnv that this either consistently, with the package
>> working on one machine, or failing consistently on another.
>>
>> To avoid issues like this in the future, I think it would be good to
>> have first-subdirectory raise an error if it's behaviour could be
>> non-deterministic.
>
> ‘file-system-fold’ is just a wrapper around ‘readdir’ so the order in
> which it sees directory entries is non-deterministic.
>
> What about writing it like this:
>
> (define (first-subdirectory directory)
> "Return the file name of the first sub-directory of DIRECTORY."
> (match (scandir directory
> (lambda (file)
> (and (not (member file '("." "..")))
> (file-is-directory? (string-append directory "/"
> file)))))
> ((first . _) first)))
>
> The result will be deterministic since ‘scandir’ sorts entries.
That sounds great :)
[signature.asc (application/pgp-signature, inline)]
Changed bug title to 'unpack phase in gnu-build-system is non-deterministic' from 'unpack phase in the gnu-build-system is sometimes non-deterministic'
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 14 Jun 2019 21:05:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Fri, 14 Jun 2019 21:44:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Christopher Baines <mail <at> cbaines.net>
:
bug acknowledged by developer.
(Fri, 14 Jun 2019 21:44:03 GMT)
Full text and
rfc822 format available.
Message #18 received at 35387-done <at> debbugs.gnu.org (full text, mbox):
Ludovic Courtès <ludo <at> gnu.org> skribis:
> What about writing it like this:
>
> (define (first-subdirectory directory)
> "Return the file name of the first sub-directory of DIRECTORY."
> (match (scandir directory
> (lambda (file)
> (and (not (member file '("." "..")))
> (file-is-directory? (string-append directory "/"
> file)))))
> ((first . _) first)))
>
> The result will be deterministic since ‘scandir’ sorts entries.
Pushed as cfd4e4d06e3cda0f3eed8d6b9277ce53e55404b8 on ‘core-updates’.
Thanks,
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 13 Jul 2019 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 282 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.