unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Maintaining implementations of similar utility functions like json-fetch
@ 2018-01-26 15:28 Jelle Licht
  2018-01-27 16:09 ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Jelle Licht @ 2018-01-26 15:28 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

Hello!

I noticed that there are currently two very similar functions for fetching
json data; `json-fetch' in (guix import json) and `json-fetch*' in (guix
import github).

Some things I noticed:
- Dealing with http error codes seems to be a bit more robust in
`json-fetch*'.
- Making sure that (compliant) servers give responses in the proper format
seems more robust in `json-fetch' due to using Accept headers.
- Dealing with the fact that json responses are technically allowed to be
lists of objects, which `json-fetch' does not handle gracefully.

For this issue specifically, would it make sense to combine the two
definitions into a more general one?

My more general concern would be on how we can prevent bug fixes only being
applied to one of several nearly identical functions. IOW, should we try to
prevent situations like this from arising, or is it okay if we somehow make
sure that fixes should be applied to both locations?

-- 
Jelle

[-- Attachment #2: Type: text/html, Size: 1141 bytes --]

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

end of thread, other threads:[~2018-06-10 19:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-26 15:28 Maintaining implementations of similar utility functions like json-fetch Jelle Licht
2018-01-27 16:09 ` Ludovic Courtès
2018-01-31 17:32   ` Jelle Licht
2018-02-01 11:54     ` Catonano
2018-02-01 12:14       ` Gábor Boskovits
2018-02-05 13:12     ` Ludovic Courtès
2018-02-05 14:51       ` Alex Vong
2018-06-10 18:50       ` Jelle Licht
2018-06-10 19:54         ` Ludovic Courtès

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