jdx/mise · error · RuntimeError

unsupported cask flight step DSL `#

Error message

unsupported cask flight step DSL `#{name}`

What it means

Raised by the CaskFlightStep DSL object's method_missing in mise's tap_cask_metadata.rb shim. The shim evaluates cask files with a minimal Homebrew-compatible DSL, and inside a flight/step block only a small set of step types (e.g. the defined run/base step builders) are implemented. Any unknown method inside that block means the cask uses a DSL step the shim does not support, so parsing aborts rather than produce wrong metadata.

Solutions

  1. Add the missing step name to the CaskFlightStep DSL in src/system/packages/brew/tap_cask_metadata.rb
  2. Update mise to a version that supports the cask's DSL construct
  3. Pin the cask/tap to a revision that only uses supported step types
  4. If the step is irrelevant to metadata extraction, stub it as a no-op in the shim

Example fix

# before (shim)
def method_missing(name, *, &block)
  raise "unsupported cask flight step DSL `#{name}`"
end
# after (shim)
def method_missing(name, *, &block)
  return nil if %i[uninstall_postflight uninstall_preflight].include?(name)
  raise "unsupported cask flight step DSL `#{name}`"
end
Defensive patterns

Strategy: validation

Validate before calling

SUPPORTED_STEPS = %i[run].freeze
raise "unsupported step #{name}" unless SUPPORTED_STEPS.include?(name)

Type guard

def supported_step?(name) = CaskFlightStep.instance_methods(false).include?(name) || %i[run].include?(name)

Try / catch

begin
  evaluate_cask(cask_source)
rescue RuntimeError => e
  raise unless e.message.start_with?("unsupported cask flight step DSL")
  warn "cask uses unsupported flight step; metadata unavailable"
end

Prevention

When it happens

Trigger: A cask stanza/step method is called inside a flight step block whose name is not among the step types the shim implements; an upstream cask adopted a newer Homebrew DSL construct not yet mirrored in the shim; a typo'd helper call inside the block.

Common situations: Third-party tap casks using newer Homebrew cask DSL features; mise falling behind Homebrew's DSL evolution; evaluating a cask from a tap that uses custom stanza helpers.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/e3f4f504960b99d6. Report an issue: GitHub.

Appendix: source

Thrown at src/system/packages/brew/tap_cask_metadata.rb:132

  def version = @cask.version
  def arch = @cask.arch
  def appdir = @cask.appdir

  def run(command, base: nil, **options)
    path = { path: command.to_s }
    # `appdir` interpolates to the `$APPDIR` marker; the installer only
    # accepts it on `base: :appdir` commands, as a path relative to that base.
    if path[:path].start_with?("$APPDIR/")
      base = :appdir if base.nil?
      path[:path] = path[:path].delete_prefix("$APPDIR/") if base == :appdir
    end
    path[:base] = base.to_s unless base.nil?
    @steps << options.merge(type: "run", command: path)
  end

  def method_missing(name, *, &block)
    raise "unsupported cask flight step DSL `#{name}`"
  end

  def respond_to_missing?(*) = true
end

class CaskMetadata
  attr_reader :token, :artifacts, :formula_dependencies, :cask_dependencies,
              :conflicting_casks

  def initialize(token)
    @token = token
    @artifacts = []
    @formula_dependencies = []
    @cask_dependencies = []
    @conflicting_casks = []
    @auto_updates = false
    @languages = {}
  end

View on GitHub (pinned to 533346cc37)