unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26860: [PATCH] Remove hard dependency on guile-json
@ 2017-05-09 19:53 Alex Kost
  2017-05-09 20:43 ` Danny Milosavljevic
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Alex Kost @ 2017-05-09 19:53 UTC (permalink / raw)
  To: 26860

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

Hello.  Currently, Guix cannot be built without guile-json.  The
attached patch fixes it.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-build-Compile-stackage-only-if-guile-json-is-availab.patch --]
[-- Type: text/x-diff, Size: 1124 bytes --]

From 3a65a2f35b54604327ba69a55381fee0faac18e7 Mon Sep 17 00:00:00 2001
From: Alex Kost <alezost@gmail.com>
Date: Tue, 9 May 2017 22:44:19 +0300
Subject: [PATCH] build: Compile stackage only if 'guile-json' is available.

This is a followup to commit 3089b5d3f5a31b191b68ce3aa9255b646940b642.

* Makefile.am (MODULES): Move "guix/scripts/import/stackage.scm" within
'if HAVE_GUILE_JSON'.
---
 Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index f6a8f66..8ea4f4b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -159,7 +159,6 @@ MODULES =					\
   guix/scripts/import/gnu.scm			\
   guix/scripts/import/nix.scm			\
   guix/scripts/import/hackage.scm		\
-  guix/scripts/import/stackage.scm		\
   guix/scripts/import/elpa.scm  		\
   guix/scripts/environment.scm			\
   guix/scripts/publish.scm			\
@@ -184,7 +183,8 @@ MODULES +=					\
   guix/import/stackage.scm			\
   guix/scripts/import/crate.scm			\
   guix/scripts/import/gem.scm			\
-  guix/scripts/import/pypi.scm
+  guix/scripts/import/pypi.scm			\
+  guix/scripts/import/stackage.scm
 
 endif
 
-- 
2.10.2


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

* bug#26860: [PATCH] Remove hard dependency on guile-json
  2017-05-09 19:53 bug#26860: [PATCH] Remove hard dependency on guile-json Alex Kost
@ 2017-05-09 20:43 ` Danny Milosavljevic
  2017-05-10  6:38 ` Ricardo Wurmus
  2017-05-17 13:29 ` Ludovic Courtès
  2 siblings, 0 replies; 6+ messages in thread
From: Danny Milosavljevic @ 2017-05-09 20:43 UTC (permalink / raw)
  To: Alex Kost; +Cc: 26860

LGTM!

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

* bug#26860: [PATCH] Remove hard dependency on guile-json
  2017-05-09 19:53 bug#26860: [PATCH] Remove hard dependency on guile-json Alex Kost
  2017-05-09 20:43 ` Danny Milosavljevic
@ 2017-05-10  6:38 ` Ricardo Wurmus
  2017-05-10 19:18   ` Alex Kost
  2017-05-17  8:33   ` Ludovic Courtès
  2017-05-17 13:29 ` Ludovic Courtès
  2 siblings, 2 replies; 6+ messages in thread
From: Ricardo Wurmus @ 2017-05-10  6:38 UTC (permalink / raw)
  To: Alex Kost; +Cc: 26860


Alex Kost <alezost@gmail.com> writes:

> Hello.  Currently, Guix cannot be built without guile-json.  The
> attached patch fixes it.
>
>>From 3a65a2f35b54604327ba69a55381fee0faac18e7 Mon Sep 17 00:00:00 2001
> From: Alex Kost <alezost@gmail.com>
> Date: Tue, 9 May 2017 22:44:19 +0300
> Subject: [PATCH] build: Compile stackage only if 'guile-json' is available.
>
> This is a followup to commit 3089b5d3f5a31b191b68ce3aa9255b646940b642.
>
> * Makefile.am (MODULES): Move "guix/scripts/import/stackage.scm" within
> 'if HAVE_GUILE_JSON'.

Would it not work to autoload the module?
“guix/scripts/import/stackage.scm” itself does not require guile json.

Something like that is done in commit
fad5f5fb8dffb4a1cbe40ee9d31a346b901305d1 (in the unmerged wip-installer
branch).

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

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

* bug#26860: [PATCH] Remove hard dependency on guile-json
  2017-05-10  6:38 ` Ricardo Wurmus
@ 2017-05-10 19:18   ` Alex Kost
  2017-05-17  8:33   ` Ludovic Courtès
  1 sibling, 0 replies; 6+ messages in thread
From: Alex Kost @ 2017-05-10 19:18 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 26860

Ricardo Wurmus (2017-05-10 08:38 +0200) wrote:

> Alex Kost <alezost@gmail.com> writes:
>
>> Hello.  Currently, Guix cannot be built without guile-json.  The
>> attached patch fixes it.
>>
>>>From 3a65a2f35b54604327ba69a55381fee0faac18e7 Mon Sep 17 00:00:00 2001
>> From: Alex Kost <alezost@gmail.com>
>> Date: Tue, 9 May 2017 22:44:19 +0300
>> Subject: [PATCH] build: Compile stackage only if 'guile-json' is available.
>>
>> This is a followup to commit 3089b5d3f5a31b191b68ce3aa9255b646940b642.
>>
>> * Makefile.am (MODULES): Move "guix/scripts/import/stackage.scm" within
>> 'if HAVE_GUILE_JSON'.
>
> Would it not work to autoload the module?

Sorry, I have no idea, I didn't test :-)

I can only say that currently the build fails if guile-json is not
available, so I came up with a simple fix.

> “guix/scripts/import/stackage.scm” itself does not require guile json.

Right, it requires (guix import stackage) which requires (guix import
json) which requires (json), but not directly.

> Something like that is done in commit
> fad5f5fb8dffb4a1cbe40ee9d31a346b901305d1 (in the unmerged wip-installer
> branch).

I don't know, this seems over-complicated to me.  Does it really make
sense to leave "guix/import/stackage.scm" inside "if HAVE_GUILE_JSON"
and "guix/scripts/import/stackage.scm" outside?

I would rather keep these stackage import modules in one place and avoid
the autoload hack you mentioned.

P.S.  Sorry if this message is not very constructive, I am not
concentrated now as I'm watching "Atlético – Real" semi-final.

-- 
Alex

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

* bug#26860: [PATCH] Remove hard dependency on guile-json
  2017-05-10  6:38 ` Ricardo Wurmus
  2017-05-10 19:18   ` Alex Kost
@ 2017-05-17  8:33   ` Ludovic Courtès
  1 sibling, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2017-05-17  8:33 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Alex Kost, 26860

Ricardo Wurmus <rekado@elephly.net> skribis:

> Alex Kost <alezost@gmail.com> writes:
>
>> Hello.  Currently, Guix cannot be built without guile-json.  The
>> attached patch fixes it.
>>
>>>>From 3a65a2f35b54604327ba69a55381fee0faac18e7 Mon Sep 17 00:00:00 2001
>> From: Alex Kost <alezost@gmail.com>
>> Date: Tue, 9 May 2017 22:44:19 +0300
>> Subject: [PATCH] build: Compile stackage only if 'guile-json' is available.
>>
>> This is a followup to commit 3089b5d3f5a31b191b68ce3aa9255b646940b642.
>>
>> * Makefile.am (MODULES): Move "guix/scripts/import/stackage.scm" within
>> 'if HAVE_GUILE_JSON'.
>
> Would it not work to autoload the module?
> “guix/scripts/import/stackage.scm” itself does not require guile json.
>
> Something like that is done in commit
> fad5f5fb8dffb4a1cbe40ee9d31a346b901305d1 (in the unmerged wip-installer
> branch).

Ricardo, could you take a look at this?

I’m not sure if autoloading works, unless we use the ‘module-autoload!’
hack as done in other places.

TIA.  :-)

Ludo’.

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

* bug#26860: [PATCH] Remove hard dependency on guile-json
  2017-05-09 19:53 bug#26860: [PATCH] Remove hard dependency on guile-json Alex Kost
  2017-05-09 20:43 ` Danny Milosavljevic
  2017-05-10  6:38 ` Ricardo Wurmus
@ 2017-05-17 13:29 ` Ludovic Courtès
  2 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2017-05-17 13:29 UTC (permalink / raw)
  To: Alex Kost; +Cc: Ricardo Wurmus, 26860-done

Alex Kost <alezost@gmail.com> skribis:

> Hello.  Currently, Guix cannot be built without guile-json.  The
> attached patch fixes it.
>
>>From 3a65a2f35b54604327ba69a55381fee0faac18e7 Mon Sep 17 00:00:00 2001
> From: Alex Kost <alezost@gmail.com>
> Date: Tue, 9 May 2017 22:44:19 +0300
> Subject: [PATCH] build: Compile stackage only if 'guile-json' is available.
>
> This is a followup to commit 3089b5d3f5a31b191b68ce3aa9255b646940b642.
>
> * Makefile.am (MODULES): Move "guix/scripts/import/stackage.scm" within
> 'if HAVE_GUILE_JSON'.

After closer inspection, I applied this patch as-is.  It does the same
thing as we did for the other importers, which sounds good to me.

Thanks, and apologies for the delay!

Ludo’.

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

end of thread, other threads:[~2017-05-17 13:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-09 19:53 bug#26860: [PATCH] Remove hard dependency on guile-json Alex Kost
2017-05-09 20:43 ` Danny Milosavljevic
2017-05-10  6:38 ` Ricardo Wurmus
2017-05-10 19:18   ` Alex Kost
2017-05-17  8:33   ` Ludovic Courtès
2017-05-17 13:29 ` 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).