Skip to content

Commit

Permalink
Take dots before '.scala' out of generated Scala source names. See sc…
Browse files Browse the repository at this point in the history
  • Loading branch information
swaldman committed Sep 5, 2023
1 parent f8351fe commit d69b3dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/scala/untemplate/Untemplate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ object Untemplate:
val defaultFunctionIdentifier = untemplateSourceNameToIdentifier(untemplateSourceName)

// Not great, but a name knowable prior to compilation for last-mod check
val outFileName = s"${untemplateSourceName}.scala"
val outFileName =
def dedottify( c : Char ) = if c == '.' then '-' else c
val dedottified = untemplateSourceName.map(dedottify)
s"${dedottified}.scala"
val outFullPath = destDirPath.resolve(Path.of(outFileName))

def doGenerateWrite: ZIO[Any, Throwable, GenerationRecord] =
Expand Down

0 comments on commit d69b3dd

Please sign in to comment.