File: .lake/packages/lean4/src/lean/lake/Lake/Load/Manifest.lean

full_name: Lake.Manifest.version
code: /--
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 version
- `2`: Adds optional `inputRev` package entry field
- `3`: Changes entry to inductive (with `path`/`git`)
- `4`: Adds required `packagesDir` manifest field
- `5`: Adds optional `inherited` package entry field (and removed `opts`)
- `6`: Adds optional package root `name` manifest field
- `7`: `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 optional `scope` package entry field
-/
@[inline] def Manifest.version : LeanVer 
goal: Lake.LeanVer

full_name: Lake.instInhabitedPackageEntryV6
code: /-- Manifest version `0.6.0` package entry. For backwards compatibility. -/
inductive PackageEntryV6
| path (name : Name) (opts : NameMap String) (inherited : Bool) (dir : FilePath)
| git (name : Name) (opts : NameMap String) (inherited : Bool) (url : String) (rev : String)
    (inputRev? : Option String) (subDir? : Option FilePath)
deriving FromJson, ToJson, Inhabited
goal: Inhabited Lake.PackageEntryV6

full_name: Lake.PackageEntryV6.git
code: /-- Manifest version `0.6.0` package entry. For backwards compatibility. -/
inductive PackageEntryV6
| path (name : Name) (opts : NameMap String) (inherited : Bool) (dir : FilePath)
| git (name : Name) (opts : NameMap String) (inherited : Bool) (url : String) (rev : String)
    (inputRev? : Option String) (subDir? : Option FilePath)
deriving FromJson, ToJson, Inhabited
goal: Lake.PackageEntryV6

full_name: Lake.PackageEntryV6.path
code: /-- Manifest version `0.6.0` package entry. For backwards compatibility. -/
inductive PackageEntryV6
| path (name : Name) (opts : NameMap String) (inherited : Bool) (dir : FilePath)
| git (name : Name) (opts : NameMap String) (inherited : Bool) (url : String) (rev : String)
    (inputRev? : Option String) (subDir? : Option FilePath)
deriving FromJson, ToJson, Inhabited
goal: Lake.PackageEntryV6

full_name: Lake.PackageEntryV6
code: /-- Manifest version `0.6.0` package entry. For backwards compatibility. -/
inductive PackageEntryV6
| path (name : Name) (opts : NameMap String) (inherited : Bool) (dir : FilePath)
| git (name : Name) (opts : NameMap String) (inherited : Bool) (url : String) (rev : String)
    (inputRev? : Option String) (subDir? : Option FilePath)
deriving FromJson, ToJson, Inhabited
goal: Type

full_name: Lake.instFromJsonPackageEntryV6
code: FromJson
goal: Lean.FromJson Lake.PackageEntryV6

full_name: Lake.instToJsonPackageEntryV6
code: ToJson
goal: Lean.ToJson Lake.PackageEntryV6

full_name: Lake.PackageEntrySrc.path
code: /--
The package source for an entry in the manifest.
Describes exactly how Lake should materialize the package.
-/
inductive PackageEntrySrc
  /--
  A local filesystem package. `dir` is relative to the package directory
  of the package containing the manifest.
  -/
  | path
    (dir : FilePath)
  /-- A remote Git package. -/
  | git
    (url : String)
    (rev : String)
    (inputRev? : Option String)
    (subDir? : Option FilePath)
  deriving Inhabited
goal: Lake.PackageEntrySrc

full_name: Lake.PackageEntrySrc
code: /--
The package source for an entry in the manifest.
Describes exactly how Lake should materialize the package.
-/
inductive PackageEntrySrc
  /--
  A local filesystem package. `dir` is relative to the package directory
  of the package containing the manifest.
  -/
  | path
    (dir : FilePath)
  /-- A remote Git package. -/
  | git
    (url : String)
    (rev : String)
    (inputRev? : Option String)
    (subDir? : Option FilePath)
  deriving Inhabited
goal: Type

full_name: Lake.instInhabitedPackageEntrySrc
code: /--
The package source for an entry in the manifest.
Describes exactly how Lake should materialize the package.
-/
inductive PackageEntrySrc
  /--
  A local filesystem package. `dir` is relative to the package directory
  of the package containing the manifest.
  -/
  | path
    (dir : FilePath)
  /-- A remote Git package. -/
  | git
    (url : String)
    (rev : String)
    (inputRev? : Option String)
    (subDir? : Option FilePath)
  deriving Inhabited
goal: Inhabited Lake.PackageEntrySrc

full_name: Lake.PackageEntrySrc.git
code: /--
The package source for an entry in the manifest.
Describes exactly how Lake should materialize the package.
-/
inductive PackageEntrySrc
  /--
  A local filesystem package. `dir` is relative to the package directory
  of the package containing the manifest.
  -/
  | path
    (dir : FilePath)
  /-- A remote Git package. -/
  | git
    (url : String)
    (rev : String)
    (inputRev? : Option String)
    (subDir? : Option FilePath)
  deriving Inhabited
goal: Lake.PackageEntrySrc

full_name: Lake.PackageEntry.name
code: /-- An entry for a package stored in the manifest. -/
structure PackageEntry where
  name : Name
  scope : String := ""
  inherited : Bool
  configFile : FilePath := defaultConfigFile
  manifestFile? : Option FilePath := none
  src : PackageEntrySrc
  deriving Inhabited
goal: Lake.Name

full_name: Lake.PackageEntry.manifestFile?
code: /-- An entry for a package stored in the manifest. -/
structure PackageEntry where
  name : Name
  scope : String := ""
  inherited : Bool
  configFile : FilePath := defaultConfigFile
  manifestFile? : Option FilePath := none
  src : PackageEntrySrc
  deriving Inhabited
goal: Option Lake.FilePath

full_name: Lake.PackageEntry.inherited
code: /-- An entry for a package stored in the manifest. -/
structure PackageEntry where
  name : Name
  scope : String := ""
  inherited : Bool
  configFile : FilePath := defaultConfigFile
  manifestFile? : Option FilePath := none
  src : PackageEntrySrc
  deriving Inhabited
goal: Bool

full_name: Lake.PackageEntry
code: /-- An entry for a package stored in the manifest. -/
structure PackageEntry where
  name : Name
  scope : String := ""
  inherited : Bool
  configFile : FilePath := defaultConfigFile
  manifestFile? : Option FilePath := none
  src : PackageEntrySrc
  deriving Inhabited
goal: Type

full_name: Lake.PackageEntry.configFile
code: /-- An entry for a package stored in the manifest. -/
structure PackageEntry where
  name : Name
  scope : String := ""
  inherited : Bool
  configFile : FilePath := defaultConfigFile
  manifestFile? : Option FilePath := none
  src : PackageEntrySrc
  deriving Inhabited
goal: Lake.FilePath

full_name: Lake.PackageEntry.src
code: /-- An entry for a package stored in the manifest. -/
structure PackageEntry where
  name : Name
  scope : String := ""
  inherited : Bool
  configFile : FilePath := defaultConfigFile
  manifestFile? : Option FilePath := none
  src : PackageEntrySrc
  deriving Inhabited
goal: Lake.PackageEntrySrc

full_name: Lake.PackageEntry.scope
code: /-- An entry for a package stored in the manifest. -/
structure PackageEntry where
  name : Name
  scope : String := ""
  inherited : Bool
  configFile : FilePath := defaultConfigFile
  manifestFile? : Option FilePath := none
  src : PackageEntrySrc
  deriving Inhabited
goal: String

full_name: Lake.instInhabitedPackageEntry
code: /-- An entry for a package stored in the manifest. -/
structure PackageEntry where
  name : Name
  scope : String := ""
  inherited : Bool
  configFile : FilePath := defaultConfigFile
  manifestFile? : Option FilePath := none
  src : PackageEntrySrc
  deriving Inhabited
goal: Inhabited Lake.PackageEntry

full_name: Lake.PackageEntry.toJson
code: protected def toJson (entry : PackageEntry) : Json 
goal: Lean.Json

full_name: Lake.PackageEntry.instToJson
code: instance : ToJson PackageEntry 
goal: Lean.ToJson Lake.PackageEntry

full_name: Lake.PackageEntry.fromJson?
code: protected def fromJson? (json : Json) : Except String PackageEntry 
goal: Except String Lake.PackageEntry

full_name: Lake.PackageEntry.instFromJson
code: instance : FromJson PackageEntry 
goal: Lean.FromJson Lake.PackageEntry

full_name: Lake.PackageEntry.setInherited
code: @[inline] def setInherited (entry : PackageEntry) : PackageEntry 
goal: Lake.PackageEntry

full_name: Lake.PackageEntry.setConfigFile
code: @[inline] def setConfigFile (path : FilePath) (entry : PackageEntry) : PackageEntry 
goal: Lake.PackageEntry

full_name: Lake.PackageEntry.setManifestFile
code: @[inline] def setManifestFile (path? : Option FilePath) (entry : PackageEntry) : PackageEntry 
goal: Lake.PackageEntry

full_name: Lake.PackageEntry.inDirectory
code: @[inline] def inDirectory (pkgDir : FilePath) (entry : PackageEntry) : PackageEntry 
goal: Lake.PackageEntry

full_name: Lake.PackageEntry.ofV6
code: def ofV6 : PackageEntryV6 → PackageEntry

goal: Lake.PackageEntryV6 → Lake.PackageEntry

full_name: Lake.Manifest.lakeDir
code: /-- Manifest data structure that is serialized to the file. -/
structure Manifest where
  name : Name
  lakeDir : FilePath
  packagesDir? : Option FilePath := none
  packages : Array PackageEntry := #[]
goal: Lake.FilePath

full_name: Lake.Manifest.packagesDir?
code: /-- Manifest data structure that is serialized to the file. -/
structure Manifest where
  name : Name
  lakeDir : FilePath
  packagesDir? : Option FilePath := none
  packages : Array PackageEntry := #[]
goal: Option Lake.FilePath

full_name: Lake.Manifest
code: /-- Manifest data structure that is serialized to the file. -/
structure Manifest where
  name : Name
  lakeDir : FilePath
  packagesDir? : Option FilePath := none
  packages : Array PackageEntry := #[]
goal: Type

full_name: Lake.Manifest.name
code: /-- Manifest data structure that is serialized to the file. -/
structure Manifest where
  name : Name
  lakeDir : FilePath
  packagesDir? : Option FilePath := none
  packages : Array PackageEntry := #[]
goal: Lake.Name

full_name: Lake.Manifest.packages
code: /-- Manifest data structure that is serialized to the file. -/
structure Manifest where
  name : Name
  lakeDir : FilePath
  packagesDir? : Option FilePath := none
  packages : Array PackageEntry := #[]
goal: Array Lake.PackageEntry

full_name: Lake.Manifest.addPackage
code: /-- Add a package entry to the end of a manifest. -/
def addPackage (entry : PackageEntry) (self : Manifest) : Manifest 
goal: Lake.Manifest

full_name: Lake.Manifest.toJson
code: protected def toJson (self : Manifest) : Json 
goal: Lean.Json

full_name: Lake.Manifest.instToJson
code: instance : ToJson Manifest 
goal: Lean.ToJson Lake.Manifest

full_name: Lake.Manifest.fromJson?
code: protected def fromJson? (json : Json) : Except String Manifest 
goal: Except String Lake.Manifest

full_name: Lake.Manifest.instFromJson
code: instance : FromJson Manifest 
goal: Lean.FromJson Lake.Manifest

full_name: Lake.Manifest.parse
code: /-- Parse a `Manifest` from a string. -/
def parse (s : String) : Except String Manifest 
goal: Except String Lake.Manifest

full_name: Lake.Manifest.load
code: /-- Parse a manifest file. -/
def load (file : FilePath) : IO Manifest 
goal: IO Lake.Manifest

full_name: Lake.Manifest.load?
code: /--
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.
-/
def load? (file : FilePath) : IO (Option Manifest) 
goal: IO (Option Lake.Manifest)

full_name: Lake.Manifest.saveToFile
code: /-- Save the manifest as JSON to a file. -/
def saveToFile (self : Manifest) (manifestFile : FilePath) : IO PUnit 
goal: IO PUnit