{"record":{"id":"994103651dcb5b32","repo":"d12frosted/homebrew-emacs-plus","slug":"invalid-patches-in-path-expected-array-of-pa","errorCode":null,"errorMessage":"Invalid 'patches' in #{path}\nExpected: array of patch names\nGot: #{patches.inspect} (#{patches.class})\n\nExample:\n  patches:\n    - frame-transparency\n    - aggressive-read-buffering","messagePattern":"Invalid 'patches' in #(.+?)\nExpected: array of patch names\nGot: #(.+?) \\(#(.+?)\\)\n\nExample:\n  patches:\n    - frame-transparency\n    - aggressive-read-buffering","errorType":"validation","errorClass":"ConfigurationError","httpStatus":null,"severity":"error","filePath":"Library/BuildConfig.rb","lineNumber":272,"sourceCode":"\n      raise ConfigurationError,\n        \"Invalid '#{key}' version map in #{path}\\n\" \\\n        \"Version keys must be major Emacs versions (e.g. \\\"30\\\") or 'default'.\\n\" \\\n        \"Got key(s): #{bad.map(&:inspect).join(', ')}\"\n    end\n\n    def validate_inject_path!(value, path)\n      return if [true, false].include?(value)\n\n      raise ConfigurationError,\n        \"Invalid 'inject_path' in #{path}\\n\" \\\n        \"Expected: true or false\\n\" \\\n        \"Got: #{value.inspect} (#{value.class})\"\n    end\n\n    def validate_patches!(patches, path)\n      unless patches.is_a?(Array)\n        raise ConfigurationError,\n          \"Invalid 'patches' in #{path}\\n\" \\\n          \"Expected: array of patch names\\n\" \\\n          \"Got: #{patches.inspect} (#{patches.class})\\n\\n\" \\\n          \"Example:\\n\" \\\n          \"  patches:\\n\" \\\n          \"    - frame-transparency\\n\" \\\n          \"    - aggressive-read-buffering\"\n      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|","sourceCodeStart":254,"sourceCodeEnd":290,"githubUrl":"https://github.com/d12frosted/homebrew-emacs-plus/blob/01c47fe98f35ff28a37a89e1f7aafadff621f9e0/Library/BuildConfig.rb#L254-L290","documentation":"Error \"Invalid 'patches' in #{path}\nExpected: array of patch names\nGot: #{patches.inspect} (#{patches.class})\n\nExample:\n  patches:\n    - frame-transparency\n    - aggressive-read-buffering\" thrown in d12frosted/homebrew-emacs-plus.","triggerScenarios":"Thrown at Library/BuildConfig.rb:272 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make 'patches' a YAML list: put each patch name on its own line prefixed with '- '.","Correct form:\n  patches:\n    - frame-transparency\n    - aggressive-read-buffering","If you wrote a single string like 'patches: frame-transparency', convert it to a one-element list:\n  patches:\n    - frame-transparency","Remove the 'patches' key if you do not need any patches."],"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"}