muon-build / muon

An implementation of the meson build system in c99
https://muon.build
GNU General Public License v3.0
166 stars 14 forks source link

muon can't build libsigcplusplus #49

Closed Curculigo closed 3 months ago

Curculigo commented 3 months ago

https://github.com/libsigcplusplus/libsigcplusplus

Error message:

C:/Work/libsigcplusplus/meson.build:76:65: error unexpected character: '\'
 76 | is_dist_check = project_source_root.contains('dist-unpack') and \
                                                                      ^
C:/Work/libsigcplusplus/meson.build:77:67: error expected expression, got end of line
 77 |                 project_build_root.contains('dist-build')
                                                                        ^
C:/Work/libsigcplusplus/meson.build:81:52: error unexpected character: '\'
 81 | maintainer_mode = maintainer_mode_opt == 'true' or \
                                                         ^
C:/Work/libsigcplusplus/meson.build:82:54: error expected expression, got end of line
 82 |                  (maintainer_mode_opt == 'if-git-build' and is_git_build)
                                                           ^
C:/Work/libsigcplusplus/meson.build:84:54: error unexpected character: '\'
 84 |   message('Looks like a tarball is being tested. ' + \
                                                           ^
C:/Work/libsigcplusplus/meson.build:99:60: error unexpected character: '\'
 99 | build_documentation = build_documentation_opt == 'true' or \
                                                                 ^
C:/Work/libsigcplusplus/meson.build:100:62: error expected expression, got end of line
100 |                      (build_documentation_opt == 'if-maintainer-mode' and maintainer_mode)
                                                                   ^
C:/Work/libsigcplusplus/meson.build:124:66: error unexpected character: '\'
124 |   assert(cpp_compiler.version().split('.')[0].to_int() >= 19 and \
                                                                       ^
C:/Work/libsigcplusplus/meson.build:146:53: error unexpected character: '\'
146 |   message('The \'dot\' command is not found.\n  ' + \
                                                          ^
C:/Work/libsigcplusplus/meson.build:163:48: error unexpected character: '\'
163 |   warning('Missing files in untracked/.\n  ' + \
                                                     ^
C:/Work/libsigcplusplus/meson.build:369:70: error unexpected character: '\'
369 |   '       Compiler warnings: @0@ (warning_level: @1@, werror: @2@)'. \
                                                                           ^
vtorri commented 3 months ago

ask the maintainer to remove the backslashes, they are useless. He should read meson doc about backslashes.

Curculigo commented 3 months ago

ask the maintainer to remove the backslashes, they are useless. He should read meson doc about backslashes.

Thank you. But that's not an option. Btw, I'm sorry because I misunderstood your comment. I mistakenly think the maintainer you mentioned to be muon's maintainer, not libsigcplusplus's maintainer. I'm really tired of waiting for muon's maintainer and sometimes I wonder why I'm wasting time with this project.

eli-schwartz commented 3 months ago

I am quite confused by this bug report for two reasons:

Curculigo commented 3 months ago

I am quite confused by this bug report for two reasons:

  • backslashes are a perfectly ordinary part of the meson grammar, and not incorrect to use
  • muon supports this just fine. The project successfully configures for me with muon.

Are you using Linux or a POSIX environment on Windows like Cygwin/MSYS2? I'm using pure Win32 with Windows CMD.

eli-schwartz commented 3 months ago

Are you using Linux or a POSIX environment on Windows like Cygwin/MSYS2? I'm using pure Win32 with Windows CMD.

I am using Linux.

So then let's reword this: it is a perfectly ordinary part of the meson grammar, and muon is supposed to support it just fine so if it is failing to do so, it is a bug in the work-in-progress Windows support.

The backslash is vital, in general, to support. While the "and" token can result in a line continuation regardless, as do function arguments in an unclosed function call, the language as a whole needs backslash support to better support users with complex logic flows that end up spreading over multiple lines.

Curculigo commented 3 months ago

Windows support is WIP? Are you confused with @vtorri's WIP windows module?

Why doesn't the muon's maintainer put this on the project's README.md? I've really wasted my time!

annacrombie commented 3 months ago

I noticed a bug with lexing \ with windows line endings. Maybe this was the issue? I fixed it here: https://github.com/annacrombie/muon/commit/5a22ac95bda9f4efb230acc11d7086973e8a7544

Also @iahun2 I'm sorry you got the impression that windows was fully supported. I've added a mention of platform support in the readme.