Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/internal/lsp/diff/difftest: TestVerifyUnified consistently failing on LANG is not English #42962

Closed
mengzhuo opened this issue Dec 3, 2020 · 1 comment
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@mengzhuo
Copy link
Contributor

mengzhuo commented Dec 3, 2020

rev: bef1c476418abda870de2108f269682d1fee4bdc
$env | grep LANG
LANG=zh_CN.UTF-8

difftest using output of GNU diff, which will be translated based on LANG settings.
Which breaks linux-amd64-wsl builder

--- FAIL: TestVerifyUnified (0.02s)
    --- FAIL: TestVerifyUnified/replace_no_newline (0.00s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ No newline at end of file\n+B\n\\ No newline at end of file\n"
            diff -u:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ 文件尾没有换行符\n+B\n\\ 文件尾没有换行符\n"
    --- FAIL: TestVerifyUnified/add_end (0.00s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ No newline at end of file\n+AB\n\\ No newline at end of file\n"
            diff -u:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ 文件尾没有换行符\n+AB\n\\ 文件尾没有换行符\n"
    --- FAIL: TestVerifyUnified/add_newline (0.00s)
        difftest_test.go:25: unified:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ No newline at end of file\n+A\n"
            diff -u:
            "--- from\n+++ to\n@@ -1 +1 @@\n-A\n\\ 文件尾没有换行符\n+A\n"
FAIL
FAIL	golang.org/x/tools/internal/lsp/diff/difftest	0.028s
ok  	golang.org/x/tools/internal/lsp/diff/myers	0.012s

https://build.golang.org/log/540673c78ac37d10fc9b0f07d22db6fcc8f47406

#38414

@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Dec 3, 2020
@gopherbot gopherbot added this to the Unreleased milestone Dec 3, 2020
@mengzhuo mengzhuo changed the title x/tools/internal/lsp/diff/difftest: TestVerifyUnified consistently failing on LANG not english x/tools/internal/lsp/diff/difftest: TestVerifyUnified consistently failing on LANG is not english Dec 3, 2020
@mengzhuo mengzhuo changed the title x/tools/internal/lsp/diff/difftest: TestVerifyUnified consistently failing on LANG is not english x/tools/internal/lsp/diff/difftest: TestVerifyUnified consistently failing on LANG is not English Dec 3, 2020
@gopherbot
Copy link

Change https://golang.org/cl/274992 mentions this issue: internal/lsp/: force LANG setting while difftest

marwan-at-work pushed a commit to marwan-at-work/tools that referenced this issue Dec 23, 2020
difftest using output of GNU diff, which will be translated based on
LANG settings.

Fixes golang/go#42962

Change-Id: Id4ae22da04077eb7cda7faace306fdbe1836ec60
Reviewed-on: https://go-review.googlesource.com/c/tools/+/274992
Trust: Meng Zhuo <mzh@golangcn.org>
Run-TryBot: Meng Zhuo <mzh@golangcn.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
@golang golang locked and limited conversation to collaborators Dec 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

2 participants