d12frosted/homebrew-emacs-plus · error · ConfigurationError

Invalid 'patches' in #{path} Expected: array of patch names

Error message

Invalid 'patches' in #{path}
Expected: array of patch names
Got: #{patches.inspect} (#{patches.class})

Example:
  patches:
    - frame-transparency
    - aggressive-read-buffering

What it means

Error "Invalid 'patches' in #{path} Expected: array of patch names Got: #{patches.inspect} (#{patches.class}) Example: patches: - frame-transparency - aggressive-read-buffering" thrown in d12frosted/homebrew-emacs-plus.

Source

Thrown at Library/BuildConfig.rb:272

      raise ConfigurationError,
        "Invalid '#{key}' version map in #{path}\n" \
        "Version keys must be major Emacs versions (e.g. \"30\") or 'default'.\n" \
        "Got key(s): #{bad.map(&:inspect).join(', ')}"
    end

    def validate_inject_path!(value, path)
      return if [true, false].include?(value)

      raise ConfigurationError,
        "Invalid 'inject_path' in #{path}\n" \
        "Expected: true or false\n" \
        "Got: #{value.inspect} (#{value.class})"
    end

    def validate_patches!(patches, path)
      unless patches.is_a?(Array)
        raise ConfigurationError,
          "Invalid 'patches' in #{path}\n" \
          "Expected: array of patch names\n" \
          "Got: #{patches.inspect} (#{patches.class})\n\n" \
          "Example:\n" \
          "  patches:\n" \
          "    - frame-transparency\n" \
          "    - aggressive-read-buffering"
      end

      patches.each do |entry|
        case entry
        when String
          # Valid: patch name from registry
        when Hash
          entry.each do |name, value|
            if version_map?(value) && !value.empty?
              validate_version_map_keys!(value, "patches.#{name}", path)
              value.each do |ver, spec|

View on GitHub (pinned to 01c47fe98f)

Solutions

  1. Make 'patches' a YAML list: put each patch name on its own line prefixed with '- '.
  2. Correct form: patches: - frame-transparency - aggressive-read-buffering
  3. If you wrote a single string like 'patches: frame-transparency', convert it to a one-element list: patches: - frame-transparency
  4. Remove the 'patches' key if you do not need any patches.

When it happens

Trigger: Thrown at Library/BuildConfig.rb:272 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of d12frosted/homebrew-emacs-plus@01c47fe98f (2026-08-23). Data as JSON: /api/errors/994103651dcb5b32. Report an issue: GitHub.