Documentation

Lake.Config.Package

structure Lake.Package :

A Lake package -- its location plus its configuration.

  • wsIdx : Nat

    The index of the package in the workspace. Used to disambiguate packages with the same name.

  • baseName : Lean.Name

    The assigned name of the package.

  • keyName : Lean.Name

    The package identifier used in target keys and configuration types.

  • origName : Lean.Name

    The name specified by the package.

  • The absolute path to the package's directory.

  • The path to the package's directory relative to the workspace.

  • config : PackageConfig self.keyName self.origName

    The package's user-defined configuration.

  • configFile : System.FilePath

    The absolute path to the package's configuration file.

  • relConfigFile : System.FilePath

    The path to the package's configuration file (relative to dir).

  • relManifestFile : System.FilePath

    The path to the package's JSON manifest of remote dependencies (relative to dir).

  • scope : String

    The package's scope (e.g., in Reservoir).

  • remoteUrl : String

    The URL to this package's Git remote.

  • depConfigs : Array Dependency

    Dependency configurations for the package.

  • targetDecls : Array (PConfigDecl self.keyName)

    Target configurations in the order declared by the package.

  • targetDeclMap : DNameMap (NConfigDecl self.keyName)

    Name-declaration map of target configurations in the package.

  • defaultTargets : Array Lean.Name

    The names of the package's targets to build by default (i.e., on a bare lake build of the package).

  • Scripts for the package.

  • defaultScripts : Array Script

    The names of the package's scripts run by default (i.e., on a bare lake run of the package).

  • postUpdateHooks : Array (OpaquePostUpdateHook self.keyName)

    Post-lake update hooks for the package.

  • buildArchive : String

    The package's buildArchive/buildArchive? configuration.

  • testDriver : String

    The driver used for lake test when this package is the workspace root.

  • lintDriver : String

    The driver used for lake lint when this package is the workspace root.

  • inputsRef? : Option CacheRef

    Input-to-output(s) map for hashes of package artifacts. If none, the artifact cache is disabled for the package.

  • outputsRef? : Option CacheRef

    Input-to-output(s) map for hashes of package artifacts. If none, the artifact cache is disabled for the package.

Instances For
    @[implicit_reducible]
    @[implicit_reducible]
    @[implicit_reducible]
    @[inline]

    Pretty prints the package's name. Used when outputting package names.

    Instances For
      @[implicit_reducible]
      @[implicit_reducible]
      @[reducible, inline, deprecated "Use `baseName`, `keyName`, or `prettyName` instead" (since := "2025-12-03")]
      Instances For
        @[inline]

        The (unscoped) name of the package as it appears in Reservoir URLs (before URI-encoding).

        Instances For
          @[reducible, inline]
          Instances For
            @[inline]
            Instances For
              @[reducible, inline]
              Instances For
                @[inline]
                Instances For
                  @[deprecated Lake.NPackage.keyName_eq (since := "2025-12-03")]
                  theorem Lake.NPackage.name_eq {n : Lean.Name} {self : NPackage n} :
                  self.keyName = n
                  @[implicit_reducible]
                  @[implicit_reducible]
                  @[reducible, inline]
                  abbrev Lake.PostUpdateFn (pkgName : Lean.Name) :

                  The type of a post-update hooks monad. IO equipped with logging ability and information about the Lake configuration.

                  Instances For
                    structure Lake.PostUpdateHook (pkgName : Lean.Name) :
                    Instances For
                      @[implicit_reducible]
                      @[implicit_reducible]
                      @[implicit_reducible]
                      @[implemented_by _private.Lake.Config.Package.0.Lake.OpaquePostUpdateHook.unsafeMk]
                      @[implemented_by _private.Lake.Config.Package.0.Lake.OpaquePostUpdateHook.unsafeGet]
                      Instances For
                        @[inline]

                        Returns whether this package is root package of the workspace.

                        Instances For
                          @[inline]

                          For internal use. Whether this package is Lean itself.

                          Instances For

                            The identifier passed to Lean to disambiguate the package's native symbols.

                            Instances For
                              @[inline]

                              The package version.

                              Instances For
                                @[inline]

                                The package's versionTags configuration.

                                Instances For
                                  @[inline]

                                  The package's description configuration.

                                  Instances For
                                    @[inline]

                                    The package's keywords configuration.

                                    Instances For
                                      @[inline]

                                      The package's homepage configuration.

                                      Instances For
                                        @[inline]

                                        The package's reservoir configuration.

                                        Instances For
                                          @[inline]

                                          The package's license configuration.

                                          Instances For
                                            @[inline]

                                            The package's licenseFiles configuration.

                                            Instances For
                                              @[inline]

                                              The package's dir joined with each of its relLicenseFiles.

                                              Instances For
                                                @[inline]

                                                The package's readmeFile configuration.

                                                Instances For
                                                  @[inline]

                                                  The package's dir joined with its relReadmeFile.

                                                  Instances For
                                                    @[inline]

                                                    The path to the package's Lake directory relative to dir (e.g., .lake).

                                                    Instances For
                                                      @[inline]

                                                      The full path to the package's Lake directory (i.e, dir joined with relLakeDir).

                                                      Instances For
                                                        @[inline]

                                                        The path for storing the package's remote dependencies relative to dir (i.e., packagesDir).

                                                        Instances For
                                                          @[inline]

                                                          The package's dir joined with its relPkgsDir.

                                                          Instances For
                                                            @[inline]

                                                            The path to the package's JSON manifest of remote dependencies.

                                                            Instances For
                                                              @[inline]

                                                              The package's dir joined with its buildDir configuration.

                                                              Instances For
                                                                @[inline]

                                                                The package's testDriverArgs configuration.

                                                                Instances For
                                                                  @[inline]

                                                                  The package's lintDriverArgs configuration.

                                                                  Instances For
                                                                    @[inline]

                                                                    The package's extraDepTargets configuration.

                                                                    Instances For
                                                                      @[inline]

                                                                      The package's platformIndependent configuration.

                                                                      Instances For
                                                                        @[inline]

                                                                        Whether the package's has been configured with platformIndependent = true.

                                                                        Instances For
                                                                          @[inline]

                                                                          The package's releaseRepo/releaseRepo? configuration.

                                                                          Instances For
                                                                            @[inline]

                                                                            The packages remoteUrl as an Option (none if empty).

                                                                            Instances For
                                                                              @[inline]

                                                                              The package's lakeDir joined with its buildArchive.

                                                                              Instances For
                                                                                @[inline]

                                                                                The path where Lake stores the package's barrel (downloaded from Reservoir).

                                                                                Instances For
                                                                                  @[inline]

                                                                                  The package's preferReleaseBuild configuration.

                                                                                  Instances For
                                                                                    @[inline]

                                                                                    The package's precompileModules configuration.

                                                                                    Instances For
                                                                                      @[inline]

                                                                                      The package's moreGlobalServerArgs configuration.

                                                                                      Instances For
                                                                                        @[inline]

                                                                                        The package's moreServerOptions configuration appended to its leanOptions configuration.

                                                                                        Instances For
                                                                                          @[inline]

                                                                                          The package's buildType configuration.

                                                                                          Instances For
                                                                                            @[inline]

                                                                                            The package's backend configuration.

                                                                                            Instances For
                                                                                              @[inline]

                                                                                              The package's allowImportAll configuration.

                                                                                              Instances For
                                                                                                @[inline]

                                                                                                The package's dynlibs configuration.

                                                                                                Instances For
                                                                                                  @[inline]

                                                                                                  The package's plugins configuration.

                                                                                                  Instances For
                                                                                                    @[inline]

                                                                                                    The package's leanOptions configuration.

                                                                                                    Instances For
                                                                                                      @[inline]

                                                                                                      The package's moreLeanArgs configuration.

                                                                                                      Instances For
                                                                                                        @[inline]

                                                                                                        The package's weakLeanArgs configuration.

                                                                                                        Instances For
                                                                                                          @[inline]

                                                                                                          The package's moreLeancArgs configuration.

                                                                                                          Instances For
                                                                                                            @[inline]

                                                                                                            The package's weakLeancArgs configuration.

                                                                                                            Instances For
                                                                                                              @[inline]

                                                                                                              The package's moreLinkObjs configuration.

                                                                                                              Instances For
                                                                                                                @[inline]

                                                                                                                The package's moreLinkLibs configuration.

                                                                                                                Instances For
                                                                                                                  @[inline]

                                                                                                                  The package's moreLinkArgs configuration.

                                                                                                                  Instances For
                                                                                                                    @[inline]

                                                                                                                    The package's weakLinkArgs configuration.

                                                                                                                    Instances For
                                                                                                                      @[inline]

                                                                                                                      The package's dir joined with its srcDir configuration.

                                                                                                                      Instances For
                                                                                                                        @[inline]

                                                                                                                        The package's root directory for lean (i.e., srcDir).

                                                                                                                        Instances For
                                                                                                                          @[inline]

                                                                                                                          The package's buildDir joined with its leanLibDir configuration.

                                                                                                                          Instances For
                                                                                                                            @[inline]

                                                                                                                            Where static libraries for the package are located. The package's buildDir joined with its nativeLibDir configuration.

                                                                                                                            Instances For
                                                                                                                              @[inline]

                                                                                                                              Where shared libraries for the package are located. The package's buildDir joined with its nativeLibDir configuration.

                                                                                                                              Instances For
                                                                                                                                @[inline]

                                                                                                                                The package's buildDir joined with its binDir configuration.

                                                                                                                                Instances For
                                                                                                                                  @[inline]

                                                                                                                                  The package's buildDir joined with its irDir configuration.

                                                                                                                                  Instances For
                                                                                                                                    @[inline]

                                                                                                                                    The package's libPrefixOnWindows configuration.

                                                                                                                                    Instances For
                                                                                                                                      @[inline]

                                                                                                                                      The package's enableArtifactCache? configuration.

                                                                                                                                      Instances For
                                                                                                                                        @[inline]

                                                                                                                                        The package's restoreAllArtifacts configuration.

                                                                                                                                        Instances For

                                                                                                                                          The directory within the Lake cache were package-scoped files are stored.

                                                                                                                                          Instances For

                                                                                                                                            Try to find a target configuration in the package with the given name.

                                                                                                                                            Instances For

                                                                                                                                              Whether the given module is considered local to the package.

                                                                                                                                              Instances For

                                                                                                                                                Whether the given module is in the package (i.e., can build it).

                                                                                                                                                Instances For

                                                                                                                                                  Remove the package's build outputs (i.e., delete its build directory).

                                                                                                                                                  Instances For