Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
    Eric K Richardson
    Darn, for foundweekends, 64 open issues - that seems like lostweekends.
    eugene yokota
    Eric K Richardson
    Interestingly, when I run g8Test I see clang and such running but no output from the scripted but it succeeds so I am guessing it is running the app but no output is coming through.
    eugene yokota
    you can turn off log buffering to see what's up
    Eric K Richardson
    Is this correct Keys.test in Test in scala-seed it is test in Test.
    Oh yeah, I forgot about that.
    So many things.
    eugene yokota
    I forgot why Keys.test was needed but at some point there was some confusion because there was a class named test somewhere I think
    or a package named test
    Eric K Richardson
    Does slash syntax help Test / test or is that the same?
    eugene yokota
    you can try it
    sometimes it's just accumulation of old small fixes and changes that are no longer needed
    Eric K Richardson
    I meant for the conflict. I did go to slash and it worked. Yeah, totally understand - things have a way of accumulating.
    Hi again. I was trying to make a launcher shell script using my giter8 template but it looks like it confused the shell syntax File: /tmp/giter8-8880851143575/src/main/g8/$if(graal_native_image.truthy)$build-native-image.sh$endif$, 4:13: '=' came as a complete surprise to me
    I looked in the manual for information about escape patterns but didn't see anything.
    Is there a simple workaround for writing my script?
    eugene yokota
    no idea

    In Windows 10 with Conscript and g8 installed:

    cd c:\temp
    git clone https://github.com/scala/hello-world.g8.git
    g8 file://c:/temp/hello-world.g8

    It asks me for name and then a few other variables and then I get...

    java.util.regex.PatternSyntaxException: Unexpected internal error near index 1

    What might be going on?


    Ok. The following worked:

    sbt new file://c:/temp/hello-world.g8

    Now I can get further with testing my own custom template.


    I filed a bug report:


    Robby Kiskanyan
    i'm not sure why I'm having such a hard time to merely have dollar signs ignored. How do I just have this completely ignored? assemblyJarName in assembly := s"${name.value}_${scalaVersion.value}.jar" Already tried \$
    eugene yokota
    @robbyki if \$ is not working, then it could be a bug. could you open an issue on https://github.com/foundweekends/giter8/issues/ with repro steps plz?
    Tomasz Godzik
    Hey all, we will be using the g8 templates as a default way to create a new project in Metals: scalameta/metals#1728
    We will also be parsing the https://github.com/foundweekends/giter8/wiki/giter8-templates to get a more complete version of know templates if the users wants to.
    Thanks for the amazing work on the project! It's all working rather smoothly and was really simple to integrate with Metals
    Antonio Gelameris
    Hello guys
    does someone know a way to make giter8 create the '.git' folder in new projects?
    apparently running a git init under src/main/g8
    despite it creates the .git
    g8 doesn't create it on the final project
    it seems that that folder gets ignored
    Marco F.
    hey @eed3si9n ... is there anyway to move projects into your org? (we can chat privately whenever you want)
    eugene yokota
    @mfirry sure. my timezone is EST.
    Drew Boardman
    I'm creating a template and getting this error
    [info] [error] /tmp/sbt_a8c089cd/project/Dependencies.scala:20:3: not found: value $if
    [info] [error]   $if(useDatabase.truthy)$
    this file is in g8/project/Dependencies.scala
    Drew Boardman
    that's with g8Test, however with g8 I get this
    sbt:seed> g8
    Falling back to file copy for /home/drew/work/giter8-template/src/main/g8/project/Dependencies.scala: File: /home/drew/work/giter8-template/src/main/g8/project/Dependencies.scala, An unexpected error occurred while processing the template. Check that all literal '$' are properly escaped with '\$'
    Falling back to file copy for /home/drew/work/giter8-template/src/main/g8/project/Settings.scala: File: /home/drew/work/giter8-template/src/main/g8/project/Settings.scala, An unexpected error occurred while processing the template. Check that all literal '$' are properly escaped with '\$'
    [success] Total time: 0 s, completed Mar 16, 2021, 11:11:21 AM
    Drew Boardman
    does giter8 not support interpolation/conditionals in project/**?
    Drew Boardman
    i think i've narrowed it down. I'm trying to use sbt-release, and contain my settings in project/Settings.scala. When i import ReleaseTransformations._ in that file - everything blows up
    it seems to not honor the plugins file or something, and all g8 interpolation fails
    [info] [error] /tmp/sbt_1eb8b788/project/Settings.scala:12:5: not found: value scalafmtOnCompile
    [info] [error]     scalafmtOnCompile := true,
    [info] [error]     ^
    [info] [error] /tmp/sbt_1eb8b788/project/Settings.scala:13:62: not found: value betterMonadicForV
    [info] [error]     addCompilerPlugin("com.olegpy" %% "better-monadic-for" % betterMonadicForV),
    [info] [error]                                                              ^
    [info] [error] /tmp/sbt_1eb8b788/project/Settings.scala:14:61: not found: value kindProjectorV
    [info] [error]     addCompilerPlugin("org.typelevel" %% "kind-projector" % kindProjectorV cross CrossVersion.full),
    [info] [error]                                                             ^
    [info] [error] /tmp/sbt_1eb8b788/project/Settings.scala:15:63: not found: value silencerV
    [info] [error]     addCompilerPlugin("com.github.ghik" % "silencer-plugin" % silencerV cross CrossVersion.full),
    [info] [error]                                                               ^
    [info] [error] /tmp/sbt_1eb8b788/project/Settings.scala:32:5: not found: value dockerAliases
    [info] [error]     dockerAliases := dockerAliases.value.flatMap { alias => Seq(
    Samson Kamau Muiruri
    Since the maven fetch function might require a scala version for some artifacts, is there a way of specifying that dynamically?
    scala_version=maven(org.scala-lang, scala-dist, stable)
    pix_version=maven(com.pf, pix_$scala_version$, stable)
    this doesn't seem to work because it seems like its not computed
    David Geirola

    Same error Drew

    An unexpected error occurred while processing the template. Check that all literal '$' are properly escaped with '\$'

    Using a variable in my build.sbt

    ThisBuild / organization := "$package$"
    ThisBuild / scalaVersion := "2.12.8"
    lazy val root = (project in file(".")).
        name := "$name$"

    Hello guys!
    Question about g8Test - problem is I'd like to pass specific sbt settings during g8Test, but I know them only during runtime so can't set them in scriptedLaunchOpts
    Ideally if we can set the same options as for the parent sbt call, like

    sbt -Dhttp.proxyHost=...

    Looks this makes the trick
        scriptedLaunchOpts ++= management.ManagementFactory.getRuntimeMXBean.getInputArguments.asScala
    Nakarin Hansawattana

    Hello, would like to ask something about the giter8 lib template, whether it provides a way to generate a template iteratively.

    For example, given list of names, and a g8 repo that contains a scala file in certain subdirectory (also with a substitutable field that can be replace). I want to generate that file multiple time at the same path, with each copy of file generated being substituted with a name in the list.

    Is there ability to specify description for parameters defined in src/main/g8/default.properties?
    Does g8 supports OR conditions in the conditional generation? don't want to introduce additional variables
    1 reply