Documentation

Lake.Build.Job.Basic

Job Primitives #

This module contains the basic definitions of a Lake Job. In particular, it defines OpaqueJob, which is needed for BuildContext. More complex utilities are defined in Lake.Build.Job.Monad, which depends on BuildContext.

JobAction #

inductive Lake.JobAction :

Information on what this job did.

  • unknown : JobAction

    No information about this job's action is available.

  • replay : JobAction

    Tried to replay a cached build action (set by buildFileUnlessUpToDate)

  • fetch : JobAction

    Tried to fetch a build from a store (can be set by buildUnlessUpToDate?)

  • build : JobAction

    Tried to perform a build action (set by buildUnlessUpToDate?)

Instances For
    Equations
    Instances For
      Equations
      Instances For

        JobState #

        structure Lake.JobState :

        Mutable state of a Lake job.

        • log : Log

          The job's log.

        • action : JobAction

          Tracks whether this job performed any significant build action.

        • trace : BuildTrace

          Current trace of a build job.

        Instances For
          Equations
          Equations
          Instances For
            @[inline]
            Equations
            Instances For
              @[inline]
              Equations
              Instances For

                JobTask #

                @[reducible, inline]
                abbrev Lake.JobResult (α : Type u_1) :
                Type u_1

                The result of a Lake job.

                Equations
                Instances For
                  def Lake.JobResult.prependLog {α : Type u_1} (log : Log) (self : JobResult α) :

                  Add log entries to the beginning of the job's log.

                  Equations
                  Instances For
                    @[reducible, inline]
                    abbrev Lake.JobTask (α : Type u_1) :
                    Type u_1

                    The Task of a Lake job.

                    Equations
                    Instances For

                      Job #

                      structure Lake.Job (α : Type u) :

                      A Lake job.

                      • task : JobTask α

                        The Lean Task object for the job.

                      • caption : String

                        A caption for the job in Lake's build monitor. Will be formatted like ✔ [3/5] Ran <caption>.

                      • optional : Bool

                        Whether this job failing should cause the build to fail.

                      Instances For
                        instance Lake.instInhabitedJob {a✝ : Type u_1} :
                        Inhabited (Job a✝)
                        Equations
                        @[inline]
                        def Lake.Job.ofTask {α : Type u_1} (task : JobTask α) (caption : String := "") :
                        Job α
                        Equations
                        Instances For
                          @[inline]
                          def Lake.Job.error {α : Type u_1} (log : Log := ) (caption : String := "") :
                          Job α
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            @[inline]
                            def Lake.Job.pure {α : Type u_1} (a : α) (log : Log := ) (caption : String := "") :
                            Job α
                            Equations
                            Instances For
                              Equations
                              @[inline]
                              def Lake.Job.nop (log : Log := ) (caption : String := "") :
                              Equations
                              Instances For
                                @[inline]
                                Equations
                                Instances For
                                  @[inline]
                                  def Lake.Job.setCaption {α : Type u_1} (caption : String) (job : Job α) :
                                  Job α

                                  Sets the job's caption.

                                  Equations
                                  Instances For
                                    @[inline]
                                    def Lake.Job.setCaption? {α : Type u_1} (caption : String) (job : Job α) :
                                    Job α

                                    Sets the job's caption if the job's current caption is empty.

                                    Equations
                                    Instances For
                                      @[inline]
                                      def Lake.Job.mapResult {α : Type u_1} {β : Type u_2} (f : JobResult αJobResult β) (self : Job α) (prio : Task.Priority := Task.Priority.default) (sync : Bool := false) :
                                      Job β
                                      Equations
                                      Instances For
                                        @[inline]
                                        def Lake.Job.mapOk {α : Type u_1} {β : Type u_2} (f : αJobStateJobResult β) (self : Job α) (prio : Task.Priority := Task.Priority.default) (sync : Bool := false) :
                                        Job β
                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          @[inline]
                                          def Lake.Job.map {α : Type u_1} {β : Type u_2} (f : αβ) (self : Job α) (prio : Task.Priority := Task.Priority.default) (sync : Bool := false) :
                                          Job β
                                          Equations
                                          Instances For
                                            Equations
                                            • One or more equations did not get rendered due to their size.

                                            OpaqueJob #

                                            @[reducible, inline]

                                            A Lake job with an opaque value in Type.

                                            Equations
                                            Instances For
                                              @[implemented_by _private.Lake.Build.Job.Basic.0.Lake.Job.toOpaqueImpl]
                                              def Lake.Job.toOpaque {α : Type u_1} (job : Job α) :

                                              Forget the value of a job. Implemented as a no-op cast.

                                              Equations
                                              Instances For