'guix style' loses comments

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
normal
M
M
Maxim Cournoyer wrote on 8 Mar 2023 23:20
guix style looses comments
(name . bug-guix)(address . bug-guix@gnu.org)
87ttyuubpl.fsf@gmail.com
Hello,

Consider this package:

Toggle snippet (28 lines)
(define-public ruby-webrick
(package
(name "ruby-webrick")
(version "1.8.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/ruby/webrick")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1xb0mk3cghdir65nmj0mblprbf21blli7267b6yyvxclh307yp6s"))))
(build-system ruby-build-system)
(arguments (list #:phases #~(modify-phases %standard-phases
(add-after 'extract-gemspec 'delete-problematic-tests
(lambda _
;; The httresponse tests fail for
;; unknown reasons (see:
;; https://github.com/ruby/webrick/issues/112).
(delete-file "test/webrick/test_httpresponse.rb"))))))
(home-page "https://github.com/ruby/webrick")
(synopsis "HTTP server toolkit")
(description "WEBrick is an HTTP server toolkit that can be configured as an
HTTPS server, a proxy server, and a virtual-host server.")
(license license:bsd-2)))

After running ./pre-inst-env guix style ruby-webrick, it produces:

Toggle snippet (27 lines)
(define-public ruby-webrick
(package
(name "ruby-webrick")
(version "1.8.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/ruby/webrick")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1xb0mk3cghdir65nmj0mblprbf21blli7267b6yyvxclh307yp6s"))))
(build-system ruby-build-system)
(arguments
(list #:phases #~(modify-phases %standard-phases
(add-after 'extract-gemspec 'delete-problematic-tests
(lambda _
(delete-file "test/webrick/test_httpresponse.rb"))))))
(home-page "https://github.com/ruby/webrick")
(synopsis "HTTP server toolkit")
(description
"WEBrick is an HTTP server toolkit that can be configured as an
HTTPS server, a proxy server, and a virtual-host server.")
(license license:bsd-2)))

I.e., it lost the comment in the phase. It also causes the longest line
to be 82 chars, while it could have easily broken the line to make it
fit under 80.

--
Thanks,
Maxim
L
L
Ludovic Courtès wrote on 14 Mar 2023 17:18
control message for bug #62059
(address . control@debbugs.gnu.org)
87v8j31f3m.fsf@gnu.org
retitle 62059 'guix style' loses comments
quit
L
L
Ludovic Courtès wrote on 16 Mar 2023 23:05
Re: bug#62059: 'guix style' loses comments
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 62059-done@debbugs.gnu.org)
87y1nw8i8w.fsf@gnu.org
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (13 lines)
> (list #:phases #~(modify-phases %standard-phases
> (add-after 'extract-gemspec 'delete-problematic-tests
> (lambda _
> (delete-file "test/webrick/test_httpresponse.rb"))))))
> (home-page "https://github.com/ruby/webrick")
> (synopsis "HTTP server toolkit")
> (description
> "WEBrick is an HTTP server toolkit that can be configured as an
> HTTPS server, a proxy server, and a virtual-host server.")
> (license license:bsd-2)))
>
> I.e., it lost the comment in the phase.

Fixed in 83128f00e9149f3c1bcd4450eb0ed3620a37149c.

Toggle quote (3 lines)
> It also causes the longest line to be 82 chars, while it could have
> easily broken the line to make it fit under 80.

Hmm let’s investigate that separately.

Thanks,
Ludo’.
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 62059
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