LuaLS / LuaLS/lua-language-server

Mingw64 on MSYS2

未關閉
#3,240 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
Lua
星號
4.4k
分支
442
PR 合併指標
30 天內沒有已合併 PR

描述

How are you using the lua-language-server?

Other

Which OS are you using?

Windows

What is the issue affecting?

Other

Expected Behaviour

$ make.sh
should detect mingw64

Actual Behaviour

.it detects platform windows

Reproduction steps
  1. Go to '...'
  2. Click '...'
  3. See error '...'
Additional Notes

No response

Log File

/c/software/lua-server/lua-language-server/3rd/luamake /c/software/lua-server/lua-language-server
ninja: no work to do.
/c/software/lua-server/lua-language-server
Plataforma detectada: windows
[0/2] Run test: 3rd/bee.lua/test/test.lua.OS: mingw64 10.0.19045
Arch: x86_64
Compiler: GCC 14.2.0
CRT: libstdc++ 20240801
DEBUG: false
............F...........F......FF...F......F...............................
.............................F..
Failed tests:

  1. filesystem.test_absolute_relative
    3rd/bee.lua/test/test_filesystem.lua:121: expected: true, actual: false
    stack traceback:
    3rd/bee.lua/test/test_filesystem.lua:121: in local 'assertIsAbsolute'
    3rd/bee.lua/test/test_filesystem.lua:128: in upvalue 'filesystem.test_absolute_relative'

  2. filesystem.test_exists
    3rd/bee.lua/test/test_filesystem.lua:321: expected: false, actual: true
    stack traceback:
    3rd/bee.lua/test/test_filesystem.lua:321: in local 'is_exists'
    3rd/bee.lua/test/test_filesystem.lua:331: in upvalue 'filesystem.test_exists'

  3. filesystem.test_rename
    rename: "temp1", "temp2": (generic:13)Permission denied
    stack traceback:
    3rd/bee.lua/test/test_filesystem.lua:474: in local 'rename_ok'
    3rd/bee.lua/test/test_filesystem.lua:504: in upvalue 'filesystem.test_rename'

  4. filesystem.test_current_path
    3rd/bee.lua/test/test_filesystem.lua:516: expected: userdata:/tmp/test_bee, actual: <userdata:C:/m
    sys64/tmp/test_bee>
    stack traceback:
    3rd/bee.lua/test/test_filesystem.lua:516: in upvalue 'filesystem.test_current_path'

  5. filesystem.test_copy_dir
    copy: "temp", "temp1": (generic:17)File exists
    stack traceback:
    3rd/bee.lua/test/test_filesystem.lua:697: in upvalue 'filesystem.test_copy_dir'

  6. filesystem.test_symlink
    create_symlink: "temp.txt", "temp.link": (generic:40)Function not implemented
    stack traceback:
    3rd/bee.lua/test/test_filesystem.lua:831: in local 'test_create'
    3rd/bee.lua/test/test_filesystem.lua:858: in upvalue 'filesystem.test_symlink'

  7. filewatch.test_symlink
    create_symlink: "C:/msys64/tmp/test_bee/temp/test1", "C:/msys64/tmp/test_bee/temp/test1": (generic:4
    0)Function not implemented
    stack traceback:
    3rd/bee.lua/test/test_filewatch.lua:89: in upvalue 'filewatch.test_symlink'

Ran 107 tests in 1.373 seconds, 100 successes, 7 failures

FAILED: build/_/bee-test
build/bin/lua-language-server.exe 3rd/bee.lua/test/test.lua
ninja: build stopped: subcommand failed.

In file code_format.lua just modified --victor line to avoid using utf-8 flag

local lm = require 'luamake'

lm.c = lm.compiler == 'msvc' and 'c89' or 'c11'
lm.cxx = 'c++17'

lm:source_set 'code_format' {
    rootdir = '../3rd/EmmyLuaCodeStyle',
    includes = {
        "Util/include",
        "CodeFormatCore/include",
        "LuaParser/include",
        "../bee.lua/3rd/lua",
        "3rd/wildcards/include"
    },
    sources = {
        -- codeFormatLib
        "CodeFormatLib/src/*.cpp",
        -- LuaParser
        "LuaParser/src/**/*.cpp",
        -- Util
        "Util/src/StringUtil.cpp",
        "Util/src/Utf8.cpp",
        "Util/src/SymSpell/*.cpp",
        "Util/src/InfoTree/*.cpp",
        --CodeService
        "CodeFormatCore/src/**/*.cpp",
    },
    windows = {
        --flags = "/utf-8", --victor
    },
    macos = {
        flags = "-Wall -Werror",
    },
    linux = {
        flags = "-Wall -Werror"
    }
}

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 make.sh 及其針對 MSYS2 Mingw64 環境的平台偵測路徑開始。重現建置,並檢查 3rd/bee.lua/test/test_filesystem.lua 和 test_filewatch.lua 中列出的失敗,尤其是路徑、重新命名、複製和 symlink 相關的情況。完成的標準是正確偵測到 Mingw64,且受影響測試的行為已獲得解決或有明確說明。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
lua, shell
領域
build-system, operating-systems
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。