[Bug 2188676] Review Request: golang-github-azure-ansiterm - Go package for ANSI terminal emulation in Windows

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

 



https://bugzilla.redhat.com/show_bug.cgi?id=2188676

Robert-André Mauchin 🐧 <zebob.m@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zebob.m@xxxxxxxxx
           Doc Type|---                         |If docs needed, set a value
              Flags|                            |needinfo?(sergio@xxxxxxxxxx
                   |                            |)



--- Comment #2 from Robert-André Mauchin 🐧 <zebob.m@xxxxxxxxx> ---
 - Please use autorelease/autochangelog

 - Isn't this a Windows only package? Which one of your package is requiring
it? usually it's only a dep in _windows.go file, which are excluded by the
build system and the macros.

The only notable package that requires it is moby/moby, in a test:

https://github.com/moby/moby/blob/v24.0.5/integration/internal/termtest/stripansi.go

And github.com/moby/term, which is packaged but it is not called because in
windows files.


I'd patch it out from moby:
https://github.com/moby/moby/commit/2ec3e14c0ff7f8552c1f9b09ffde743632fa1f8c

>From 873a4b6552fcdbf60299e51de3139465da6b2a92 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@xxxxxxxxx>
Date: Mon, 14 Aug 2023 19:11:59 +0200
Subject: [PATCH] Make call to Azure/go-ansiterm Windows-only

---
 integration/internal/termtest/stripansi_default.go     | 10 ++++++++++
 .../{stripansi_test.go => stripansi_test_windows.go}   |  0
 .../termtest/{stripansi.go => stripansi_windows.go}    |  0
 3 files changed, 10 insertions(+)
 create mode 100644 integration/internal/termtest/stripansi_default.go
 rename integration/internal/termtest/{stripansi_test.go =>
stripansi_test_windows.go} (100%)
 rename integration/internal/termtest/{stripansi.go => stripansi_windows.go}
(100%)

diff --git a/integration/internal/termtest/stripansi_default.go
b/integration/internal/termtest/stripansi_default.go
new file mode 100644
index 0000000000..8557c8bf72
--- /dev/null
+++ b/integration/internal/termtest/stripansi_default.go
@@ -0,0 +1,10 @@
+package termtest // import
"github.com/docker/docker/integration/internal/termtest"
+
+import (
+       "errors"
+)
+
+// StripANSICommands provides a dummy implementation for non-Windows
platforms.
+func StripANSICommands(input string) (string, error) {
+       return input, errors.New("StripANSICommands is not implemented for this
platform")
+}
diff --git a/integration/internal/termtest/stripansi_test.go
b/integration/internal/termtest/stripansi_test_windows.go
similarity index 100%
rename from integration/internal/termtest/stripansi_test.go
rename to integration/internal/termtest/stripansi_test_windows.go
diff --git a/integration/internal/termtest/stripansi.go
b/integration/internal/termtest/stripansi_windows.go
similarity index 100%
rename from integration/internal/termtest/stripansi.go
rename to integration/internal/termtest/stripansi_windows.go
-- 
2.41.0

Pushed upstream: https://github.com/moby/moby/pull/46234
Not tested but it should work.

Let me know if you really need it.


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2188676

Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202188676%23c2
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux