From 78a96932d7fec6fcef816e8a0886c6a7756b78fb Mon Sep 17 00:00:00 2001 From: Johannes Wirth Date: Wed, 1 Oct 2025 18:13:30 +0200 Subject: [PATCH] Create envrc in workspace --- init-workspace.sh | 2 ++ .../scala/com/minres/tgc/hammer/options/BaseOption.scala | 8 ++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/init-workspace.sh b/init-workspace.sh index 5306cde..f3e78ff 100755 --- a/init-workspace.sh +++ b/init-workspace.sh @@ -29,5 +29,7 @@ else echo "export TGC_HAMMER_WORKDIR=\"$PWD\"" >> source.sh echo "export PATH=\"${TGC_HAMMER_HOME}/toolflow/target/universal/stage/bin:$PATH\"" >> source.sh + echo "source source.sh" > .envrc + mkdir -p output fi \ No newline at end of file diff --git a/toolflow/src/main/scala/com/minres/tgc/hammer/options/BaseOption.scala b/toolflow/src/main/scala/com/minres/tgc/hammer/options/BaseOption.scala index 738ae07..b1076fb 100644 --- a/toolflow/src/main/scala/com/minres/tgc/hammer/options/BaseOption.scala +++ b/toolflow/src/main/scala/com/minres/tgc/hammer/options/BaseOption.scala @@ -8,13 +8,9 @@ import scala.compiletime.uninitialized trait BaseOption[T](using conv: ValueConverter[T]) { protected def createScallop(conf: ScallopConf, group: ScallopOptionGroup): ScallopOption[T] private var scallop: ScallopOption[T] = uninitialized - def init(scallopConf: ScallopConf, group: ScallopOptionGroup): Unit = { - scallop = createScallop(scallopConf, group) - } + def init(scallopConf: ScallopConf, group: ScallopOptionGroup): Unit = scallop = createScallop(scallopConf, group) - def get: T = { - scallop() - } + def get: T = scallop() def apply: T = get def getToolParameters: Seq[Shellable] = if (scallop.isDefined) Seq(s"--$toolName", getToolArg) else Seq()