Skip to content

Commit

Permalink
Update indentation style
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Nov 11, 2024
1 parent 6af96e7 commit 719bc9b
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 183 deletions.
50 changes: 25 additions & 25 deletions src/cli/actions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ case class InitError(initMessage: Message) extends Error(initMessage)
object actions:
object install:
def installInteractive(force: Boolean, noTabCompletions: Boolean)
(using DaemonService[?],
Log[Display],
SystemProperties,
Environment,
WorkingDirectory,
HomeDirectory,
Effectful,
CliFrontEnd,
Terminal,
Stdio)
(using DaemonService[?],
Log[Display],
SystemProperties,
Environment,
WorkingDirectory,
HomeDirectory,
Effectful,
CliFrontEnd,
Terminal,
Stdio)
: Exit raises UserError =

tend:
Expand All @@ -87,14 +87,14 @@ object actions:
case DismissError() => Exit.Fail(1)

def batch(force: Boolean, noTabCompletions: Boolean)
(using DaemonService[?],
FrontEnd,
Log[Display],
SystemProperties,
Environment,
WorkingDirectory,
HomeDirectory,
Effectful)
(using DaemonService[?],
FrontEnd,
Log[Display],
SystemProperties,
Environment,
WorkingDirectory,
HomeDirectory,
Effectful)
: Exit raises UserError =

tend:
Expand Down Expand Up @@ -171,13 +171,13 @@ object actions:

object project:
def publish(projectId: ProjectId, streamId: Optional[StreamId])
(using WorkingDirectory,
Stdio,
Environment,
SystemProperties,
GitCommand,
Log[Display],
Internet)
(using WorkingDirectory,
Stdio,
Environment,
SystemProperties,
GitCommand,
Log[Display],
Internet)
: Exit raises UserError =
import filesystemOptions.doNotCreateNonexistent

Expand Down
4 changes: 2 additions & 2 deletions src/cli/clifrontend.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import java.util.concurrent as juc


def frontEnd[ResultType](lambda: CliFrontEnd ?=> Terminal ?=> ResultType)
(using Cli, Log[Display], Monitor)
(using Cli, Log[Display], Monitor)
: ResultType =
terminal:
val frontEnd = CliFrontEnd()
Expand All @@ -57,7 +57,7 @@ def frontEnd[ResultType](lambda: CliFrontEnd ?=> Terminal ?=> ResultType)
FrontEnd.unregister(frontEnd)

def interactive[ResultType](using frontEnd: CliFrontEnd)
(block: Stdio ?=> Interactivity[TerminalEvent] ?=> ResultType)
(block: Stdio ?=> Interactivity[TerminalEvent] ?=> ResultType)
: ResultType =

block(using frontEnd.terminal.stdio)(using frontEnd.terminal)
Expand Down
158 changes: 79 additions & 79 deletions src/engine/build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ class Builder():
private val tasks: Mutex[scm.HashMap[Hash, Task[Directory]]] = Mutex(scm.HashMap())

def runTask(name: Text, hash: Hash)
(using Monitor,
Environment,
FrontEnd,
SystemProperties,
Installation,
DaemonService[?],
Internet)
(using Monitor,
Environment,
FrontEnd,
SystemProperties,
Installation,
DaemonService[?],
Internet)
: Task[Directory] logs Message =

Log.info(m"Building task for $hash")
Expand All @@ -124,26 +124,26 @@ class Builder():

extension (library: Library)
def phase(workspace: Workspace, target: Target)
(using Installation,
Internet,
Monitor,
WorkingDirectory,
Universe,
GitCommand,
FrontEnd)
(using Installation,
Internet,
Monitor,
WorkingDirectory,
Universe,
GitCommand,
FrontEnd)
: LibraryPhase raises ConcurrencyError raises PathError raises GitError raises
BuildError raises ExecError raises IoError logs Message =
LibraryPhase(installation.build, library, target)

extension (artifact: Artifact)
def phase(workspace: Workspace, target: Target)
(using Installation,
Internet,
Monitor,
WorkingDirectory,
Universe,
GitCommand,
FrontEnd)
(using Installation,
Internet,
Monitor,
WorkingDirectory,
Universe,
GitCommand,
FrontEnd)
: ArtifactPhase raises ConcurrencyError raises PathError raises GitError raises
BuildError raises ExecError raises IoError logs Message =

Expand Down Expand Up @@ -184,7 +184,7 @@ class Builder():

extension (exec: Exec)
def phase(workspace: Workspace, target: Target)
(using Installation, Internet, Universe, Monitor, WorkingDirectory, FrontEnd, GitCommand)
(using Installation, Internet, Universe, Monitor, WorkingDirectory, FrontEnd, GitCommand)
: ExecPhase raises ConcurrencyError raises GitError raises PathError raises ExecError raises
IoError raises BuildError raises StreamError logs Message =

Expand All @@ -201,7 +201,7 @@ class Builder():

extension (module: Module)
def phase(workspace: Workspace, target: Target)
(using Installation, Internet, Universe, Monitor, WorkingDirectory, FrontEnd, GitCommand)
(using Installation, Internet, Universe, Monitor, WorkingDirectory, FrontEnd, GitCommand)
: ModulePhase raises ConcurrencyError raises GitError raises PathError raises ExecError raises
IoError raises BuildError raises StreamError logs Message =

Expand Down Expand Up @@ -248,7 +248,7 @@ class Builder():
unsafely(build / Name(hash.keep(2)) / Name(hash.skip(2)))

def run(name: Text, hash: Hash)
(using FrontEnd, DaemonService[?], Installation, Monitor, SystemProperties, Environment, Internet)
(using FrontEnd, DaemonService[?], Installation, Monitor, SystemProperties, Environment, Internet)
: Directory logs Message raises BuildError

case class ArtifactPhase
Expand All @@ -272,13 +272,13 @@ class Builder():
val binaries: List[Hash] = Nil

def run(name: Text, hash: Hash)
(using FrontEnd,
DaemonService[?],
Installation,
Monitor,
SystemProperties,
Environment,
Internet)
(using FrontEnd,
DaemonService[?],
Installation,
Monitor,
SystemProperties,
Environment,
Internet)
: Directory logs Message raises BuildError =

antecedents.each: (hash, name) =>
Expand Down Expand Up @@ -445,7 +445,7 @@ class Builder():
val binaries: List[Hash] = List(digest)

def run(name: Text, hash: Hash)
(using FrontEnd, DaemonService[?], Installation, Monitor, SystemProperties, Environment, Internet)
(using FrontEnd, DaemonService[?], Installation, Monitor, SystemProperties, Environment, Internet)
: Directory raises BuildError logs Message =

accrue(BuildError()):
Expand Down Expand Up @@ -516,24 +516,24 @@ class Builder():
.within(output.as[Directory])

case class ExecPhase
(build: Path,
target: Target,
exec: Exec,
classpath: List[Hash],
antecedents: Map[Hash, Text],
watches: Set[Path])
(build: Path,
target: Target,
exec: Exec,
classpath: List[Hash],
antecedents: Map[Hash, Text],
watches: Set[Path])
extends Phase:

def digest = (antecedents).digest[Sha2[256]]
def binaries: List[Hash] = Nil
def run(name: Text, hash: Hash)
(using FrontEnd,
DaemonService[?],
Installation,
Monitor,
SystemProperties,
Environment,
Internet)
(using FrontEnd,
DaemonService[?],
Installation,
Monitor,
SystemProperties,
Environment,
Internet)
: Directory logs Message raises BuildError =

val inputs =
Expand Down Expand Up @@ -614,13 +614,13 @@ class Builder():
val binaries: List[Hash] = Nil

def run(name: Text, hash: Hash)
(using FrontEnd,
DaemonService[?],
Installation,
Monitor,
SystemProperties,
Environment,
Internet)
(using FrontEnd,
DaemonService[?],
Installation,
Monitor,
SystemProperties,
Environment,
Internet)
: Directory logs Message raises BuildError =

Log.info(m"Starting to build")
Expand Down Expand Up @@ -765,13 +765,13 @@ class Builder():
def schedule(digest: Hash): Dag[Target] = dag(digest).map(_.target)

def build(target: Target)(using Universe)
(using Monitor,
Clock,
WorkingDirectory,
Internet,
Installation,
GitCommand,
FrontEnd)
(using Monitor,
Clock,
WorkingDirectory,
Internet,
Installation,
GitCommand,
FrontEnd)
: Task[Hash] raises BuildError logs Message = synchronized:
builds.establish(target):
Log.info(m"Building target $target")
Expand Down Expand Up @@ -840,13 +840,13 @@ class Builder():
unsafely(installation.build / Name(hash.keep(2)) / Name(hash.skip(2)))

def run(name: Text, hash: Hash, force: Boolean)
(using DaemonService[?],
Installation,
FrontEnd,
Monitor,
SystemProperties,
Environment,
Internet)
(using DaemonService[?],
Installation,
FrontEnd,
Monitor,
SystemProperties,
Environment,
Internet)
: Directory raises ConcurrencyError raises StreamError raises ZipError raises
IoError raises PathError raises BuildError raises CompileError logs Message =

Expand All @@ -855,12 +855,12 @@ class Builder():

extension (workspace: Workspace)
def locals()
(using Monitor, WorkingDirectory, Internet, Installation, GitCommand)
(using Monitor, WorkingDirectory, Internet, Installation, GitCommand)
: Map[ProjectId, Definition] raises ConcurrencyError raises WorkspaceError logs Message =
Cache.projectsMap(workspace).await()

def universe()
(using Monitor, Clock, WorkingDirectory, Internet, Installation, GitCommand)
(using Monitor, Clock, WorkingDirectory, Internet, Installation, GitCommand)
: Universe raises ConcurrencyError raises VaultError raises WorkspaceError logs Message =
Log.info(m"Constructing universe")

Expand All @@ -882,17 +882,17 @@ extension (workspace: Workspace)
def apply(projectId: ProjectId): Project = workspace.projects(projectId)

def apply(path: WorkPath)
(using Installation,
Internet,
Monitor,
WorkingDirectory,
FrontEnd,
GitCommand,
Tactic[ConcurrencyError],
Tactic[GitError],
Tactic[PathError],
Tactic[ExecError],
Tactic[IoError])
(using Installation,
Internet,
Monitor,
WorkingDirectory,
FrontEnd,
GitCommand,
Tactic[ConcurrencyError],
Tactic[GitError],
Tactic[PathError],
Tactic[ExecError],
Tactic[IoError])
: Path logs Message =

workspace.mounts.keys.where(_.precedes(path)).lay(workspace.directory.path + path.link): mount =>
Expand Down
Loading

0 comments on commit 719bc9b

Please sign in to comment.