[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debugging test failures in reverse dependencies (Re: Build of Glow fails to load)



On 30/11/2024 3:59 AM, Otto Kekäläinen wrote:
About the reverse dependencies that actually fail now in
https://salsa.debian.org/otto/golang-github-charmbracelet-glamour/-/jobs/6673305

## dh-make-golang:
https://salsa.debian.org/otto/golang-github-charmbracelet-glamour/-/jobs/6673305

TestMarkdownToLongDescription seems to have a hard-coded description
from golang-github-charmbracelet-glamour. There is no way to
pre-emptively fix this? I guess I just need to upload and then after
that file PR to dh-make-golang to update the text.

As this is a native package, we can probably just update the test to work with glamour v0.8. Here is the diff, it seems the wrapping algorithm has changed:

$ diff before after
--- before	2024-12-01 16:03:55.587723034 +0100
+++ after	2024-12-01 16:03:45.691595613 +0100
@@ -9,10 +9,10 @@
          .
           1. Call glamour.Render(inputText, "desiredStyle")
2. Set the GLAMOUR_STYLE environment variable to your desired default
-             style or a file location for a style and call
-             glamour.RenderWithEnvironmentConfig(inputText)
-          3. Set the GLAMOUR_STYLE environment variable and pass
-             glamour.WithEnvironmentConfig() to your custom renderer
+             style or a file location for a style and call glamour.
+             RenderWithEnvironmentConfig(inputText)
+          3. Set the GLAMOUR_STYLE environment variable and pass glamour.
+             WithEnvironmentConfig() to your custom renderer
          .
          Glamourous Projects
          .
@@ -24,3 +24,4 @@
             line tool.
* GLab (https://github.com/profclems/glab), An open source GitLab
             command line tool.
+

## gh: https://salsa.debian.org/otto/golang-github-charmbracelet-glamour/-/jobs/6673306

--- FAIL: Test_viewRun (0.01s)
--- FAIL: Test_viewRun/view_specific_release (0.01s)
--- FAIL: Test_viewRun/view_latest_release (0.00s)
--- PASS: Test_viewRun/view_machine-readable (0.00s)
--- PASS: Test_viewRun/view_machine-readable_but_body_has_no_ending_newline
(0.00s)
...
FAIL github.com/cli/cli/v2/pkg/cmd/release/view 0.070s

For gh, it looks like mainly whitespace differences (see the raw log [2]), so I would probably simply add a patch to comment these tests out while upstream continues to test against glamour v0.7, then drop the patch if a newer release update these tests.

[1] https://salsa.debian.org/otto/golang-github-charmbracelet-glamour/-/jobs/6673305/raw [2] https://salsa.debian.org/otto/golang-github-charmbracelet-glamour/-/jobs/6673306/raw
--
Nicolas Peugnet


Reply to: