melpa / package-build

Tools for assembling a package archive
https://github.com/melpa/melpa
25 stars 34 forks source link

Don't json-encode value of :files property #33

Closed tarsius closed 5 years ago

tarsius commented 5 years ago

https://github.com/melpa/melpa/pull/5888 demonstrates how json-encode messes up the value of the :files property of recipes. IMO we should not do what's proposed in that pr and just refrain from trying to turn the value :files into json, by storing the complete value as a single string in json.

Replace

{
  "dyalog-mode": {
    "fetcher": "bitbucket",
    "repo": "harsman/dyalog-mode",
    "files": {
      "defaults": "Emacs.apl"
    }
  }
}

(which is invalid) with

{
  "dyalog-mode": {
    "fetcher": "bitbucket",
    "repo": "harsman/dyalog-mode",
    "files": "(:defaults \"Emacs.apl\")"
  }
}

@conao3 Do you actually have to extract the value of :files out of the json file? Unless someone actually needs to get this data from there I see no reason to go through all the trouble that encoding this in json would bring with it. (I don't think your proposed pr would be sufficient.)