Skip to content

Compilation error wildcards/match.hpp: No such file or directory #1128

@sharksforarms

Description

@sharksforarms

Describe the bug

[59/82] Compile C++ build/obj/code_format/StringUtil.obj
FAILED: build/obj/code_format/StringUtil.obj
gcc -MMD -MT build/obj/code_format/StringUtil.obj -MF build/obj/code_format/StringUtil.obj.d -std=c++17 -O2 -Wall -fvisibility=hidden -I3rd/EmmyLuaCodeStyle/include -I3rd/bee.lua/3rd/lua -DNDEBUG -Wall -Werror -o build/obj/code_format/StringUtil.obj -c 3rd/EmmyLuaCodeStyle/Util/src/StringUtil.cpp
3rd/EmmyLuaCodeStyle/Util/src/StringUtil.cpp:5:10: fatal error: wildcards/match.hpp: No such file or directory
    5 | #include "wildcards/match.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

To Reproduce

    cd 3rd/luamake
    compile/install.sh
    cd ../..
    ./3rd/luamake/luamake rebuild

Environment (please complete the following information):

  • OS: Ubuntu 21.04
  • gcc: gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0

Additional context

This fixes it:

diff --git a/make/code_format.lua b/make/code_format.lua
index 6f5f120..e4fe09e 100644
--- a/make/code_format.lua
+++ b/make/code_format.lua
@@ -7,7 +7,8 @@ lm:source_set 'code_format' {
     rootdir = '../3rd/EmmyLuaCodeStyle',
     includes = {
         "include",
-        "../bee.lua/3rd/lua"
+        "../bee.lua/3rd/lua",
+        "3rd/wildcards/include"
     },
     sources = {
         -- codeFormatLib

Fixes for -Werror -Wall

diff --git a/Util/src/StringUtil.cpp b/Util/src/StringUtil.cpp
index 7d8238e..9270954 100644
--- a/Util/src/StringUtil.cpp
+++ b/Util/src/StringUtil.cpp
@@ -150,7 +150,7 @@ std::string_view StringUtil::GetFileRelativePath(std::string_view workspace, std
                }
        }

-       if (i < filePath.size() && filePath[i] == '\\' || filePath[i] == '/')
+       if ((i < filePath.size() && filePath[i] == '\\') || filePath[i] == '/')
        {
                i++;
        }

If you'd like I can submit PRs, but I'm curious because CI is passing...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions