Skip to content

Commit

Permalink
Don't depend on Eucalyptus, and provide soundness exports
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Jun 3, 2024
1 parent 4574e20 commit 8d34af1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions fury
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

repo propensive/probably
repo propensive/galilei
target guillotine/test
target guillotine/core

project guillotine
module core
sources src/core
include eucalyptus/core
include contextual/core anticipation/log contingency/core turbulence/core

module test
sources src/test
Expand Down
17 changes: 9 additions & 8 deletions src/core/guillotine.scala
Original file line number Diff line number Diff line change
Expand Up @@ -319,19 +319,20 @@ object Sh:
given Insertion[Parameters, Command] = command => Parameters(command.arguments*)

given [ValueType: Parameterizable]: Insertion[Parameters, ValueType] = value =>
Parameters(summon[Parameterizable[ValueType]].show(value))
Parameters(ValueType.show(value))

object Parameterizable:
given path[PathType: GenericPath]: Parameterizable[PathType] = _.pathText
given [PathType: GenericPath] => PathType is Parameterizable = _.pathText

given int: Parameterizable[Int] = _.show
given Int is Parameterizable = _.show

given [ValueType](using encoder: Encoder[ValueType]): Parameterizable[ValueType] =
new Parameterizable[ValueType]:
def show(value: ValueType): Text = encoder.encode(value)
given [ValueType](using encoder: Encoder[ValueType]) => ValueType is Parameterizable:
type Self = ValueType
def show(value: ValueType): Text = encoder.encode(value)

trait Parameterizable[-ValueType]:
def show(value: ValueType): Text
trait Parameterizable:
type Self
def show(value: Self): Text

object Guillotine:
given Realm = realm"guillotine"
Expand Down
3 changes: 3 additions & 0 deletions src/core/soundness+guillotine.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package soundness

export guillotine.{sh, PosixCommandOutputs, CommandOutput, Executor, ProcessRef, OsProcess, Process, Executable, Command, Pipeline, ExecError, PidError, Parameterizable}

0 comments on commit 8d34af1

Please sign in to comment.