[PATCH gnome-team 0/4] Fix and update gnome-text-editor

  • Done
  • quality assurance status badge
Details
2 participants
  • Liliana Marie Prikler
  • Vivien Kraus
Owner
unassigned
Submitted by
Vivien Kraus
Severity
normal
V
V
Vivien Kraus wrote on 15 Sep 2023 20:17
(address . guix-patches@gnu.org)
cover.1694801847.git.vivien@planete-kraus.eu
Dear guix,

Let’s fix gnome-text-editor by adding the missing pcre dependency, and then
update it.

I noticed that the new version now requires editorconfig-core-c. Since this
one lives in (gnu packages text-editor), and that (gnu packages text-editor)
imports (gnu packages gnome), then we would have a circular dependency. To
avoid it, I just moved editorconfig-core-c to (gnu packages gnome), and
re-export it from (gnu packages text-editor) so that everyone is happy. I did
not use the "re-export" Guile form though, because it seems to mess things up
with guile.

What do you think?

Best regards,

Vivien

Vivien Kraus (4):
gnu: gnome-text-editor: Add missing input.
gnu: editorconfig-core-c: Move to (gnu packages gnome).
gnu: editorconfig-core-c: Update to 0.12.6.
gnu: gnome-text-editor: Update to 44.0.

gnu/packages/gnome.scm | 65 +++++++++++++++++++++++++++++++++--
gnu/packages/text-editors.scm | 53 ++--------------------------
2 files changed, 65 insertions(+), 53 deletions(-)


base-commit: 43cdc8a07517e936812782c313fe145bcf5c7ed3
--
2.41.0
V
V
Vivien Kraus wrote on 15 Sep 2023 18:57
[PATCH gnome-team 1/4] gnu: gnome-text-editor: Add missing input.
(address . 66008@debbugs.gnu.org)
a4964d18425d553ba84c0ddedb0a597c7ff5c5fb.1694801847.git.vivien@planete-kraus.eu
* gnu/packages/gnome.scm (gnome-text-editor) [inputs]: Add pcre.
---
gnu/packages/gnome.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index f5ed13565d..ea47d31f90 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5491,7 +5491,7 @@ (define-public gnome-text-editor
`(,glib "bin")
`(,gtk "bin")
itstool))
- (inputs (list gtk gtksourceview libadwaita enchant))
+ (inputs (list gtk gtksourceview libadwaita enchant pcre))
(home-page "https://gitlab.gnome.org/GNOME/gnome-text-editor")
(synopsis "GNOME text editor")
(description
--
2.41.0
V
V
Vivien Kraus wrote on 15 Sep 2023 19:36
[PATCH gnome-team 2/4] gnu: editorconfig-core-c: Move to (gnu packages gnome).
(address . 66008@debbugs.gnu.org)
450222c04f40a3f1179aac46187547cc604697f0.1694801847.git.vivien@planete-kraus.eu
* gnu/packages/gnome.scm (editorconfig-core-c): New variable.
* gnu/packages/text-editors.scm: Export editorconfig-core-c from (gnu packages
gnome).
---
gnu/packages/gnome.scm | 51 +++++++++++++++++++++++++++++++++
gnu/packages/text-editors.scm | 53 ++---------------------------------
2 files changed, 54 insertions(+), 50 deletions(-)

Toggle diff (128 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index ea47d31f90..8535ad784e 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5468,6 +5468,57 @@ (define-public gnome-terminal
keyboard shortcuts.")
(license license:gpl3+)))
+(define-public editorconfig-core-c
+ (package
+ (name "editorconfig-core-c")
+ (version "0.12.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/editorconfig/editorconfig-core-c")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "073sh18y0v8wm10iphaia54pkdmwylalccpn1k5i9dwyfjzgj7yg"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'insert-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((tests (assoc-ref inputs "tests")))
+ (copy-recursively tests "tests"))
+ #t))
+ (add-after 'install 'delete-static-library
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib")))
+ (with-directory-excursion lib
+ (delete-file "libeditorconfig_static.a"))
+ #t))))))
+ (native-inputs
+ `(("tests"
+ ,(origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/editorconfig/editorconfig-core-test")
+ ;; The tests submodule commit matching this package's version.
+ (commit "48610d43b7455af12195473377f93c4ceea654f5")))
+ (file-name (git-file-name "editorconfig-core-test" version))
+ (sha256
+ (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
+ (inputs
+ (list pcre2))
+ (home-page "https://editorconfig.org/")
+ (synopsis "EditorConfig core library written in C")
+ (description "EditorConfig makes it easy to maintain the correct coding
+style when switching between different text editors and between different
+projects. The EditorConfig project maintains a file format and plugins for
+various text editors which allow this file format to be read and used by those
+editors.")
+ (license license:bsd-2)))
+
(define-public gnome-text-editor
(package
(name "gnome-text-editor")
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 44c5754d6d..eae8b6efa5 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -823,56 +823,9 @@ (define-public manuskript
in plain text file format.")
(license license:gpl3+)))
-(define-public editorconfig-core-c
- (package
- (name "editorconfig-core-c")
- (version "0.12.5")
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/editorconfig/editorconfig-core-c")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32 "073sh18y0v8wm10iphaia54pkdmwylalccpn1k5i9dwyfjzgj7yg"))))
- (build-system cmake-build-system)
- (arguments
- '(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'insert-tests
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((tests (assoc-ref inputs "tests")))
- (copy-recursively tests "tests"))
- #t))
- (add-after 'install 'delete-static-library
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (lib (string-append out "/lib")))
- (with-directory-excursion lib
- (delete-file "libeditorconfig_static.a"))
- #t))))))
- (native-inputs
- `(("tests"
- ,(origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/editorconfig/editorconfig-core-test")
- ;; The tests submodule commit matching this package's version.
- (commit "48610d43b7455af12195473377f93c4ceea654f5")))
- (file-name (git-file-name "editorconfig-core-test" version))
- (sha256
- (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
- (inputs
- (list pcre2))
- (home-page "https://editorconfig.org/")
- (synopsis "EditorConfig core library written in C")
- (description "EditorConfig makes it easy to maintain the correct coding
-style when switching between different text editors and between different
-projects. The EditorConfig project maintains a file format and plugins for
-various text editors which allow this file format to be read and used by those
-editors.")
- (license license:bsd-2)))
+;; editorconfig-core-c has been moved to (gnu packages gnome) to avoid a
+;; module circular dependency.
+(export editorconfig-core-c)
(define-public texmacs
(package
--
2.41.0
V
V
Vivien Kraus wrote on 15 Sep 2023 19:50
[PATCH gnome-team 3/4] gnu: editorconfig-core-c: Update to 0.12.6.
(address . 66008@debbugs.gnu.org)
589183fbafa856ba8505d287bf6effcdf0e37694.1694801847.git.vivien@planete-kraus.eu
* gnu/packages/gnome.scm (editorconfig-core-c): Update to 0.12.6.
[#:phase 'disable-failing-tests]: Disable a couple of failing tests.
---
gnu/packages/gnome.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

Toggle diff (38 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 8535ad784e..77c0c14344 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5471,7 +5471,7 @@ (define-public gnome-terminal
(define-public editorconfig-core-c
(package
(name "editorconfig-core-c")
- (version "0.12.5")
+ (version "0.12.6")
(source
(origin
(method git-fetch)
@@ -5480,7 +5480,7 @@ (define-public editorconfig-core-c
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "073sh18y0v8wm10iphaia54pkdmwylalccpn1k5i9dwyfjzgj7yg"))))
+ (base32 "05qllpls3r95nfl14gqq3cv4lisf07fgn85n52w8blc5pfl1h93g"))))
(build-system cmake-build-system)
(arguments
'(#:phases
@@ -5490,6 +5490,13 @@ (define-public editorconfig-core-c
(let ((tests (assoc-ref inputs "tests")))
(copy-recursively tests "tests"))
#t))
+ (add-after 'insert-tests 'disable-failing-tests
+ (lambda _
+ (substitute* "tests/parser/CMakeLists.txt"
+ (("# Test max property name and values")
+ "# Disabled: test max property name and values\nif(FALSE)\n")
+ (("# Test max section names")
+ "endif()\n\n# Test max section names"))))
(add-after 'install 'delete-static-library
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
--
2.41.0
V
V
Vivien Kraus wrote on 15 Sep 2023 19:52
[PATCH gnome-team 4/4] gnu: gnome-text-editor: Update to 44.0.
(address . 66008@debbugs.gnu.org)
c5b1964edadc4b5a84b492768ed5c86f3dc38eae.1694801847.git.vivien@planete-kraus.eu
* gnu/packages/gnome.scm (gnome-text-editor): Update to 44.0.
[inputs]: Add editorconfig-core-c.
---
gnu/packages/gnome.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (34 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 77c0c14344..448a5c5a9d 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5529,7 +5529,7 @@ (define-public editorconfig-core-c
(define-public gnome-text-editor
(package
(name "gnome-text-editor")
- (version "42.2")
+ (version "44.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/gnome-text-editor/"
@@ -5537,7 +5537,7 @@ (define-public gnome-text-editor
"gnome-text-editor-" version ".tar.xz"))
(sha256
(base32
- "1nn53iv2a82kkqkg5jy0bqh2b2wzg7g4a6w8q3qsis5wvj64lvg5"))))
+ "1jii59hw31baira2psl1kx2lxljmnnkxmif4zhasizrl0xwc6yzn"))))
(build-system meson-build-system)
(arguments
(list #:glib-or-gtk? #t))
@@ -5549,7 +5549,8 @@ (define-public gnome-text-editor
`(,glib "bin")
`(,gtk "bin")
itstool))
- (inputs (list gtk gtksourceview libadwaita enchant pcre))
+ (inputs (list gtk gtksourceview libadwaita enchant pcre2
+ editorconfig-core-c))
(home-page "https://gitlab.gnome.org/GNOME/gnome-text-editor")
(synopsis "GNOME text editor")
(description
--
2.41.0
L
L
Liliana Marie Prikler wrote on 15 Sep 2023 22:18
5ad154dc8422701fa713b3b0e62def1f06bb3044.camel@gmail.com
Am Freitag, dem 15.09.2023 um 19:52 +0200 schrieb Vivien Kraus:
Toggle quote (2 lines)
> * gnu/packages/gnome.scm (gnome-text-editor): Update to 44.0.
> [inputs]: Add editorconfig-core-c.
pcre to pcre-2 goes unnoticed :(
L
L
Liliana Marie Prikler wrote on 15 Sep 2023 22:20
Re: [bug#66008] [PATCH gnome-team 3/4] gnu: editorconfig-core-c: Update to 0.12.6.
a506e7e3642681d7d35ffce6ca590f2536e8f210.camel@gmail.com
Am Freitag, dem 15.09.2023 um 19:50 +0200 schrieb Vivien Kraus:
Toggle quote (2 lines)
> * gnu/packages/gnome.scm (editorconfig-core-c): Update to 0.12.6.
> [#:phase 'disable-failing-tests]: Disable a couple of failing tests.
Should be "[#:phases]: Add ‘disable-failing-tests’." since you're
freshly adding it. Otherwise, it'd make more sense to mention what
tests you're disabling.


Cheers
L
L
Liliana Marie Prikler wrote on 15 Sep 2023 22:22
Re: [bug#66008] [PATCH gnome-team 2/4] gnu: editorconfig-core-c: Move to (gnu packages gnome).
895b8308baa47460b6f33918e72e5ce61874cafb.camel@gmail.com
Am Freitag, dem 15.09.2023 um 19:36 +0200 schrieb Vivien Kraus:
Toggle quote (3 lines)
> * gnu/packages/gnome.scm (editorconfig-core-c): New variable.
> * gnu/packages/text-editors.scm: Export editorconfig-core-c from (gnu
> packages gnome).
Actually, you could try using #:export in text-editors.scm or one of
the other hacks we have at our disposal (like manual resolve-module)
before moving this to gnome.scm where it doesn't really belong.

Cheers
L
L
Liliana Marie Prikler wrote on 15 Sep 2023 22:33
Re: [bug#66008] [PATCH gnome-team 1/4] gnu: gnome-text-editor: Add missing input.
5a91d3435bc9c9c8709c0447744f430cabda567b.camel@gmail.com
Am Freitag, dem 15.09.2023 um 18:57 +0200 schrieb Vivien Kraus:
Toggle quote (1 lines)
> * gnu/packages/gnome.scm (gnome-text-editor) [inputs]: Add pcre.
This patch LGTM, but I'm a little concerned about the rest of the
series. If we don't find a clean solution, I will at least push this
with the usual 7 days delay.

Cheers
V
V
Vivien Kraus wrote on 15 Sep 2023 23:25
[PATCH gnome-team v2 0/3] Update gnome-text-editor without moving editorconfig-core-c
cover.1694813113.git.vivien@planete-kraus.eu
Le vendredi 15 septembre 2023 à 22:22 +0200, Liliana Marie Prikler a écrit :
Toggle quote (8 lines)
> Am Freitag, dem 15.09.2023 um 19:36 +0200 schrieb Vivien Kraus:
>> * gnu/packages/gnome.scm (editorconfig-core-c): New variable.
>> * gnu/packages/text-editors.scm: Export editorconfig-core-c from
>> (gnu packages gnome).
> Actually, you could try using #:export in text-editors.scm or one of
> the other hacks we have at our disposal (like manual resolve-module)
> before moving this to gnome.scm where it doesn't really belong.

I grepped for "cyclic" in the gnu/packages directory, and I found
kde-plasma.scm interesting (for plasma), so I copied the hack. It seems to
work, and I see no reason why it would not.

What do you think?

Best regards,

Vivien

Vivien Kraus (3):
gnu: gnome-text-editor: Add missing input.
gnu: editorconfig-core-c: Update to 0.12.6.
gnu: gnome-text-editor: Update to 44.0.

gnu/packages/gnome.scm | 11 ++++++++---
gnu/packages/text-editors.scm | 11 +++++++++--
2 files changed, 17 insertions(+), 5 deletions(-)


base-commit: 43cdc8a07517e936812782c313fe145bcf5c7ed3
--
2.41.0
V
V
Vivien Kraus wrote on 15 Sep 2023 18:57
[PATCH gnome-team v2 1/3] gnu: gnome-text-editor: Add missing input.
5b47e23cd1e45b838af723ea242ce3cc5bf22dec.1694813113.git.vivien@planete-kraus.eu
* gnu/packages/gnome.scm (gnome-text-editor) [inputs]: Add pcre.
---
gnu/packages/gnome.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index f5ed13565d..18a129771e 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5491,7 +5491,7 @@ (define-public gnome-text-editor
`(,glib "bin")
`(,gtk "bin")
itstool))
- (inputs (list gtk gtksourceview libadwaita enchant))
+ (inputs (list gtk gtksourceview libadwaita enchant pcre2))
(home-page "https://gitlab.gnome.org/GNOME/gnome-text-editor")
(synopsis "GNOME text editor")
(description
--
2.41.0
V
V
Vivien Kraus wrote on 15 Sep 2023 19:50
[PATCH gnome-team v2 2/3] gnu: editorconfig-core-c: Update to 0.12.6.
da2f664f6dd6422194555a308f5beac9e3ab4be9.1694813113.git.vivien@planete-kraus.eu
* gnu/packages/text-editors.scm (editorconfig-core-c): Update to 0.12.6.
[#:phases]: Add 'disable-failing-tests', to disable the config parser "max
property name and values" test.
---
gnu/packages/text-editors.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

Toggle diff (38 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 44c5754d6d..56554373be 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -826,7 +826,7 @@ (define-public manuskript
(define-public editorconfig-core-c
(package
(name "editorconfig-core-c")
- (version "0.12.5")
+ (version "0.12.6")
(source
(origin
(method git-fetch)
@@ -835,7 +835,7 @@ (define-public editorconfig-core-c
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "073sh18y0v8wm10iphaia54pkdmwylalccpn1k5i9dwyfjzgj7yg"))))
+ (base32 "05qllpls3r95nfl14gqq3cv4lisf07fgn85n52w8blc5pfl1h93g"))))
(build-system cmake-build-system)
(arguments
'(#:phases
@@ -845,6 +845,13 @@ (define-public editorconfig-core-c
(let ((tests (assoc-ref inputs "tests")))
(copy-recursively tests "tests"))
#t))
+ (add-after 'insert-tests 'disable-failing-tests
+ (lambda _
+ (substitute* "tests/parser/CMakeLists.txt"
+ (("# Test max property name and values")
+ "# Disabled: test max property name and values\nif(FALSE)\n")
+ (("# Test max section names")
+ "endif()\n\n# Test max section names"))))
(add-after 'install 'delete-static-library
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
--
2.41.0
V
V
Vivien Kraus wrote on 15 Sep 2023 19:52
[PATCH gnome-team v2 3/3] gnu: gnome-text-editor: Update to 44.0.
ff39bf1f87b2c8622f6318dcc8cfa22be42c818f.1694813113.git.vivien@planete-kraus.eu
* gnu/packages/gnome.scm (gnome-text-editor): Update to 44.0.
[inputs]: Add editorconfig-core-c.
---
gnu/packages/gnome.scm | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

Toggle diff (38 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 18a129771e..da17522f76 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5471,7 +5471,7 @@ (define-public gnome-terminal
(define-public gnome-text-editor
(package
(name "gnome-text-editor")
- (version "42.2")
+ (version "44.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/gnome-text-editor/"
@@ -5479,7 +5479,7 @@ (define-public gnome-text-editor
"gnome-text-editor-" version ".tar.xz"))
(sha256
(base32
- "1nn53iv2a82kkqkg5jy0bqh2b2wzg7g4a6w8q3qsis5wvj64lvg5"))))
+ "1jii59hw31baira2psl1kx2lxljmnnkxmif4zhasizrl0xwc6yzn"))))
(build-system meson-build-system)
(arguments
(list #:glib-or-gtk? #t))
@@ -5491,7 +5491,12 @@ (define-public gnome-text-editor
`(,glib "bin")
`(,gtk "bin")
itstool))
- (inputs (list gtk gtksourceview libadwaita enchant pcre2))
+ (inputs (list gtk gtksourceview libadwaita enchant pcre2
+ ;; cyclic module dependency
+ (module-ref
+ (resolve-interface
+ '(gnu packages text-editors))
+ 'editorconfig-core-c)))
(home-page "https://gitlab.gnome.org/GNOME/gnome-text-editor")
(synopsis "GNOME text editor")
(description
--
2.41.0
L
L
Liliana Marie Prikler wrote on 16 Sep 2023 05:59
Re: [PATCH gnome-team v2 0/3] Update gnome-text-editor without moving editorconfig-core-c
a5693fb10484ad8cae3a633bf7454c7ea0b5436d.camel@gmail.com
Am Freitag, dem 15.09.2023 um 23:25 +0200 schrieb Vivien Kraus:
Toggle quote (16 lines)
> Le vendredi 15 septembre 2023 à 22:22 +0200, Liliana Marie Prikler a
> écrit :
> > Am Freitag, dem 15.09.2023 um 19:36 +0200 schrieb Vivien Kraus:
> > > * gnu/packages/gnome.scm (editorconfig-core-c): New variable.
> > > * gnu/packages/text-editors.scm: Export editorconfig-core-c from
> > > (gnu packages gnome).
> > Actually, you could try using #:export in text-editors.scm or one
> > of the other hacks we have at our disposal (like manual
> > resolve-module) before moving this to gnome.scm where it doesn't
> > really belong.
>
> I grepped for "cyclic" in the gnu/packages directory, and I found
> kde-plasma.scm interesting (for plasma), so I copied the hack. It
> seems to work, and I see no reason why it would not.
>
> What do you think?
Yep, that's the hack I referred to – resolve-interface is a cleaner
version of resolve-module.

LGTM save for minor rewordings that I'll do on my own

Cheers
L
L
Liliana Marie Prikler wrote on 24 Sep 2023 12:04
Re: [PATCH gnome-team v2 3/3] gnu: gnome-text-editor: Update to 44.0.
7dad6d5631c7f715f905a153f665f664a8569628.camel@gmail.com
Am Freitag, dem 15.09.2023 um 19:52 +0200 schrieb Vivien Kraus:
Toggle quote (3 lines)
> * gnu/packages/gnome.scm (gnome-text-editor): Update to 44.0.
> [inputs]: Add editorconfig-core-c.
> ---
Pushed.

Thanks
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 66008@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 66008
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch