Skip to content

Commit

Permalink
Fixed first round of errors
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Nov 22, 2023
1 parent 507905a commit 509928f
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 77 deletions.
29 changes: 15 additions & 14 deletions fury
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
target fury/model

repo propensive/xylophone 0000000000000000000000000000000000000000
repo propensive/probably 0000000000000000000000000000000000000000
repo propensive/galilei 0000000000000000000000000000000000000000
repo propensive/jacinta 0000000000000000000000000000000000000000
repo propensive/cellulose 0000000000000000000000000000000000000000
repo propensive/aviation 0000000000000000000000000000000000000000
repo propensive/imperial 0000000000000000000000000000000000000000
repo propensive/gastronomy 0000000000000000000000000000000000000000
repo propensive/punctuation 0000000000000000000000000000000000000000
repo propensive/scintillate 0000000000000000000000000000000000000000
repo propensive/nonagenarian 0000000000000000000000000000000000000000
repo propensive/exoskeleton 0000000000000000000000000000000000000000
repo propensive/acyclicity 0000000000000000000000000000000000000000
repo propensive/xylophone 0000000000000000000000000000000000000000
repo propensive/probably 0000000000000000000000000000000000000000
repo propensive/galilei 0000000000000000000000000000000000000000
repo propensive/jacinta 0000000000000000000000000000000000000000
repo propensive/cellulose 0000000000000000000000000000000000000000
repo propensive/aviation 0000000000000000000000000000000000000000
repo propensive/imperial 0000000000000000000000000000000000000000
repo propensive/gastronomy 0000000000000000000000000000000000000000
repo propensive/punctuation 0000000000000000000000000000000000000000
repo propensive/scintillate 0000000000000000000000000000000000000000
repo propensive/nonagenarian 0000000000000000000000000000000000000000
repo propensive/exoskeleton 0000000000000000000000000000000000000000
repo propensive/spectral 0000000000000000000000000000000000000000
repo propensive/acyclicity 0000000000000000000000000000000000000000

project fury
module model
include xylophone/core acyclicity/core galilei/core telekinesis/client jacinta/core aviation/core escritoire/core cellulose/core punctuation/core imperial/core gastronomy/core acyclicity/core nettlesome/url nonagenarian/core surveillance/core exoskeleton/core
include xylophone/core acyclicity/core galilei/core telekinesis/client aviation/core escritoire/core cellulose/core punctuation/core imperial/core gastronomy/core acyclicity/core nettlesome/url nonagenarian/core surveillance/core exoskeleton/core exoskeleton/completions spectral/core
sources src/model
main fury.Main

Expand Down
6 changes: 3 additions & 3 deletions src/model/build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ case class Workspace(directory: Directory, buildDoc: CodlDoc, build: Build, loca
Raises[DateError], Raises[UrlError])
: Directory =
mounts.keys.find(_.precedes(path)).match
case None => directory.path + path
case Some(mount) => Cache(mounts(mount).repo).await().path + path
case None => directory.path + path.link
case Some(mount) => Cache(mounts(mount).repo).await().path + path.link
.as[Directory]

case class Universe(projects: Map[ProjectId, Definition]):
Expand All @@ -204,4 +204,4 @@ enum Compiler:

case class Step(sources: List[File], dependencies: List[Digest[Sha2[256]]], binaries: List[Digest[Sha2[256]]]):
def digest(using Raises[StreamCutError], Raises[IoError]): Digest[Sha2[256]] =
(sources.map(_.read[Bytes]), dependencies, binaries).digest
(sources.map(_.readAs[Bytes]), dependencies, binaries).digest
5 changes: 3 additions & 2 deletions src/model/frontend.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import rudiments.*
import turbulence.*
import hieroglyph.*, textWidthCalculation.uniform
import escapade.*
import spectacular.*

import scala.collection.mutable as scm

Expand Down Expand Up @@ -70,7 +71,7 @@ case class FrontEnd()(using Monitor, Stdio):
val async: Async[Unit] = Async[Unit]:
funnel.stream.foreach:
case Render => render()
case LogMessage(message) => pending ::= message.out.render
case LogMessage(message) => pending = message :: pending
case TaskUpdate(taskId, Complete()) => tasks = tasks - taskId
case TaskUpdate(taskId, Progress(stage, progress)) =>
tasks = tasks.updated(taskId, progress)
Expand Down Expand Up @@ -101,7 +102,7 @@ case class FrontEnd()(using Monitor, Stdio):
if tasks.size > 0 then Out.print(csi.cuu(tasks.size))

def log(message: Message | Text): Unit = message match
case message: Message => funnel.put(LogMessage(message.richText))
case message: Message => funnel.put(LogMessage(message.show))
case text: Text => funnel.put(LogMessage(text))

def follow(name: Message)(stream: LazyList[TaskEvent]): Unit =
Expand Down
99 changes: 49 additions & 50 deletions src/model/fury.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ import spectacular.*
import punctuation.*
import escritoire.*, tableStyles.horizontal, textWidthCalculation.eastAsianScripts
import spectacular.*
import exoskeleton.*
import exoskeleton.*, executives.completions, parameterInterpretation.posix
import perforate.*
import turbulence.*, basicIo.jvm
import spectral.*
import profanity.*
import turbulence.*

export gitCommands.environmentDefault

Expand All @@ -53,57 +55,54 @@ given (using CanThrow[AppError]): Raises[AggregateError[Error]] =
def record(error: AggregateError[Error]): Unit = throw AppError(error.message, error)
def abort(error: AggregateError[Error]): Nothing = throw AppError(error.message, error)

object Main extends Application:
private val logo: Text = t"CiAgICAgICAgICAgICAgIBtbMzg7MjsyMTc7MTsxMDFtwrcg4oCiIOKXjyAbWzM4OzI7MjA7NjA7MTAwbeKXjyDil48g4oCiIMK3CiAgICAgICAgIBtbMzg7MjsyMTc7MTsxMDFtwrcg4pePIOKXjyAbWzM4OzI7MTEyOzQ7NDNt4pePIBtbMzg7MjsxODs1Njs5NW3il48g4pePIOKXjyDil48gG1szODsyOzgzOzQ5OzJt4pePIBtbMzg7MjsxODs1Njs5NW3il48g4pePIOKXjyDCtwogICAgICAgIBtbMzg7MjsyMjc7MTs5MW3igKIg4pePIOKXjyAbWzM4OzI7MTEyOzQ7NDNt4pePIBtbMzg7MjsxODs1Njs5NW3il48g4pePIOKXjyAbWzM4OzI7MjEwOzExNTs3beKXjyDil48gG1szODsyOzA7MzM7MzZt4pePIBtbMzg7MjsxODs1Njs5NW3il48g4pePIOKXjyDigKIgICAgICAgIBtbMzg7MjsxNTA7MTUwOzE1MG3ila3ilIDilIDilIDilIDilIDila4KICAgICAgIBtbMzg7MjsyMjc7MTs5MW3il48g4pePIOKXjyDil48gG1szODsyOzE2OzUyOzkwbeKXjyAbWzM4OzI7ODM7NDk7Mm3il48gG1szODsyOzIxMDsxMTU7N23il48g4pePIOKXjyAbWzM4OzI7MDszMzszNm3il48gG1szODsyOzE2OzUyOzkwbeKXjyDil48g4pePIOKXjyDil48gICAgICAgG1szODsyOzE1MDsxNTA7MTUwbeKUgiAg4pWt4pSA4pSA4pWvCiAgICAgIBtbMzg7MjsyMjc7MTs5MW3il48g4pePIOKXjyDil48gG1szODsyOzgzOzQ5OzJt4pePIBtbMzg7MjsyMTA7MTE1Ozdt4pePIOKXjyDil48g4pePIBtbMzg7MjswOzMzOzM2beKXjyAbWzM4OzI7MTY7NTI7OTBt4pePIOKXjyAbWzM4OzI7Njg7NzY7MjZt4pePIBtbMzg7MjsxNjs1Mjs5MG3il48g4pePIOKXjyAgICAgIBtbMzg7MjsxNTA7MTUwOzE1MG3ilIIgIOKUggogICAgIBtbMzg7MjsyMzc7MTs4MW3igKIg4pePIOKXjyDil48gG1szODsyOzIyODsxMDQ7OW3il48gG1szODsyOzIxMDsxMTU7N23il48g4pePIOKXjyDil48gG1szODsyOzA7MzM7MzZt4pePIBtbMzg7MjsxNDs0ODs4NW3il48g4pePIBtbMzg7MjsxNzA7MTY4OzMxbeKXjyDil48gG1szODsyOzE0OzQ4Ozg1beKXjyDil48g4oCiICAgICAbWzM4OzI7MTUwOzE1MDsxNTBt4pSCICDilJTilIDilIDila7ila3ilIDilIDila4g4pWt4pSA4pSA4pWu4pWt4pSA4pSA4pWu4pSA4pSA4pSA4pWu4pWt4pSA4pSA4pWuIOKVreKUgOKUgOKVrgogICAgG1szODsyOzIzNzsxOzgxbcK3IOKXjyDil48gG1szODsyOzIxMTs0NDsxN23il48gG1szODsyOzIyODsxMDQ7OW3il48g4pePIBtbMzg7MjsyMTA7MTE1Ozdt4pePIOKXjyDil48gG1szODsyOzgzOzQ5OzJt4pePIBtbMzg7MjsxNDs0ODs4NW3il48gG1szODsyOzE3MDsxNjg7MzFt4pePIOKXjyAbWzM4OzI7Njg7NzY7MjZt4pePIBtbMzg7MjsxNDs0ODs4NW3il48g4pePIOKXjyDCtyAgICAbWzM4OzI7MTUwOzE1MDsxNTBt4pSCICDilIzilIDilIDila/ilIIgIOKUgiDilIIgIOKUguKUgiAg4pWt4pSA4pSA4pSA4pWv4pSCICDilIIg4pSCICDilIIKICAgICAbWzM4OzI7MjM3OzE7ODFt4pePIOKXjyAbWzM4OzI7MjI4OzEwNDs5beKXjyDil48g4pePIOKXjyAbWzM4OzI7MjEwOzExNTs3beKXjyDil48gG1szODsyOzIzMDsxNzU7OG3il48gG1szODsyOzE3MDsxNjg7MzFt4pePIOKXjyDil48gG1szODsyOzY4Ozc2OzI2beKXjyAbWzM4OzI7MTI7NDQ7ODBt4pePIOKXjyDil48g4pePICAgICAbWzM4OzI7MTUwOzE1MDsxNTBt4pSCICDilIIgICDilIIgIOKUgiDilIIgIOKUguKUgiAg4pSCICAgIOKUgiAg4pSCIOKUgiAg4pSCCiAgICAbWzM4OzI7MjQ3OzE7NzFtwrcg4pePIBtbMzg7MjsyMjg7MTA0Ozlt4pePIOKXjyDil48g4pePIOKXjyAbWzM4OzI7MjQ3OzE4MTsyNG3il48g4pePIBtbMzg7MjsxNzA7MTY4OzMxbeKXjyDil48g4pePIBtbMzg7Mjs2ODs3NjsyNm3il48gG1szODsyOzEyOzQ0OzgwbeKXjyDil48g4pePIOKXjyDCtyAgICAbWzM4OzI7MTUwOzE1MDsxNTBt4pSCICDilIIgICDilIIgIOKVsOKUgOKVryAg4pSC4pSCICDilIIgICAg4pSCICDilbDilIDila8gIOKUggogICAgIBtbMzg7MjsyNDc7MTs3MW3igKIgG1szODsyOzIxMTs0NDsxN23il48gG1szODsyOzIyODsxMDQ7OW3il48g4pePIOKXjyAbWzM4OzI7MjQ3OzE4MTsyNG3il48g4pePIOKXjyDil48gG1szODsyOzE3MDsxNjg7MzFt4pePIOKXjyAbWzM4OzI7Njg7NzY7MjZt4pePIBtbMzg7MjsxMDs0MDs3NW3il48g4pePIOKXjyDil48g4oCiICAgICAbWzM4OzI7MTUwOzE1MDsxNTBt4pWw4pSA4pSA4pWvICAg4pWw4pSA4pSA4pSA4pSA4pSA4pSA4pSA4pWv4pWw4pSA4pSA4pWvICAgIOKVsOKUgOKUgOKUgOKUgOKUkCAg4pSCCiAgICAgIBtbMzg7MjsyNDc7MTs3MW3il48gG1szODsyOzIyODsxMDQ7OW3il48g4pePIBtbMzg7MjsyMzA7MTc1Ozht4pePIBtbMzg7MjsyNDc7MTgxOzI0beKXjyDil48g4pePIOKXjyAbWzM4OzI7MTcwOzE2ODszMW3il48g4pePIBtbMzg7MjswOzMzOzM2beKXjyAbWzM4OzI7MTA7NDA7NzVt4pePIOKXjyDil48g4pePIOKXjyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgG1szODsyOzE1MDsxNTA7MTUwbeKUgiAg4pSCCiAgICAgICAbWzM4OzI7MjI4OzEwNDs5beKXjyDil48gG1szODsyOzIzMDsxNzU7OG3il48gG1szODsyOzI0NzsxODE7MjRt4pePIOKXjyDil48g4pePIOKXjyAbWzM4OzI7MTcwOzE2ODszMW3il48gG1szODsyOzA7MzM7MzZt4pePIBtbMzg7Mjs4OzM2OzcwbeKXjyDil48g4pePIOKXjyDil48gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgG1szODsyOzE1MDsxNTA7MTUwbeKVreKUgOKUgOKUgOKUgOKVryAg4pSCCiAgICAgICAgG1szODsyOzIyODsxMDQ7OW3igKIg4pePIBtbMzg7MjsyMzA7MTc1Ozht4pePIBtbMzg7MjsyNDc7MTgxOzI0beKXjyDil48g4pePIOKXjyAbWzM4OzI7MTcwOzE2ODszMW3il48gG1szODsyOzg7MzY7NzBt4pePIOKXjyDil48g4pePIOKXjyDigKIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIBtbMzg7MjsxNTA7MTUwOzE1MG3ilbDilIDilIDilIDilIDilIDilIDilIDila8KICAgICAgICAgG1szODsyOzIyODsxMDQ7OW3CtyAbWzM4OzI7MjQ3OzE4MTsyNG3il48g4pePIOKXjyDil48g4pePIOKXjyAbWzM4OzI7NjszMjs2NW3il48g4pePIOKXjyDil48g4pePIMK3CiAgICAgICAgICAgICAgIBtbMzg7MjsyNDc7MTgxOzI0bcK3IOKAoiDil48gG1szODsyOzE1MDsxMTc7MzRt4pePIBtbMzg7Mjs0OzI4OzYwbeKXjyDigKIgwrcKG1swbQo=".decode[Base64].uString

def invoke(using CliContext): Execution =
import errorHandlers.throwUnsafely
execute:
enum BusMessage:
case Ping

val logo: Text = t"CiAgICAgICAgICAgICAgIBtbMzg7MjsyMTc7MTsxMDFtwrcg4oCiIOKXjyAbWzM4OzI7MjA7NjA7MTAwbeKXjyDil48g4oCiIMK3CiAgICAgICAgIBtbMzg7MjsyMTc7MTsxMDFtwrcg4pePIOKXjyAbWzM4OzI7MTEyOzQ7NDNt4pePIBtbMzg7MjsxODs1Njs5NW3il48g4pePIOKXjyDil48gG1szODsyOzgzOzQ5OzJt4pePIBtbMzg7MjsxODs1Njs5NW3il48g4pePIOKXjyDCtwogICAgICAgIBtbMzg7MjsyMjc7MTs5MW3igKIg4pePIOKXjyAbWzM4OzI7MTEyOzQ7NDNt4pePIBtbMzg7MjsxODs1Njs5NW3il48g4pePIOKXjyAbWzM4OzI7MjEwOzExNTs3beKXjyDil48gG1szODsyOzA7MzM7MzZt4pePIBtbMzg7MjsxODs1Njs5NW3il48g4pePIOKXjyDigKIgICAgICAgIBtbMzg7MjsxNTA7MTUwOzE1MG3ila3ilIDilIDilIDilIDilIDila4KICAgICAgIBtbMzg7MjsyMjc7MTs5MW3il48g4pePIOKXjyDil48gG1szODsyOzE2OzUyOzkwbeKXjyAbWzM4OzI7ODM7NDk7Mm3il48gG1szODsyOzIxMDsxMTU7N23il48g4pePIOKXjyAbWzM4OzI7MDszMzszNm3il48gG1szODsyOzE2OzUyOzkwbeKXjyDil48g4pePIOKXjyDil48gICAgICAgG1szODsyOzE1MDsxNTA7MTUwbeKUgiAg4pWt4pSA4pSA4pWvCiAgICAgIBtbMzg7MjsyMjc7MTs5MW3il48g4peP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MjsyMzA7MTc1Ozht4pePIBtbMzg7MjsyNDc7MTgxOzI0beKXjyDil48g4pePIOKXjyAbWzM4OzI7MTcwOzE2ODszMW3il48g4pePIBtbMzg7MjswOzMzOzM2beKXjyAbWzM4OzI7MTA7NDA7NzVt4pePIOKXjyDil48g4pePIOKXjyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgG1szODsyOzE1MDsxNTA7MTUwbeKUgiAg4pSCCiAgICAgICAbWzM4OzI7MjI4OzEwNDs5beKXjyDil48gG1szODsyOzIzMDsxNzU7OG3il48gG1szODsyOzI0NzsxODE7MjRt4pePIOKXjyDil48g4pePIOKXjyAbWzM4OzI7MTcwOzE2ODszMW3il48gG1szODsyOzA7MzM7MzZt4pePIBtbMzg7Mjs4OzM2OzcwbeKXjyDil48g4pePIOKXjyDil48gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgG1szODsyOzE1MDsxNTA7MTUwbeKVreKUgOKUgOKUgOKUgOKVryAg4pSCCiAgICAgICAgG1szODsyOzIyODsxMDQ7OW3igKIg4pePIBtbMzg7MjsyMzA7MTc1Ozht4pePIBtbMzg7MjsyNDc7MTgxOzI0beKXjyDil48g4pePIOKXjyAbWzM4OzI7MTcwOzE2ODszMW3il48gG1szODsyOzg7MzY7NzBt4pePIOKXjyDil48g4pePIOKXjyDigKIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIBtbMzg7MjsxNTA7MTUwOzE1MG3ilbDilIDilIDilIDilIDilIDilIDilIDila8KICAgICAgICAgG1szODsyOzIyODsxMDQ7OW3CtyAbWzM4OzI7MjQ3OzE4MTsyNG3il48g4pePIOKXjyDil48g4pePIOKXjyAbWzM4OzI7NjszMjs2NW3il48g4pePIOKXjyDil48g4pePIMK3CiAgICAgICAgICAgICAgIBtbMzg7MjsyNDc7MTgxOzI0bcK3IOKAoiDil48gG1szODsyOzE1MDsxMTc7MzRt4pePIBtbMzg7Mjs0OzI4OzYwbeKXjyDigKIgwrcKG1swbQo=".decode[Base64].uString

@main
def main(): Unit = daemon[BusMessage]:
execute:
import unsafeExceptions.canThrowAny
throwErrors[InvalidRefError | ExecError | StreamCutError | CodlReadError | DateError | MarkdownError |
NumberError | IoError | PathError | GitError | NotFoundError | UrlError | UnknownRefError |
EnvironmentError | SystemPropertyError | UndecodableCharError | UnencodableCharError | CancelError |
GitRefError]:
supervise:
Async:
summon[Invocation].signals(Signal.Int, Signal.Winch).foreach:
case Signal.Winch => Out.print(t"\e[s\e[4095C\e[4095B\e[6n\e[u")
case signal => Out.println(signal.debug)

Async:
summon[Invocation].stdin().match
case Stdin.Pipe(stream) => stream
case Stdin.Terminal(stream) => stream
.foreach: bytes =>
terminal:
tty.events.stream.foreach: bytes =>
Out.println(bytes.debug)

Out.println(logo)
Thread.sleep(24000)
ExitStatus.Ok
Out.println(logo)
ExitStatus.Ok

def main2(args: IArray[Text]): Unit throws StreamCutError | AggregateError[Error] =
import unsafeExceptions.canThrowAny
throwErrors[InvalidRefError | ExecError | StreamCutError | CodlReadError | DateError | MarkdownError | NumberError | IoError | PathError | GitError |
NotFoundError | UrlError | UnknownRefError | EnvironmentError | SystemPropertyError | UndecodableCharError | UnencodableCharError | CancelError | GitRefError]:
given installation: Installation = Installation((Xdg().cacheHome[Path] / p"fury").as[Directory])
import workingDirectories.default
// def main2(args: IArray[Text]): Unit throws StreamCutError | AggregateError[Error] =
// import unsafeExceptions.canThrowAny
// throwErrors[InvalidRefError | ExecError | StreamCutError | CodlReadError | DateError | MarkdownError | NumberError | IoError | PathError | GitError |
// NotFoundError | UrlError | UnknownRefError | EnvironmentError | SystemPropertyError | UndecodableCharError | UnencodableCharError | CancelError | GitRefError]:
// given installation: Installation = Installation((Xdg.cacheHome[Path] / p"fury").as[Directory])
// import workingDirectories.default

internet:
supervise:
frontEnd:
given Log = Log()
val rootWorkspace = Workspace(Properties.user.dir())
log(msg"Starting build in ${rootWorkspace.directory.path}")
log(msg"args = ${args.to(List).show}")

given universe: Universe = rootWorkspace.universe()

val projects = universe.projects.to(List)
Table[(ProjectId, Definition)](
Column(e"$Bold(Project ID)")(_(0)),
Column(e"$Bold(Name)")(_(1).name),
Column(e"$Bold(Description)")(_(1).description),
Column(e"$Bold(Website)")(_(1).website.mm(_.show).or(t"")),
Column(e"$Bold(Source)"): (_, definition) =>
definition.source match
case workspace: Workspace => e"$Aquamarine(${rootWorkspace.directory.path.relativeTo(workspace.directory.path)})"
case vault: Vault => e"$SeaGreen(${vault.name})"
).tabulate(projects, Environment.columns).map(_.render).foreach(log(_))

Engine.build(ModuleRef(args(0))).await()
// internet:
// supervise:
// frontEnd:
// given Log = logging.silent
// val rootWorkspace = Workspace(Properties.user.dir())
// Out.println(msg"Starting build in ${rootWorkspace.directory.path}")
// Out.println(msg"args = ${args.to(List).show}")

// given universe: Universe = rootWorkspace.universe()
// val projects = universe.projects.to(List)

// Table[(ProjectId, Definition)](
// Column(e"$Bold(Project ID)")(_(0)),
// Column(e"$Bold(Name)")(_(1).name),
// Column(e"$Bold(Description)")(_(1).description),
// Column(e"$Bold(Website)")(_(1).website.mm(_.show).or(t"—")),
// Column(e"$Bold(Source)"): (_, definition) =>
// definition.source match
// case workspace: Workspace => e"$Aquamarine(${rootWorkspace.directory.path.relativeTo(workspace.directory.path)})"
// case vault: Vault => e"$SeaGreen(${vault.name})"
// ).tabulate(projects, Environment.columns).map(_.render).foreach(Out.println(_))

// Engine.build(ModuleRef(args(0))).await()
5 changes: 2 additions & 3 deletions src/model/model.scala
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ object WorkPath:
def separator(path: WorkPath): Text = t"/"

given rootParser: RootParser[WorkPath, Unit] = text => ((), text)

given creator: PathCreator[WorkPath, GeneralForbidden, Unit] = (unit, descent) => WorkPath(descent)

given show: Show[WorkPath] = _.render
given encoder: Encoder[WorkPath] = _.render
given debug: Debug[WorkPath] = _.render
Expand All @@ -179,7 +177,8 @@ object WorkPath:
type Result = Path
def apply(left: Path, right: WorkPath): Path = right.descent.reverse.foldLeft(left)(_ / _)

case class WorkPath(descent: List[PathName[GeneralForbidden]])
case class WorkPath(descent: List[PathName[GeneralForbidden]]):
def link: SafeLink = SafeLink(0, descent)

case class Definition
(name: Text, description: InlineMd, website: Maybe[HttpUrl], license: Maybe[LicenseId], keywords: List[Keyword],
Expand Down
5 changes: 0 additions & 5 deletions src/old/fury.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ erased given CanThrow[AppError] = compiletime.erasedValue
given LogFormat[File] = LogFormat.standardAnsi
given Encoding = characterEncodings.utf8

//val LogFile = unsafely(Unix.parse(t"/var/log/fury.log").file(Ensure).sink)
//given log: Log = Log(
//{ case _ => LogFile }
//)(using monitors.global)

given log: Log = logging.silent

object palette:
Expand Down

0 comments on commit 509928f

Please sign in to comment.