{"record":{"id":"fc76321bf360c32a","repo":"d12frosted/homebrew-emacs-plus","slug":"invalid-key-in-path-external-and-local-pat","errorCode":null,"errorMessage":"Invalid '#{key}' in #{path}\nExternal and local patches require both 'url' and 'sha256'.\nGot: #{spec.inspect}","messagePattern":"Invalid '#(.+?)' in #(.+?)\nExternal and local patches require both 'url' and 'sha256'\\.\nGot: #(.+?)","errorType":"validation","errorClass":"ConfigurationError","httpStatus":null,"severity":"error","filePath":"Library/BuildConfig.rb","lineNumber":309,"sourceCode":"                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\n      when String\n        unless revision.match?(/\\A[a-f0-9]+\\z/i)\n          raise ConfigurationError,\n            \"Invalid 'revision' in #{path}\\n\" \\\n            \"Expected: git commit hash (hex string)\\n\" \\\n            \"Got: #{revision.inspect}\"\n        end\n      when Hash\n        validate_version_map_keys!(revision, \"revision\", path)\n        revision.each do |ver, rev|\n          unless rev.is_a?(String) && rev.match?(/\\A[a-f0-9]+\\z/i)","sourceCodeStart":291,"sourceCodeEnd":327,"githubUrl":"https://github.com/d12frosted/homebrew-emacs-plus/blob/01c47fe98f35ff28a37a89e1f7aafadff621f9e0/Library/BuildConfig.rb#L291-L327","documentation":"Error \"Invalid '#{key}' in #{path}\nExternal and local patches require both 'url' and 'sha256'.\nGot: #{spec.inspect}\" thrown in d12frosted/homebrew-emacs-plus.","triggerScenarios":"Thrown at Library/BuildConfig.rb:309 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add both 'url' and 'sha256' to the patch entry:\n  patches:\n    - my-patch:\n        url: https://example.com/my.patch\n        sha256: <hex digest>","Compute the sha256 of the patch file with 'shasum -a 256 my.patch' and paste the digest.","If you meant a built-in patch, use just its name string instead of a map."],"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"}