Lake Manifest #
The data structure of a Lake manifest and the definitions needed to create, modify, serialize, and deserialize it.
The current version of the manifest format.
Three-part semantic versions were introduced in v1.0.0
.
Major version increments indicate breaking changes
(e.g., new required fields and semantic changes to existing fields).
Minor version increments (after 0.x
) indicate backwards-compatible extensions
(e.g., adding optional fields, removing fields).
Lake supports reading manifests with versions that have -
suffixes.
When checking for version compatibility, Lake expects a manifest with version
x.y.z-foo
to have all the features of the official manifest version x.y.z
.
That is, Lake ignores the -
suffix.
VERSION HISTORY
v0.x.0 (versioned by a natural number)
1
: First version2
: Adds optionalinputRev
package entry field3
: Changes entry to inductive (withpath
/git
)4
: Adds requiredpackagesDir
manifest field5
: Adds optionalinherited
package entry field (and removedopts
)6
: Adds optional package rootname
manifest field7
:type
refactor, custom to/fromJson
v1.x.x (versioned by a string)
"1.0.0"
: Switches to a semantic versioning scheme"1.1.0"
: Add optionalscope
package entry field
Equations
- Lake.Manifest.version = { major := 1, minor := 1, patch := 0, specialDescr := "" }
Instances For
Manifest version 0.6.0
package entry. For backwards compatibility.
- path (name : Lean.Name) (opts : Lean.NameMap String) (inherited : Bool) (dir : System.FilePath) : Lake.PackageEntryV6
- git (name : Lean.Name) (opts : Lean.NameMap String) (inherited : Bool) (url rev : String) (inputRev? : Option String) (subDir? : Option System.FilePath) : Lake.PackageEntryV6
Instances For
Equations
- Lake.instFromJsonPackageEntryV6 = { fromJson? := Lake.fromJsonPackageEntryV6✝ }
Equations
- Lake.instToJsonPackageEntryV6 = { toJson := Lake.toJsonPackageEntryV6✝ }
Equations
The package source for an entry in the manifest. Describes exactly how Lake should materialize the package.
- path
(dir : System.FilePath)
: Lake.PackageEntrySrc
A local filesystem package.
dir
is relative to the package directory of the package containing the manifest. - git
(url rev : String)
(inputRev? : Option String)
(subDir? : Option System.FilePath)
: Lake.PackageEntrySrc
A remote Git package.
Instances For
Equations
- Lake.instInhabitedPackageEntrySrc = { default := Lake.PackageEntrySrc.path default }
An entry for a package stored in the manifest.
- name : Lean.Name
- scope : String
- inherited : Bool
- configFile : System.FilePath
- manifestFile? : Option System.FilePath
- src : Lake.PackageEntrySrc
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.PackageEntry.instToJson = { toJson := Lake.PackageEntry.toJson }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.PackageEntry.instFromJson = { fromJson? := Lake.PackageEntry.fromJson? }
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Manifest data structure that is serialized to the file.
- name : Lean.Name
- lakeDir : System.FilePath
- packagesDir? : Option System.FilePath
- packages : Array Lake.PackageEntry
Instances For
Add a package entry to the end of a manifest.
Equations
- Lake.Manifest.addPackage entry self = { name := self.name, lakeDir := self.lakeDir, packagesDir? := self.packagesDir?, packages := self.packages.push entry }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.Manifest.instToJson = { toJson := Lake.Manifest.toJson }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lake.Manifest.instFromJson = { fromJson? := Lake.Manifest.fromJson? }
Parse a Manifest
from a string.
Equations
- Lake.Manifest.parse data = match Lean.Json.parse data with | Except.ok json => Lean.fromJson? json | Except.error e => throw (toString "invalid JSON: " ++ toString e ++ toString "")
Instances For
Parse a manifest file.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Parse a manifest file. Returns none
if the file does not exist.
Errors if the manifest is ill-formatted or the read files for other reasons.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Serialize the manifest to a JSON file.
Equations
- self.save manifestFile = IO.FS.writeFile manifestFile (self.toJson.pretty.push '\n')
Instances For
Equations
Instances For
Deserialize package entries from a (partial) JSON manifest.
Equations
- Lake.Manifest.decodeEntries data = do let obj ← Lake.JsonObject.fromJson? data let __do_lift ← Lake.Manifest.getVersion obj Lake.Manifest.getPackages (Lake.StdVer.ofSemVerCore __do_lift) obj
Instances For
Deserialize manifest package entries from a JSON string.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Deserialize manifest package entries from a JSON file.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Deserialize manifest package entries from a JSON file. Returns an empty array if the file does not exist.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Serialize manifest package entries to a JSON file.
Equations
- One or more equations did not get rendered due to their size.