Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Ibra2k
Copy link
Contributor

@Ibra2k Ibra2k commented Oct 14, 2025

Commit restores output from the --help and -h command when calling mumble-server by passing the help text from CLI11 to stdout.

Previously the --help was being swallowed by internal logger, since Mumble’s startup wraps CLI11 inside its own Murmur initializing logic that was detaching from the console.

So effectively the --help flag was being triggered and parsed but not displayed on user output terminal.

Closes #6934

@coderabbitai
Copy link

coderabbitai bot commented Oct 14, 2025

Walkthrough

  • File updated: src/murmur/main.cpp.
  • Formatting change: adjusted spacing in a static_cast expression.
  • CLI handling modified: on successful CLI parse/handling, the code now also prints to standard output, explicitly sets options.quit = true, and returns.
  • Control flow adjusted by adding a second conditional branch for the success path that performs stdout printing and triggers quit/return.
  • Failure path continues to log via qWarning and return early.
  • No changes to exported/public signatures.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning A minor formatting tweak in the cast expression (adding extra spaces) is unrelated to restoring CLI help output and falls outside the objectives of linked issue #6934. Please remove or separate the formatting-only change to the cast expression into a separate commit or justify its inclusion if it addresses a broader style guideline.
Description Check ⚠️ Warning The pull request description is missing the required “### Checks” section from the repository template, which includes the checklist for commit guidelines; all other sections appear sufficient but the template’s checkbox is not present. Please add the “### Checks” section with the checkbox for verifying commit guidelines so that the description matches the repository’s required template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly indicates that the change restores the --help output for the server CLI, matching the main purpose of the pull request in a concise, specific form without unnecessary details.
Linked Issues Check ✅ Passed The changes restore the --help and -h output for mumble-server by directing the CLI11 help text to standard output and correctly quitting, directly addressing the missing CLI output described in issue #6934.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fad4dfb and e367261.

📒 Files selected for processing (1)
  • src/murmur/main.cpp (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: PR (macOS)
  • GitHub Check: PR (Linux)
  • GitHub Check: PR (Translations)
  • GitHub Check: PR (Docs)
  • GitHub Check: PR (Windows_x64)

@Ibra2k
Copy link
Contributor Author

Ibra2k commented Oct 14, 2025

All checks have passed and the feedback from CodeRabbit has been address.
The --help now prints to stdout and returns proper exit codes.

May someone please approve the workflow and review for merging.
Thank you!

@Hartmnt
Copy link
Member

Hartmnt commented Oct 14, 2025

This fixes the problem. Out of curiosity, can you explain why this change was necessary in mumble-server, but not the mumble client?

@Ibra2k
Copy link
Contributor Author

Ibra2k commented Oct 15, 2025

This fixes the problem. Out of curiosity, can you explain why this change was necessary in mumble-server, but not the mumble client?

Well my thought process was that since the problem was occurring on the mumble-server i looked at the main.cpp file of it and since you guys mentioned it was working one person but not for another so I figured maybe there was a something/removed.

And i noticed that since the addition to CLI11 we were having this problem so I figured that was it.

I didn't think about the mumble-client since the problem was for the mumble-server command flag

@Hartmnt
Copy link
Member

Hartmnt commented Oct 15, 2025

This fixes the problem. Out of curiosity, can you explain why this change was necessary in mumble-server, but not the mumble client?

Well my thought process was that since the problem was occurring on the mumble-server i looked at the main.cpp file of it and since you guys mentioned it was working one person but not for another so I figured maybe there was a something/removed.

And i noticed that since the addition to CLI11 we were having this problem so I figured that was it.

I didn't think about the mumble-client since the problem was for the mumble-server command flag

This entirely misses the point of my question. I know that there was a problem with mumble-server and not with mumble-client, since I was the one who reported the issue.

I want to know (without digging into it myself, because otherwise I could have done this entire MR myself), why the implementation before your PR was working for the client but not the server. If you look at both implementations you will find that they are almost identical (with regards to the CLI parsing). So why was this broken in the first place?

@Ibra2k
Copy link
Contributor Author

Ibra2k commented Oct 16, 2025

This fixes the problem. Out of curiosity, can you explain why this change was necessary in mumble-server, but not the mumble client?

Well my thought process was that since the problem was occurring on the mumble-server i looked at the main.cpp file of it and since you guys mentioned it was working one person but not for another so I figured maybe there was a something/removed.
And i noticed that since the addition to CLI11 we were having this problem so I figured that was it.
I didn't think about the mumble-client since the problem was for the mumble-server command flag

This entirely misses the point of my question. I know that there was a problem with mumble-server and not with mumble-client, since I was the one who reported the issue.

I want to know (without digging into it myself, because otherwise I could have done this entire MR myself), why the implementation before your PR was working for the client but not the server. If you look at both implementations you will find that they are almost identical (with regards to the CLI parsing). So why was this broken in the first place?

In the mumble client main.cpp there was no custom message handler (qInstallMessageHandler) and was using the default Qt message handler. Whereas in the mumble-server main.cpp that custom handler was called
before the cli parsing while detach was true so we had buffering.

@Hartmnt
Copy link
Member

Hartmnt commented Oct 19, 2025

In the mumble client main.cpp there was no custom message handler (qInstallMessageHandler) and was using the default Qt message handler. Whereas in the mumble-server main.cpp that custom handler was called before the cli parsing while detach was true so we had buffering.

Thanks for the explanation. I see it now:

We do qInstallMessageHandler for the server before parsing the CLI options. Our message handler logs to syslog and not to stdout/stderr.

While we do qInstallMessageHandler after the parsing of CLI options for the client when initializing the logger. And I think our client handler/logger logs to multiple places including stdout/stderr anyway.

@Hartmnt
Copy link
Member

Hartmnt commented Oct 19, 2025

The only things missing for this PR are

  • We want the exit code fix for the client, too. As stated above.
  • The code formatting is not quite correct. Please check the PR-Check CI job log or use clang-format in version 10 to fix this.
  • In the end we want 2 commits in this PR. One for the mumble-server cli output fix. And one for fixing the exit code in both server and client. Look up "git interactive rebase" to get an idea on how it is done.

If you have any further questions, feel free to ask

@Ibra2k
Copy link
Contributor Author

Ibra2k commented Oct 20, 2025

The only things missing for this PR are

* We want the exit code fix for the client, too. As stated above.

* The code formatting is not quite correct. Please check the PR-Check CI job log or use clang-format in version 10 to fix this.

* In the end we want 2 commits in this PR. One for the mumble-server cli output fix. And one for fixing the exit code in both server and client. Look up "git interactive rebase" to get an idea on how it is done.

If you have any further questions, feel free to ask

I used clang-format version 18 since i couldn't get the older version. I hope it still has the proper formatting, if not please notify and ill change it manually right away.

@Hartmnt
Copy link
Member

Hartmnt commented Oct 20, 2025

I used clang-format version 18 since i couldn't get the older version. I hope it still has the proper formatting, if not please notify and ill change it manually right away.

We are happy, if the CI is happy. For now please include the formatting fix in your existing 2 commits.

@Ibra2k
Copy link
Contributor Author

Ibra2k commented Oct 21, 2025

I used clang-format version 18 since i couldn't get the older version. I hope it still has the proper formatting, if not please notify and ill change it manually right away.

We are happy, if the CI is happy. For now please include the formatting fix in your existing 2 commits.

Can you explain what you meant by CI? I didn't get it.
And just to be sure I need to combine the 2 commits into 1 like squash them?

@Krzmbrzl
Copy link
Member

Can you explain what you meant by CI? I didn't get it.

CI is short for "continuous integration". These are the builds and checks that are run for every commit (on GitHub they are listed here under "checks". In order for your PR to be accepted all CI runs (checks) need to pass.

And just to be sure I need to combine the 2 commits into 1 like squash them?

You'll have to disentangle your changes first. To do that, squash all three of your commits and then do a git reset HEAD ~1 to "uncommit" the combined commit (the result of the squash). Now git status will show you the changed files. All those files need to be formatted via clang-format. Now, use git add -p to add only those changes related to the fix of the CLI output and commit them. Then add the remaining changes (related to the exit code fix) and commit those (note that this commit should have TYPE FIX(client, server) as both components are affected by this).

Copy link
Member

@Hartmnt Hartmnt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works as advertised

@Hartmnt Hartmnt merged commit 3fd32a2 into mumble-voip:master Oct 23, 2025
14 checks passed
@Hartmnt
Copy link
Member

Hartmnt commented Oct 23, 2025

Thank you very much for fixing this 🎉

@Ibra2k
Copy link
Contributor Author

Ibra2k commented Oct 23, 2025

Thank you very much for fixing this 🎉

Thank you for allowing to work on it and guiding me through the process!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mumble-server is missing cli command output

3 participants