unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / Atom feed
* bug#44619: [PATCH] Expose some functions for guix.el
@ 2020-11-13 13:54 John Soo
  2020-11-13 15:58 ` zimoun
  0 siblings, 1 reply; 5+ messages in thread
From: John Soo @ 2020-11-13 13:54 UTC (permalink / raw)
  To: 44619

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

Hi Guix,

guix.el Has been broken for quite some time because it depends on @@ for
some modules.  After some review, I came to the conclusion that all of
the bindings it uses can be safely exposed.

In general, it uses mostly bindings from guix scripts (pack, build,
etc).  Those bindings seem reasonable to expose since they give
programmatic access to "API"s that the CLI user is most likely familiar
with.

Thanks!

John


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-guix-pack-Expose-some-bindings-for-third-party-use.patch --]
[-- Type: text/x-patch, Size: 892 bytes --]

From af50f2d398096f7f8bd4efd9255b5713f39104b2 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 12 Nov 2020 21:47:36 -0800
Subject: [PATCH 1/2] guix pack: Expose some bindings for third-party use.

* guix/scripts/pack.scm (compressor-name, %compressors, %formats):
Expose them.
---
 guix/scripts/pack.scm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 8e694edbbe..b6dfcb5f6a 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -58,11 +58,14 @@
   #:use-module (srfi srfi-37)
   #:use-module (ice-9 match)
   #:export (compressor?
+            compressor-name
+            %compressors
             lookup-compressor
             self-contained-tarball
             docker-image
             squashfs-image
 
+            %formats
             guix-pack))
 
 ;; Type of a compression tool.
-- 
2.29.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-guix-build-Expose-log-url-for-third-parties.patch --]
[-- Type: text/x-patch, Size: 962 bytes --]

From 17344a2a6f68146c51368788dcdf3dd9193155e6 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 12 Nov 2020 21:54:45 -0800
Subject: [PATCH 2/2] guix build: Expose log-url for third parties.

* guix/scripts/build.scm (log-url): Expose it.
---
 guix/scripts/build.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index f4a8af035b..41f21fa81d 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -57,7 +57,9 @@
   #:use-module ((guix status) #:select (with-status-verbosity))
   #:use-module ((guix progress) #:select (current-terminal-columns))
   #:use-module ((guix build syscalls) #:select (terminal-columns))
-  #:export (%standard-build-options
+  #:export (log-url
+
+            %standard-build-options
             set-build-options-from-command-line
             set-build-options-from-command-line*
             show-build-options-help
-- 
2.29.1


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

* bug#44619: [PATCH] Expose some functions for guix.el
  2020-11-13 13:54 bug#44619: [PATCH] Expose some functions for guix.el John Soo
@ 2020-11-13 15:58 ` zimoun
  2020-11-13 16:11   ` John Soo
  0 siblings, 1 reply; 5+ messages in thread
From: zimoun @ 2020-11-13 15:58 UTC (permalink / raw)
  To: John Soo, 44619

Hi John,

Thank you for raising this.


> diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
> index 8e694edbbe..b6dfcb5f6a 100644
> --- a/guix/scripts/pack.scm
> +++ b/guix/scripts/pack.scm
> @@ -58,11 +58,14 @@
>    #:use-module (srfi srfi-37)
>    #:use-module (ice-9 match)
>    #:export (compressor?
> +            compressor-name

Why not also ’compress-extension’ and ’compress-command’?  Then
<compressor> will be completely exposed which seems good, isn’t it?


All the best,
simon




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

* bug#44619: [PATCH] Expose some functions for guix.el
  2020-11-13 15:58 ` zimoun
@ 2020-11-13 16:11   ` John Soo
  2020-11-13 17:13     ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: John Soo @ 2020-11-13 16:11 UTC (permalink / raw)
  To: zimoun; +Cc: 44619

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

Hi zimoun,

zimoun <zimon.toutoune@gmail.com> writes:

>> diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
>> index 8e694edbbe..b6dfcb5f6a 100644
>> --- a/guix/scripts/pack.scm
>> +++ b/guix/scripts/pack.scm
>> @@ -58,11 +58,14 @@
>>    #:use-module (srfi srfi-37)
>>    #:use-module (ice-9 match)
>>    #:export (compressor?
>> +            compressor-name
>
> Why not also ’compress-extension’ and ’compress-command’?  Then
> <compressor> will be completely exposed which seems good, isn’t it?

Done, thank you!

All the best to you, too,

John


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-guix-pack-Expose-some-bindings-for-third-party-use.patch --]
[-- Type: text/x-patch, Size: 1017 bytes --]

From 7f718484fe952b674c2cdaa70315d49df3c8aa57 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 12 Nov 2020 21:47:36 -0800
Subject: [PATCH 1/2] guix pack: Expose some bindings for third-party use.

* guix/scripts/pack.scm (compressor-name, compressor-extension,
compressor-command, %compressors, %formats):
Expose them.

fix pack.scm
---
 guix/scripts/pack.scm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 8e694edbbe..a687505e0d 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -58,11 +58,16 @@
   #:use-module (srfi srfi-37)
   #:use-module (ice-9 match)
   #:export (compressor?
+            compressor-name
+            compressor-extenstion
+            compressor-command
+            %compressors
             lookup-compressor
             self-contained-tarball
             docker-image
             squashfs-image
 
+            %formats
             guix-pack))
 
 ;; Type of a compression tool.
-- 
2.29.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-guix-build-Expose-log-url-for-third-parties.patch --]
[-- Type: text/x-patch, Size: 962 bytes --]

From 036dc16855c9a3f3022598c700f5e8233022aee1 Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Thu, 12 Nov 2020 21:54:45 -0800
Subject: [PATCH 2/2] guix build: Expose log-url for third parties.

* guix/scripts/build.scm (log-url): Expose it.
---
 guix/scripts/build.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index f4a8af035b..41f21fa81d 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -57,7 +57,9 @@
   #:use-module ((guix status) #:select (with-status-verbosity))
   #:use-module ((guix progress) #:select (current-terminal-columns))
   #:use-module ((guix build syscalls) #:select (terminal-columns))
-  #:export (%standard-build-options
+  #:export (log-url
+
+            %standard-build-options
             set-build-options-from-command-line
             set-build-options-from-command-line*
             show-build-options-help
-- 
2.29.1


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

* bug#44619: [PATCH] Expose some functions for guix.el
  2020-11-13 16:11   ` John Soo
@ 2020-11-13 17:13     ` Ludovic Courtès
  2020-11-13 17:17       ` John Soo
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2020-11-13 17:13 UTC (permalink / raw)
  To: John Soo; +Cc: 44619

Hi John,

John Soo <jsoo1@asu.edu> skribis:

> From 7f718484fe952b674c2cdaa70315d49df3c8aa57 Mon Sep 17 00:00:00 2001
> From: John Soo <jsoo1@asu.edu>
> Date: Thu, 12 Nov 2020 21:47:36 -0800
> Subject: [PATCH 1/2] guix pack: Expose some bindings for third-party use.
>
> * guix/scripts/pack.scm (compressor-name, compressor-extension,
> compressor-command, %compressors, %formats):
> Expose them.

[...]

> From 036dc16855c9a3f3022598c700f5e8233022aee1 Mon Sep 17 00:00:00 2001
> From: John Soo <jsoo1@asu.edu>
> Date: Thu, 12 Nov 2020 21:54:45 -0800
> Subject: [PATCH 2/2] guix build: Expose log-url for third parties.
>
> * guix/scripts/build.scm (log-url): Expose it.

Applied both to ‘version-1.2.0’, which we’ll eventually merge back to
‘master’.

In general, code outside the repo should not use ‘@@’ at all to refer to
Guix internals; we should ensure this is the case for Emacs-Guix.

Actually, even code within Guix should avoid it.  :-)

Thanks!

Ludo’.




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

* bug#44619: [PATCH] Expose some functions for guix.el
  2020-11-13 17:13     ` Ludovic Courtès
@ 2020-11-13 17:17       ` John Soo
  0 siblings, 0 replies; 5+ messages in thread
From: John Soo @ 2020-11-13 17:17 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 44619

Ludovic Courtès <ludo@gnu.org> writes:

> In general, code outside the repo should not use ‘@@’ at all to refer to
> Guix internals; we should ensure this is the case for Emacs-Guix.
>
> Actually, even code within Guix should avoid it.  :-)

Indeed. I submitted some patches to emacs-guix to remedy this:

https://gitlab.com/emacs-guix/emacs-guix/-/merge_requests/8 

Thanks!

- John




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

end of thread, other threads:[~2020-11-13 17:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 13:54 bug#44619: [PATCH] Expose some functions for guix.el John Soo
2020-11-13 15:58 ` zimoun
2020-11-13 16:11   ` John Soo
2020-11-13 17:13     ` Ludovic Courtès
2020-11-13 17:17       ` John Soo

unofficial mirror of bug-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-bugs/0 guix-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-bugs guix-bugs/ https://yhetil.org/guix-bugs \
		bug-guix@gnu.org
	public-inbox-index guix-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.bugs
	nntp://news.gmane.io/gmane.comp.gnu.guix.bugs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git