all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Attila Lendvai <attila@lendvai.name>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 55242@debbugs.gnu.org
Subject: [bug#55242] [PATCH 07/10] guix: import: go: More resilience wrt network errors; add logging.
Date: Mon, 09 May 2022 20:02:01 +0000	[thread overview]
Message-ID: <5BVwkhUhKpe_HOgy_US9e5QdB8dwxw3ED31P1VUezGdevXB90Ea2-eh6s2iaiTfMpwITHe5Z-2BVNn5vHGcejoNCe3pkWP2bRWA9QRFmEhY=@lendvai.name> (raw)
In-Reply-To: <91eb2af9b86d2491c9e9f9010b9e3cb2d05dd253.camel@telenet.be>

> Also, given that we appear to have a number of people effectively
> maintaining the Go importer ("git log guix/import.go.scm" mentions a
> few ‘Maxim Cournoyer’, ‘Ludovic Courtès’ ‘Xinglu Chen’ and ‘Sarah
> Morgensen’, and more recently maybe you?) and I don't see any open


note that the list of people *using* the go importer is probably not all that much larger.


> old Go importer bugs/patches on issues.guix.gnu.org, I don't think
> we have to worry about


the fact that the go importer bugs were not even reported into the issue tracker doesn't change much about the fact that i have experienced several problems when i first tried to recursively import a non-trivial go project (which even included issues with http-fetch). it means that all those bug were there, not hidden by exception handling, and yet they have *not* been reported into the issue tracker.

or to put it another way, i think there are just too many unverified assumptions in this discussion about actual user behavior. my strategy in those situations is to expose as much info as feasible, and let the users respond intelligently to the situation.


> 4. The Go importer has some kind of type error or such.
>
> This case looks like an actual bug to me, where I think that
> catching the resulting exceptions is just sweeping things under
> the rug, implicitly teaching other people that it's ok to just
> ignore problems without making any attempt of fixing them or
> reporting them. Vaguely similar to ‘broken windows’
> (https://en.wikipedia.org/wiki/Broken_windows_theory).


note that this patch does not just catch errors, but handles them by emitting useful information about them, and continues only after that.

i consider silently swallowing errors a major sin (read: code that will certainly eat up some portion of someone's life in the future).

the only place where this patch silently swallows errors is in the extraction of descriprions and such, i.e. data that the user must review anyway.


> Sure, for a single particular user and short term this makes the
> importer a bit less useful, but knowing bugs is a prerequisite for
> fixing them, and long term, by actually knowing about the bugs and
> fixing them, more users will benefit.


this patch does not hide any bugs, only enables the code to continue by skipping a package.

and as a bonus: i wouldn't be surprised if it emitted *more* useful information than when allowing the exception to pass through to the caller, because error handling in the guix codebase could use a bit more love.


> That said, like "guix build" has a "--keep-going" option to temporarily
> ignore to some degree packages that fail to build, maybe "guix import"
> (when using --recursive) can have a "--keep-going" option.


ok, i'll look into putting this feature behind a CLI argument, and generalize it to all importers. as time allows i'll get back to the rest of the questions/suggestions, too.

thanks for the feedback Maxime!

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“A great civilization is not conquered from without until it destroys itself from within.”
	— Will Durant





  reply	other threads:[~2022-05-09 20:03 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 11:16 [bug#55242] [PATCH 01/10] guix: import: Print the number of packages at the end Attila Lendvai
2022-05-03 11:42 ` [bug#55242] [PATCH 02/10] guix: import: go: Rename go.pkg.dev-info to pkg.go.dev-info Attila Lendvai
2022-05-03 11:42   ` [bug#55242] [PATCH 03/10] guix: import: go: Add mockup logging facility Attila Lendvai
2022-05-03 16:23     ` Maxime Devos
2022-06-14 19:46     ` [bug#55242] [PATCH 01/10] guix: import: Print the number of packages at the end Maxim Cournoyer
2022-05-03 11:42   ` [bug#55242] [PATCH 04/10] guix: import: go: Fix the interpretation of the replace directive Attila Lendvai
2022-05-03 16:25     ` Maxime Devos
2022-05-03 16:26     ` Maxime Devos
2022-05-03 16:27     ` Maxime Devos
2022-05-03 16:28     ` Maxime Devos
2022-05-03 11:42   ` [bug#55242] [PATCH 05/10] guix: import: go: Harden sxml->texi conversion Attila Lendvai
2022-05-03 16:32     ` Maxime Devos
2022-05-03 11:42   ` [bug#55242] [PATCH 06/10] guix: import: go: Add a local duplicate of http-fetch Attila Lendvai
2022-05-03 11:42   ` [bug#55242] [PATCH 07/10] guix: import: go: More resilience wrt network errors; add logging Attila Lendvai
2022-05-03 16:12     ` Maxime Devos
2022-05-03 17:00       ` Attila Lendvai
2022-05-03 17:38         ` Maxime Devos
2022-05-09 12:34           ` Attila Lendvai
2022-05-09 17:45             ` Maxime Devos
2022-05-09 20:02               ` Attila Lendvai [this message]
2022-05-09 20:08                 ` Maxime Devos
2022-05-03 16:17     ` Maxime Devos
2022-05-03 16:36     ` Maxime Devos
2022-05-03 16:37     ` Maxime Devos
2022-05-03 11:42   ` [bug#55242] [PATCH 08/10] guix: import: go: Modules in a subdir and prefixed tags Attila Lendvai
2022-05-03 16:42     ` Maxime Devos
2022-05-03 16:48     ` Maxime Devos
2022-05-03 16:50     ` Maxime Devos
2022-05-09 12:50       ` Attila Lendvai
2022-05-03 16:51     ` Maxime Devos
2022-05-03 16:53     ` Maxime Devos
2022-05-03 16:55     ` Maxime Devos
2022-05-03 16:56     ` Maxime Devos
2022-05-03 16:59     ` Maxime Devos
2022-05-03 17:00     ` Maxime Devos
2022-05-03 17:01     ` Maxime Devos
2022-05-03 11:43   ` [bug#55242] [PATCH 09/10] guix: import: go: module-name -> module-path to be consistent Attila Lendvai
2022-05-03 11:43   ` [bug#55242] [PATCH 10/10] guix: import: go: Better handling of /v2 in the module path Attila Lendvai
2022-05-09 20:39     ` Maxime Devos
2022-05-03 16:22   ` [bug#55242] [PATCH 02/10] guix: import: go: Rename go.pkg.dev-info to pkg.go.dev-info Maxime Devos
2022-05-03 16:21 ` [bug#55242] [PATCH 01/10] guix: import: Print the number of packages at the end Maxime Devos
2022-05-03 17:29 ` Maxime Devos
2022-05-09 12:37   ` Attila Lendvai
2022-05-14  7:09 ` Maxime Devos
2022-05-14  7:15 ` Maxime Devos

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

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

  git send-email \
    --in-reply-to='5BVwkhUhKpe_HOgy_US9e5QdB8dwxw3ED31P1VUezGdevXB90Ea2-eh6s2iaiTfMpwITHe5Z-2BVNn5vHGcejoNCe3pkWP2bRWA9QRFmEhY=@lendvai.name' \
    --to=attila@lendvai.name \
    --cc=55242@debbugs.gnu.org \
    --cc=maximedevos@telenet.be \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.