You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use functionality described at http://www.foundweekends.org/giter8/template.html in which a directory is named $package$. It seems to work for Linux, but it doesn't for Windows. It may be that backslashes get into the path and are misinterpreted as escape characters. Here are the steps, approximately:
> sbt new foundweekends/giter8.g8
> cd my-template-project
> cd src/main/g8
> cd src/main
> mkdir resources
> mkdir resources/$package$ # do this from the gui
> cp scala/Stub.scala resources/$package$ # do this from the gui
> cd ../..
# Add "package = one.two.three" to default.properties
> cd ../../..
> sbt
sbt:My Template Project> g8
[error] stack trace is suppressed; run last Compile / g8 for the full output
[error] (Compile / g8) org.stringtemplate.v4.compiler.STException: relative: src\main\resources\$package$\Stub.scala, toPath: D:\Users\kwa\Documents\MyData\Projects\my-template-project\target\g8, An unexpected error occurred while processing the template. Check that all literal '$' are properly escaped with '\$'
[error] Total time: 0 s, completed Aug 9, 2021 11:08:11 AM
[error] org.stringtemplate.v4.compiler.STException: relative: src\main\resources\$package$\Stub.scala, toPath: D:\Users\kwa\Documents\MyData\Projects\my-template-project\target\g8, An unexpected error occurred while processing the template. Check that all literal '$' are properly escaped with '\$'
[error] at giter8.G8$.expandPath(g8.scala:229)
[error] at giter8.G8$.$anonfun$apply$2(g8.scala:99)
[error] at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:293)
[error] at scala.collection.Iterator.foreach(Iterator.scala:943)
[error] at scala.collection.Iterator.foreach$(Iterator.scala:943)
[error] at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
[error] at scala.collection.IterableLike.foreach(IterableLike.scala:74)
[error] at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
[error] at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
[error] at scala.collection.TraversableLike.flatMap(TraversableLike.scala:293)
[error] at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:290)
[error] at scala.collection.AbstractTraversable.flatMap(Traversable.scala:108)
[error] at giter8.G8$.apply(g8.scala:97)
[error] at giter8.Giter8Plugin$.$anonfun$baseGiter8Settings$1(Giter8Plugin.scala:56)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (Compile / g8) org.stringtemplate.v4.compiler.STException: relative: src\main\resources\$package$\Stub.scala, toPath: D:\Users\kwa\Documents\MyData\Projects\my-template-project\target\g8, An unexpected error occurred while processing the template. Check that all literal '$' are properly escaped with '\$'
The text was updated successfully, but these errors were encountered:
I'm trying to use functionality described at http://www.foundweekends.org/giter8/template.html in which a directory is named$package$ . It seems to work for Linux, but it doesn't for Windows. It may be that backslashes get into the path and are misinterpreted as escape characters. Here are the steps, approximately:
The text was updated successfully, but these errors were encountered: