Skip to content

Add JitMode enum with auto/on/off support#2

Open
alies-dev wants to merge 1 commit intodisable-jit-by-defaultfrom
jit-mode-auto-enum
Open

Add JitMode enum with auto/on/off support#2
alies-dev wants to merge 1 commit intodisable-jit-by-defaultfrom
jit-mode-auto-enum

Conversation

@alies-dev
Copy link
Owner

Summary

Builds on #1 to replace the boolean forceJit with a three-mode JitMode enum:

  • auto (default) — enable JIT when available, continue gracefully without it
  • on — require JIT, exit if unavailable (equivalent to --force-jit)
  • off — never enable JIT

Backward compatibility

forceJit="true" maps to on, forceJit="false" maps to off. Existing configs continue to work.

The auto default preserves the current behavior of attempting JIT without hard-failing, while giving users explicit control when needed (e.g. off to avoid JIT segfaults during taint analysis).

Changes

  • New Psalm\JitMode backed enum with fromConfig() for parsing
  • Config::$force_jit (bool) → Config::$jit_mode (JitMode)
  • PsalmRestarter::$enableJit (bool) → PsalmRestarter::$jitMode (JitMode)
  • Status messages adapt to mode: silent in auto, informational in off, error in on
  • XSD schema updated to accept string values
  • Docs updated with all three modes

Introduce a JitMode enum to replace the boolean forceJit flag,
providing three modes:

- auto (default): enable JIT when available, continue without it
- on: require JIT, exit if unavailable (former --force-jit behavior)
- off: never enable JIT

Backward compatible: true maps to on, false maps to off.
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.

1 participant