{"record":{"id":"298519f4f2e78ead","repo":"d12frosted/homebrew-emacs-plus","slug":"invalid-patches-entry-in-path-expected-patch","errorCode":null,"errorMessage":"Invalid 'patches' entry in #{path}\nExpected: patch name (string) or named patch with 'url' and 'sha256'\nGot: #{entry.inspect} (#{entry.class})","messagePattern":"Invalid 'patches' entry in #(.+?)\nExpected: patch name \\(string\\) or named patch with 'url' and 'sha256'\nGot: #(.+?) \\(#(.+?)\\)","errorType":"validation","errorClass":"ConfigurationError","httpStatus":null,"severity":"error","filePath":"Library/BuildConfig.rb","lineNumber":298,"sourceCode":"      end\n\n      patches.each do |entry|\n        case entry\n        when String\n          # Valid: patch name from registry\n        when Hash\n          entry.each do |name, value|\n            if version_map?(value) && !value.empty?\n              validate_version_map_keys!(value, \"patches.#{name}\", path)\n              value.each do |ver, spec|\n                validate_patch_spec!(spec, path, key: \"patches.#{name}.#{ver}\")\n              end\n            else\n              validate_patch_spec!(value, path, key: \"patches.#{name}\")\n            end\n          end\n        else\n          raise ConfigurationError,\n            \"Invalid 'patches' entry in #{path}\\n\" \\\n            \"Expected: patch name (string) or named patch with 'url' and 'sha256'\\n\" \\\n            \"Got: #{entry.inspect} (#{entry.class})\"\n        end\n      end\n    end\n\n    def validate_patch_spec!(spec, path, key:)\n      return if spec.is_a?(Hash) && spec[\"url\"] && spec[\"sha256\"]\n\n      raise ConfigurationError,\n        \"Invalid '#{key}' in #{path}\\n\" \\\n        \"External and local patches require both 'url' and 'sha256'.\\n\" \\\n        \"Got: #{spec.inspect}\"\n    end\n\n    def validate_revision!(revision, path)\n      case revision","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/d12frosted/homebrew-emacs-plus/blob/01c47fe98f35ff28a37a89e1f7aafadff621f9e0/Library/BuildConfig.rb#L280-L316","documentation":"Error \"Invalid 'patches' entry in #{path}\nExpected: patch name (string) or named patch with 'url' and 'sha256'\nGot: #{entry.inspect} (#{entry.class})\" thrown in d12frosted/homebrew-emacs-plus.","triggerScenarios":"Thrown at Library/BuildConfig.rb:298 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Each entry in 'patches' must be either a plain patch name string (e.g. '- frame-transparency') or a named patch map with 'url' and 'sha256' keys.","For a custom patch, use the map form:\n  patches:\n    - my-patch:\n        url: https://example.com/my.patch\n        sha256: <hex digest>","Remove or fix entries that are numbers, nested lists, or other non-string/non-map values."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01c47fe98f35ff28a37a89e1f7aafadff621f9e0","analyzedAt":"2026-08-23T16:25:45.065Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}