A Lake workspace -- the top-level package directory.
- root : Package
The root package of the workspace.
- lakeEnv : Env
The detected
Lake.Envof the workspace. - lakeCache : Cache
The Lake cache.
The CLI arguments Lake was run with. Used by
lake updateto perform a restart of Lake on a toolchain update. A value ofnonemeans that Lake is not restartable via the CLI.The packages within the workspace (in
requiredeclaration order with the root coming first).Name-package map of packages within the workspace.
- facetConfigs : DNameMap FacetConfig
Configuration map of facets defined in the workspace.
Instances For
Equations
Equations
The path to the workspace's directory (i.e., the directory of the root package).
Instances For
The workspace's configuration.
Equations
- self.config = self.root.config.toWorkspaceConfig
Instances For
The path to the workspace' Lake directory relative to dir.
Equations
- self.relLakeDir = self.root.relLakeDir
Instances For
The full path to the workspace's Lake directory (e.g., .lake).
Instances For
Whether the Lake artifact cache should be enabled by default for packages in the workspace.
Equations
Instances For
Whether the Lake artifact cache should is enabled for workspace's root package.
Equations
Instances For
The path to the workspace's remote packages directory relative to dir.
Equations
- self.relPkgsDir = self.root.relPkgsDir
Instances For
Arguments to pass to lean for files outside a library (e.g., via lake lean).
Equations
- self.leanArgs = self.root.moreLeanArgs
Instances For
Options to pass to lean for files outside a library (e.g., via lake lean).
Equations
- self.leanOptions = self.root.leanOptions
Instances For
Options to pass to the Lean server when editing Lean files outside a library.
Equations
- self.serverOptions = self.root.moreServerOptions
Instances For
The workspace's Lake manifest.
Equations
- self.manifestFile = self.root.manifestFile
Instances For
The path to the workspace file used to configure automatic package overloads.
Instances For
Add a package to the workspace.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns the unique package in the workspace (if any) that is identified by keyName.
Equations
- Lake.Workspace.findPackageByKey? keyName self = Std.DTreeMap.get? self.packageMap keyName
Instances For
Returns the first package in the workspace (if any) that has been assigned the name.
This can be used to find the package corresponding to a user-provided name. If the package's unique
identifier is already available, use findPackageByKey?
instead.
Equations
- Lake.Workspace.findPackageByName? name self = Array.find? (fun (x : Lake.Package) => x.baseName == name) self.packages
Instances For
Deprecated. If attempting to find the package corresponding to a user-provided name,
use findPackageByName?. Otherwise, if the package's
unique identifier is available, use findPackageByKey?.
Equations
- Lake.Workspace.findPackage? name self = Lake.Workspace.findPackageByKey? name self
Instances For
Try to find a script in the workspace with the given name.
Equations
- Lake.Workspace.findScript? script self = Array.findSome? (fun (x : Lake.Package) => x.scripts.find? script) self.packages
Instances For
Check if the module is local to any package in the workspace.
Equations
- Lake.Workspace.isLocalModule mod self = self.packages.any fun (pkg : Lake.Package) => Lake.Package.isLocalModule mod pkg
Instances For
Check if the module is buildable by any package in the workspace.
Equations
- Lake.Workspace.isBuildableModule mod self = self.packages.any fun (pkg : Lake.Package) => Lake.Package.isBuildableModule mod pkg
Instances For
Locate the named, buildable, importable, local module in the workspace.
Equations
- Lake.Workspace.findModule? mod self = Array.findSome? (fun (x : Lake.Package) => Lake.Package.findModule? mod x) self.packages
Instances For
For each package in the workspace, locate the named, buildable, importable, local module.
Equations
- Lake.Workspace.findModules mod self = Array.filterMap (fun (x : Lake.Package) => Lake.Package.findModule? mod x) self.packages
Instances For
Locate the named, buildable, but not necessarily importable, module in the workspace.
Equations
- Lake.Workspace.findTargetModule? mod self = Array.findSome? (fun (x : Lake.Package) => Lake.Package.findTargetModule? mod x) self.packages
Instances For
Returns the buildable module in the workspace whose source file is path.
Equations
- Lake.Workspace.findModuleBySrc? path self = Array.findSome? (fun (x : Lake.Package) => Lake.Package.findModuleBySrc? path x) self.packages
Instances For
Try to find a Lean library in the workspace with the given name.
Equations
- Lake.Workspace.findLeanLib? name self = Array.findSome? (fun (pkg : Lake.Package) => Lake.Package.findLeanLib? name pkg) self.packages
Instances For
Try to find a Lean executable in the workspace with the given name.
Equations
- Lake.Workspace.findLeanExe? name self = Array.findSome? (fun (pkg : Lake.Package) => Lake.Package.findLeanExe? name pkg) self.packages
Instances For
Try to find an external library in the workspace with the given name.
Equations
- Lake.Workspace.findExternLib? name self = Array.findSome? (fun (pkg : Lake.Package) => Lake.Package.findExternLib? name pkg) self.packages
Instances For
Try to find a target configuration in the workspace with the given name.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Try to find a target declaration in the workspace with the given name.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Add a facet to the workspace.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Try to find a facet configuration in the workspace with the given name.
Equations
- Lake.Workspace.findFacetConfig? name self = Std.DTreeMap.get? self.facetConfigs name
Instances For
Add a module facet to the workspace.
Equations
- Lake.Workspace.addModuleFacetConfig cfg self = Lake.Workspace.addFacetConfig cfg.toFacetConfig self
Instances For
Try to find a module facet configuration in the workspace with the given name.
Equations
- Lake.Workspace.findModuleFacetConfig? name self = (Lake.Workspace.findFacetConfig? name self).bind fun (x : Lake.FacetConfig name) => Lake.FacetConfig.toKind? Lake.Module.facetKind x
Instances For
Add a package facet to the workspace.
Equations
- Lake.Workspace.addPackageFacetConfig cfg self = Lake.Workspace.addFacetConfig cfg.toFacetConfig self
Instances For
Try to find a package facet configuration in the workspace with the given name.
Equations
- Lake.Workspace.findPackageFacetConfig? name self = (Lake.Workspace.findFacetConfig? name self).bind fun (x : Lake.FacetConfig name) => Lake.FacetConfig.toKind? Lake.Package.facetKind x
Instances For
Add a library facet to the workspace.
Equations
- Lake.Workspace.addLibraryFacetConfig cfg self = Lake.Workspace.addFacetConfig cfg.toFacetConfig self
Instances For
Try to find a library facet configuration in the workspace with the given name.
Equations
- Lake.Workspace.findLibraryFacetConfig? name self = (Lake.Workspace.findFacetConfig? name self).bind fun (x : Lake.FacetConfig name) => Lake.FacetConfig.toKind? Lake.LeanLib.facetKind x
Instances For
The workspace's binary directories (which are added to PATH).
Equations
- self.binPath = Array.foldl (fun (dirs : System.SearchPath) (pkg : Lake.Package) => pkg.binDir :: dirs) [] self.packages
Instances For
The workspace's Lean library directories (which are added to LEAN_PATH).
Equations
- self.leanPath = Array.foldl (fun (dirs : System.SearchPath) (pkg : Lake.Package) => pkg.leanLibDir :: dirs) [] self.packages
Instances For
The workspace's source directories (which are added to LEAN_SRC_PATH).
Equations
- One or more equations did not get rendered due to their size.
Instances For
The augmented PATH of the workspace environment.
This prepends the detected self.lakeEnv.path of the system environment with
the workspace's binPath. On Windows, it also adds the workspace's sharedLibPath.
Equations
Instances For
The detected LEAN_PATH of the environment augmented with
the workspace's leanPath and Lake's libDir.
Instances For
The detected LEAN_SRC_PATH of the environment augmented with
the workspace's leanSrcPath and Lake's srcDir.
Equations
- self.augmentedLeanSrcPath = self.leanSrcPath ++ self.lakeEnv.leanSrcPath
Instances For
The detected environment augmented with Lake's and the workspace's configuration.
These are the settings use by lake env / Lake.env
to run executables.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Remove all packages' build outputs (i.e., delete their build directories).
Equations
- self.clean = Array.forM (fun (pkg : Lake.Package) => pkg.clean) self.packages