On this page:
4.1 Special keys
4.1.1 root
4.1.2 catalogs
4.1.3 local
4.2 JSON
4.3 Racket Data
8.12

4 Supported formats🔗ℹ

The default Req file format is JSON but also the Racket Data format is supported.

The format parser is picked based on the file extension, so ".json" for JSON and ".rktd" for Racket Data. Because of that, giving Req a JSON file containing Racket data will cause it to crash.

Also, Racket’s JSON parser is very picky about given data, this means, most importantly: no comments and no leftover commas.

By default if the flag --file is not given, then Req will search the following paths, in order:

4.1 Special keys🔗ℹ

Any keys other than "root", "catalogs" or "local" are treated as "extra" set, such set contains a list of packages that can be installed with either --extra or --extras flag passed to raco req (see the Req command-line interface documentation for more details).

  extra = (list package-name ...)
     
  package-name = string

4.1.1 root🔗ℹ

  root = string

Specifies the location of root directory of project’s sub-packages.

4.1.2 catalogs🔗ℹ

  catalogs = (list catalog-url ..)
     
  catalog-url = string

Specifies a list of catalogs to overwrite the default Racket catalogs. If this list is not given or empty, then the default catalogs are used.

4.1.3 local🔗ℹ

  local = (list package ...)
     
  package = package-path
  | (list package-path package-name)
     
  package-path = string
     
  package-name = string

Specifies a list of local packages.

Each package can either be a path (inside the package root directory) or a list containig two elements:

If a string is used, then it can contain wildcards used to glob directories inside the package root directory (which can be overwritten by the "root" key).

4.2 JSON🔗ℹ

Example of a single-package project using JSON as a configuration format:

{

  "local": [

    [".", "mylib"]

  ],

  "dev": [

    "ziptie-completion"

  ]

}

Example of a multi-package project using JSON as a configuration format:

{

  "root": "src",

  "local": [

    "mylib*"

  ],

  "dev": [

    "ziptie-completion"

  ]

}

4.3 Racket Data🔗ℹ

Example of a single-package project using RKTD as a configuration format:

((local ((. mylib)))

 (dev (ziptie-completion)))

Example of a multi-package project using RKTD as a configuration format:

((root src)

 (local (mylib*))

 (dev (ziptie-completion)))