{"record":{"id":"e3f4f504960b99d6","repo":"jdx/mise","slug":"unsupported-cask-flight-step-dsl-name","errorCode":null,"errorMessage":"unsupported cask flight step DSL `#{name}`","messagePattern":"unsupported cask flight step DSL `#(.+?)`","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/tap_cask_metadata.rb","lineNumber":132,"sourceCode":"\n  def version = @cask.version\n  def arch = @cask.arch\n  def appdir = @cask.appdir\n\n  def run(command, base: nil, **options)\n    path = { path: command.to_s }\n    # `appdir` interpolates to the `$APPDIR` marker; the installer only\n    # accepts it on `base: :appdir` commands, as a path relative to that base.\n    if path[:path].start_with?(\"$APPDIR/\")\n      base = :appdir if base.nil?\n      path[:path] = path[:path].delete_prefix(\"$APPDIR/\") if base == :appdir\n    end\n    path[:base] = base.to_s unless base.nil?\n    @steps << options.merge(type: \"run\", command: path)\n  end\n\n  def method_missing(name, *, &block)\n    raise \"unsupported cask flight step DSL `#{name}`\"\n  end\n\n  def respond_to_missing?(*) = true\nend\n\nclass CaskMetadata\n  attr_reader :token, :artifacts, :formula_dependencies, :cask_dependencies,\n              :conflicting_casks\n\n  def initialize(token)\n    @token = token\n    @artifacts = []\n    @formula_dependencies = []\n    @cask_dependencies = []\n    @conflicting_casks = []\n    @auto_updates = false\n    @languages = {}\n  end","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/packages/brew/tap_cask_metadata.rb#L114-L150","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Add the missing step name to the CaskFlightStep DSL in src/system/packages/brew/tap_cask_metadata.rb","Update mise to a version that supports the cask's DSL construct","Pin the cask/tap to a revision that only uses supported step types","If the step is irrelevant to metadata extraction, stub it as a no-op in the shim"],"exampleFix":"# before (shim)\ndef method_missing(name, *, &block)\n  raise \"unsupported cask flight step DSL `#{name}`\"\nend\n# after (shim)\ndef method_missing(name, *, &block)\n  return nil if %i[uninstall_postflight uninstall_preflight].include?(name)\n  raise \"unsupported cask flight step DSL `#{name}`\"\nend","handlingStrategy":"validation","validationCode":"SUPPORTED_STEPS = %i[run].freeze\nraise \"unsupported step #{name}\" unless SUPPORTED_STEPS.include?(name)","typeGuard":"def supported_step?(name) = CaskFlightStep.instance_methods(false).include?(name) || %i[run].include?(name)","tryCatchPattern":"begin\n  evaluate_cask(cask_source)\nrescue RuntimeError => e\n  raise unless e.message.start_with?(\"unsupported cask flight step DSL\")\n  warn \"cask uses unsupported flight step; metadata unavailable\"\nend","preventionTips":["Keep the shim's step list in sync with Homebrew's cask DSL releases","Test against the newest casks in the target taps before upgrading mise","Stub harmless flight steps (preflight/postflight) as no-ops since they do not affect metadata"],"tags":["ruby","dsl","cask","unsupported-stanza"],"backgroundTag":"unsupported-operation","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}