You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fixes a macOS CLI startup regression where pluginval could abort before handling command-line options. On macOS 26.4, both the current v1.0.4 release and current develop aborted on direct CLI startup, including pluginval --version, which also prevented headless validation in CI-like usage.
Problem
Direct CLI launch aborted before normal command handling:
The abort happened during app/bootstrap behavior that is unnecessary for CLI mode.
In local testing, the crash path involved macOS application registration during startup and also reproduced when the CLI path attempted to change dock/presentation state.
Approach
Route CLI mode before full JUCEApplication startup.
Keep the GUI app path unchanged.
Run CLI mode with a minimal headless JUCE/message-loop setup.
Avoid dock/presentation changes in CLI mode, because they force application registration on recent macOS builds and can break headless execution.
Add small tests for raw argv CLI detection so the custom entry path stays covered.
Scope
Source/Main.cpp
Source/CommandLine.h
Source/CommandLine.cpp
Source/CommandLineTests.cpp
Notes
This PR is intentionally narrow. It fixes CLI startup/routing and does not change validation logic.
GUI behavior is left on the existing JUCEApplication path.
AU discovery failures seen locally are separate from this startup fix.
Are you sure all of this is required? It seems like a lot of changes just to fix version reporting...
I can understand not calling hideDock, but why can't we have a normal juce application running headless?
Are you sure all of this is required? It seems like a lot of changes just to fix version reporting... I can understand not calling hideDock, but why can't we have a normal juce application running headless?
Thanks, that’s fair.
--version was just the smallest repro. The real issue on my machine was that CLI startup in general was aborting on macOS 26.4, including --validate, so it was breaking headless validation, not just version reporting.
From the crash report, the abort was happening during JUCEApplicationBase::main / NSApplication startup, before initialise() ran. That’s why I didn’t stop at the dock call.
That said, I agree the patch may be broader than ideal. If you’d prefer, I can rework it into a smaller version that:
keeps the normal GUI app path unchanged
removes the dock/presentation change in CLI mode
keeps --version, --help, --run-tests, and --validate working
still exits cleanly with the right return code
I’d only want to do that if it still fixes real --validate runs on my machine, not just --version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes a macOS CLI startup regression where
pluginvalcould abort before handling command-line options. On macOS 26.4, both the currentv1.0.4release and currentdevelopaborted on direct CLI startup, includingpluginval --version, which also prevented headless validation in CI-like usage.Problem
pluginval --versionpluginval --strictness-level 5 --skip-gui-tests /path/to/plugin.vst3Approach
JUCEApplicationstartup.argvCLI detection so the custom entry path stays covered.Scope
Source/Main.cppSource/CommandLine.hSource/CommandLine.cppSource/CommandLineTests.cppNotes
JUCEApplicationpath.Repro
Before this patch, on macOS 26.4: