Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update .gitignore #204

Open
wants to merge 2 commits into
base: 2.9.x
Choose a base branch
from
Open

Update .gitignore #204

wants to merge 2 commits into from

Conversation

PeuTit
Copy link

@PeuTit PeuTit commented May 10, 2023

Add files in gitignore related to:

  • metals
  • vscode
  • scala3
  • and more...
    For both the main project and the generated one.

@PeuTit
Copy link
Author

PeuTit commented May 12, 2023

Running sbt g8Test currently fails with this error:

Click to open
[success] Total time: 0 s, completed May 12, 2023, 12:12:47 PM
[info] loading settings for project root from build.sbt ...
[info] set current project to root (in build file:/Users/titouan/Documents/work/lunatech/play-scala-seed.g8/)
[info] Running 1 / 1 (100.00%) scripted tests with RunFromSourceMain
[info] Running root/scripted
[error] [info] [launcher] getting org.scala-sbt sbt 1.8.2  (this may take some time)...
[error] [info] [launcher] getting Scala 2.12.17 (for sbt)...
[info] [info] Updated file /private/var/folders/d7/02c17gjs6hx6zfmrf3bqxjwc0000gp/T/sbt_dc85eb55/project/build.properties: set sbt.version to 1.8.2
[info] [info] welcome to sbt 1.8.2 (Oracle Corporation Java 11.0.2)
[info] [info] loading project definition from /private/var/folders/d7/02c17gjs6hx6zfmrf3bqxjwc0000gp/T/sbt_dc85eb55/project
[error] /private/var/folders/d7/02c17gjs6hx6zfmrf3bqxjwc0000gp/T/sbt_dc85eb55/build.sbt:6: error: not found: value PlayScala
[error] lazy val root = (project in file(".")).enablePlugins(PlayScala)
[error]                                                      ^
[error] sbt.compiler.EvalException: Type error in expression
[info] [error] sbt.compiler.EvalException: Type error in expression
[info] [error] Use 'last' for the full log.
[info] [warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
[error] x root/scripted
sbt.internal.scripted.TestException: {line -1}  Reload for scripted batch execution failed.
  | => rat sbt.scriptedtest.ScriptedTests.$anonfun$runBatchedTests$5(ScriptedTests.scala:237)
        at sbt.scriptedtest.ScriptedTests.$anonfun$runBatchedTests$5$adapted(ScriptedTests.scala:231)
        at sbt.scriptedtest.ScriptedTests.$anonfun$commonRunTest$6(ScriptedTests.scala:325)
        at scala.util.control.Exception$Catch.apply(Exception.scala:228)
        at sbt.scriptedtest.ScriptedTests.commonRunTest(ScriptedTests.scala:324)
        at sbt.scriptedtest.ScriptedTests.$anonfun$runBatchedTests$3(ScriptedTests.scala:241)
        at sbt.scriptedtest.ScriptedTests.runOrHandleDisabled(ScriptedTests.scala:275)
        at sbt.scriptedtest.ScriptedTests.$anonfun$runBatchedTests$1(ScriptedTests.scala:245)
        at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:286)
        at scala.collection.mutable.ArraySeq.foreach(ArraySeq.scala:75)
        at scala.collection.TraversableLike.map(TraversableLike.scala:286)
        at scala.collection.TraversableLike.map$(TraversableLike.scala:279)
        at scala.collection.AbstractTraversable.map(Traversable.scala:108)
        at sbt.scriptedtest.ScriptedTests.runBatchTests$1(ScriptedTests.scala:217)
        at sbt.scriptedtest.ScriptedTests.runBatchedTests(ScriptedTests.scala:261)
        at sbt.scriptedtest.ScriptedTests.$anonfun$batchScriptedRunner$11(ScriptedTests.scala:156)
        at sbt.io.IO$.withTemporaryDirectory(IO.scala:490)
        at sbt.io.IO$.withTemporaryDirectory(IO.scala:500)
        at sbt.scriptedtest.ScriptedTests.$anonfun$batchScriptedRunner$10(ScriptedTests.scala:156)
        at sbt.scriptedtest.ScriptedRunner.$anonfun$runAll$1(ScriptedTests.scala:635)
        at scala.collection.immutable.List.flatMap(List.scala:366)
        at sbt.scriptedtest.ScriptedRunner.runAll(ScriptedTests.scala:635)
        at sbt.scriptedtest.ScriptedRunner.run(ScriptedTests.scala:604)
        at sbt.scriptedtest.ScriptedRunner.run(ScriptedTests.scala:457)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at sbt.ScriptedRun$RunV2.invoke(ScriptedRun.scala:151)
        at sbt.ScriptedRun.run(ScriptedRun.scala:34)
        at sbt.ScriptedRun.run$(ScriptedRun.scala:15)
        at sbt.ScriptedRun$RunV2.run(ScriptedRun.scala:132)
        at sbt.ScriptedPlugin$.$anonfun$scriptedTask$3(ScriptedPlugin.scala:188)
        at sbt.ScriptedPlugin$.$anonfun$scriptedTask$3$adapted(ScriptedPlugin.scala:177)
        at scala.Function1.$anonfun$compose$1(Function1.scala:49)
        at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
        at sbt.std.Transform$$anon$4.work(Transform.scala:68)
        at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
        at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
        at sbt.Execute.work(Execute.scala:291)
        at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
        at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: sbt.internal.scripted.TestException: {line -1}  Command failed: Remote sbt initialization failed
        at sbt.scriptedtest.BatchScriptRunner.processStatement(BatchScriptRunner.scala:60)
        at sbt.scriptedtest.ScriptedTests.$anonfun$runBatchedTests$5(ScriptedTests.scala:233)
        ... 48 more
[error] java.lang.RuntimeException: Failed tests:
[error]         root/scripted
[error]
[error]         at scala.sys.package$.error(package.scala:30)
[error]         at sbt.scriptedtest.ScriptedRunner.reportErrors(ScriptedTests.scala:632)
[error]         at sbt.scriptedtest.ScriptedRunner.runAll(ScriptedTests.scala:635)
[error]         at sbt.scriptedtest.ScriptedRunner.run(ScriptedTests.scala:604)
[error]         at sbt.scriptedtest.ScriptedRunner.run(ScriptedTests.scala:457)
[error]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error]         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error]         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[error]         at sbt.ScriptedRun$RunV2.invoke(ScriptedRun.scala:151)
[error]         at sbt.ScriptedRun.run(ScriptedRun.scala:34)
[error]         at sbt.ScriptedRun.run$(ScriptedRun.scala:15)
[error]         at sbt.ScriptedRun$RunV2.run(ScriptedRun.scala:132)
[error]         at sbt.ScriptedPlugin$.$anonfun$scriptedTask$3(ScriptedPlugin.scala:188)
[error]         at sbt.ScriptedPlugin$.$anonfun$scriptedTask$3$adapted(ScriptedPlugin.scala:177)
[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.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error]         at java.base/java.lang.Thread.run(Thread.java:834)
[error] (scripted) Failed tests:
[error]         root/scripted
[error] Total time: 9 s, completed May 12, 2023, 12:12:56 PM

But using the template locally, compiling and running the tests works as expected!

@mkurz
Copy link
Member

mkurz commented May 12, 2023

I know I will take a look at this later.

Add files in gitignore related to:
- metals
- vscode
- scala3
- and more...
For both the main project and the generated one.
@mkurz
Copy link
Member

mkurz commented Jul 16, 2023

@PeuTit see the comment I pushed, it works when removing */.metals from the .gitignore within the g8 folder. I didn't do any research really, but giter8 is parsing the gitignore file as it seems: https://github.com/search?q=repo%3Afoundweekends%2Fgiter8%20gitignore&type=code Not sure why this specific entry is causing problem hower.
Would need more investigation.
I am a bit hesitate to merge this now when we don't know what's going on excactly.
Did you copy this ignore files from somehwere or did you write them by yourself?

@PeuTit
Copy link
Author

PeuTit commented Jul 17, 2023

Hey thanks for looking into this! I wrote the .gitignore file myself based on the one I made for the Play Course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants