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

Better logging/error message #2421

Closed
arkena00 opened this issue Jun 1, 2022 · 4 comments
Closed

Better logging/error message #2421

arkena00 opened this issue Jun 1, 2022 · 4 comments

Comments

@arkena00
Copy link

arkena00 commented Jun 1, 2022

Is your feature request related to a problem? Please describe.

Some of logging / error message are not clear or not accurate.

Describe the solution you'd like

  • Display more information about the compiler version, we only have the VS version atm
    compiler ID : MSVC 19.32.31329.0
    compiler path : %programs%/.../cl.exe

  • The config options errors are not clear because there is no distinction between user and xmake config

error: Invalid option: --rng=on
When an option doesn't exists, we are flooded by the config help instead of just having a warning like "option ignored"

So maybe add a distinction between user and xmake configs like
xmake f -xqt=path -xarch=x64 --user_option=v
It would break the current version so maybe in another one.

Same for the xmake.lua errors, when you come from cmake, the errors are harder to identify

Describe alternatives you've considered

No response

Additional context

No response

@arkena00
Copy link
Author

arkena00 commented Jun 5, 2022

Some packages can take time to download/install, by default we have no information about the state.
Maybe display a progressbar and/or the last output message on a single line to avoid flooding.

@waruqi
Copy link
Member

waruqi commented Jun 8, 2022

The config options errors are not clear because there is no distinction between user and xmake config

I have improved option menu, add option categories.

Command options (Other Configuration):
        --debugger=DEBUGGER                                  Set debugger (default: auto)
        --ccache=[y|n]                                       Enable or disable the c/c++ compiler cache. (default: y)
        --ccachedir=CCACHEDIR                                Set the ccache directory.
        --trybuild=TRYBUILD                                  Enable try-build mode and set the third-party buildsystem tool.
                                                             e.g.
    ...

Command options (Project Configuration):

        --zip=[y|n]                                          The zip module (default: y)
        --regex=[y|n]                                        The regex module (default: y)
        --object=[y|n]                                       The object module (default: y)
        --xml=[y|n]                                          The xml module (default: y)
        --coroutine=[y|n]                                    The coroutine module (default: y)
        --charset=[y|n]                                      The charset module (default: y)
        --database=[y|n]                                     The database module (default: y)
        --hash=[y|n]                                         The hash module (default: y)

@waruqi waruqi added this to the v2.6.8 milestone Jun 8, 2022
@waruqi
Copy link
Member

waruqi commented Jun 9, 2022

Some packages can take time to download/install, by default we have no information about the state.
Maybe display a progressbar and/or the last output message on a single line to avoid flooding.

We cannot capture download progress from curl/wget, but you can add -vD to get more verbose information.

@waruqi
Copy link
Member

waruqi commented Jun 9, 2022

I have improved to show msvc info.

checking for Microsoft Visual Studio (x64) version ... 2019
checking for Microsoft C/C++ Compiler (x64) version ... 19.29.30137

But cl full path is too long, so you can only show it when enable -v

$ xmake f -cv
checking for cl.exe ... C:\Program Files (x86)\Microsoft Visual Studio\2019\Comm
unity\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\cl.exe
checking for link.exe ... C:\Program Files (x86)\Microsoft Visual Studio\2019\Co
mmunity\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe

@waruqi waruqi closed this as completed Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants