scala-cli icon indicating copy to clipboard operation
scala-cli copied to clipboard

Update case-app to 2.1.0-M29

Open scala-steward opened this issue 1 year ago • 5 comments

About this PR

📦 Updates com.github.alexarchambault:case-app from 2.1.0-M28 to 2.1.0-M29

📜 GitHub Release Notes - Version Diff

Usage

Please merge!

I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.

If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.

Configure Scala Steward for your repository with a .scala-steward.conf file.

Have a fantastic day writing Scala!

⚙ Adjust future updates

Add this to your .scala-steward.conf file to ignore future updates of this dependency:

updates.ignore = [ { groupId = "com.github.alexarchambault", artifactId = "case-app" } ]

Or, add this to slow down future updates of this dependency:

dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "com.github.alexarchambault", artifactId = "case-app" }
}]
labels: library-update, early-semver-pre-release, semver-spec-pre-release, commit-count:1

scala-steward avatar Jun 15 '24 04:06 scala-steward

@alexarchambault @corey-at-protenus Do you have any idea what could be broken here? I'm currently suspecting the help (and thus, initialisation of sub-commands) is broken because of the changes in https://github.com/alexarchambault/case-app/pull/483, but I don't quite understand the root cause.

cli.tests.HelpCheck.help message should be shorter then 80 lines  0.163s java.lang.ExceptionInInitializerError: null
    at scala.cli.ScalaCliCommands.allCommands(ScalaCliCommands.scala:26)
    at scala.cli.ScalaCliCommands.commands(ScalaCliCommands.scala:67)
    at caseapp.core.app.CommandsEntryPoint.help(CommandsEntryPoint.scala:29)
    at scala.cli.ScalaCliCommands.help$lzyINIT1(ScalaCliCommands.scala:88)
    at scala.cli.ScalaCliCommands.help(ScalaCliCommands.scala:87)
    at cli.tests.HelpCheck.$init$$$anonfun$1(HelpCheck.scala:12)
    at munit.internal.console.StackTraces$.dropOutside(StackTraces.scala:12)
    at munit.ValueTransforms.$anonfun$3(ValueTransforms.scala:37)
    at scala.util.Try$.apply(Try.scala:217)
    at munit.ValueTransforms.munitValueTransform(ValueTransforms.scala:37)
    at munit.ValueTransforms.munitValueTransform$(ValueTransforms.scala:8)
    at munit.FunSuite.munitValueTransform(FunSuite.scala:11)
    at munit.BaseFunSuite.test$$anonfun$1$$anonfun$1(FunSuite.scala:37)
    at munit.internal.PlatformCompat$$anon$3.run(PlatformCompat.scala:69)
    at munit.Suite$$anon$1.execute(Suite.scala:28)
    at munit.internal.PlatformCompat$.waitAtMost(PlatformCompat.scala:74)
    at munit.BaseFunSuite.waitForCompletion(FunSuite.scala:51)
    at munit.BaseFunSuite.test$$anonfun$1(FunSuite.scala:37)
    at munit.MUnitRunner.$anonfun$6$$anonfun$1(MUnitRunner.scala:347)
    at munit.internal.console.StackTraces$.dropOutside(StackTraces.scala:12)
    at munit.MUnitRunner.$anonfun$6(MUnitRunner.scala:347)
    at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:470)
    at munit.Suite$$anon$1.execute(Suite.scala:28)
    at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:429)
    at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:338)
    at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:312)
    at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:176)
    at munit.MUnitRunner.runTestBody(MUnitRunner.scala:357)
    at munit.MUnitRunner.runTest(MUnitRunner.scala:324)
    at munit.MUnitRunner.runTests$$anonfun$1(MUnitRunner.scala:140)
    at scala.collection.Iterator$$anon$9.next(Iterator.scala:584)
    at munit.MUnitRunner.loop$1(MUnitRunner.scala:155)
    at munit.MUnitRunner.sequenceFutures(MUnitRunner.scala:168)
    at munit.MUnitRunner.runTests(MUnitRunner.scala:140)
    at munit.MUnitRunner.runAll$$anonfun$1(MUnitRunner.scala:188)
    at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:470)
    at munit.Suite$$anon$1.execute(Suite.scala:28)
    at scala.concurrent.impl.Promise$Transformation.submitWithValue(Promise.scala:429)
    at scala.concurrent.impl.Promise$DefaultPromise.submitWithValue(Promise.scala:338)
    at scala.concurrent.impl.Promise$DefaultPromise.dispatchOrAddCallbacks(Promise.scala:312)
    at scala.concurrent.impl.Promise$DefaultPromise.flatMap(Promise.scala:176)
    at munit.MUnitRunner.runAll(MUnitRunner.scala:194)
    at munit.MUnitRunner.runAsync(MUnitRunner.scala:126)
    at munit.MUnitRunner.run(MUnitRunner.scala:121)
    at munit.internal.junitinterface.JUnitRunnerWrapper.run(JUnitRunnerWrapper.java:24)
    ...
Caused by: java.lang.NullPointerException: Cannot invoke "caseapp.core.help.Help.progName()" because the return value of "caseapp.core.app.CaseApp.help()" is null
    at caseapp.core.app.CaseApp.name(CaseApp.scala:14)
    at scala.cli.commands.ScalaCommand.actualCommandName$$anonfun$2(ScalaCommand.scala:86)
    at scala.Option.getOrElse(Option.scala:201)
    at scala.cli.commands.ScalaCommand.actualCommandName(ScalaCommand.scala:86)
    at scala.cli.commands.ScalaCommand.<init>(ScalaCommand.scala:290)
    at scala.cli.commands.addpath.AddPath$.<init>(AddPath.scala:13)
    at scala.cli.commands.addpath.AddPath$.<clinit>(AddPath.scala:13)
    ... 65 more

Any clue?

Gedochao avatar Jun 25 '24 11:06 Gedochao

It seems the parser won't initialise if @Recurse is present...

Exception in thread "main" java.lang.NoClassDefFoundError: caseapp/Recurse$
        at scala.cli.commands.shared.LoggingOptions$.parser$lzyINIT1(LoggingOptions.scala:33)
        at scala.cli.commands.shared.LoggingOptions$.parser(LoggingOptions.scala:33)
        at scala.cli.commands.shared.GlobalOptions$.parser$lzyINIT1(GlobalOptions.scala:21)
        at scala.cli.commands.shared.GlobalOptions$.parser(GlobalOptions.scala:21)
        at scala.cli.commands.addpath.AddPathOptions$.parser$lzyINIT1(AddPathOptions.scala:19)
        at scala.cli.commands.addpath.AddPathOptions$.parser(AddPathOptions.scala:19)
        at scala.cli.commands.addpath.AddPath$.<init>(AddPath.scala:13)
        at scala.cli.commands.addpath.AddPath$.<clinit>(AddPath.scala:13)
        at scala.cli.ScalaCliCommands.allCommands(ScalaCliCommands.scala:26)
        at scala.cli.ScalaCliCommands.commands(ScalaCliCommands.scala:67)
        ...

Gedochao avatar Jun 25 '24 12:06 Gedochao

Interesting... I have not encountered this. Does look like an initialization order error. I can check it out once I'm back in the office.

On Tue, Jun 25, 2024, 06:03 Piotr Chabelski @.***> wrote:

It seems the parser won't initialise if @Recurse is present...

Exception in thread "main" java.lang.NoClassDefFoundError: caseapp/Recurse$ at scala.cli.commands.shared.LoggingOptions$.parser$lzyINIT1(LoggingOptions.scala:33) at scala.cli.commands.shared.LoggingOptions$.parser(LoggingOptions.scala:33) at scala.cli.commands.shared.GlobalOptions$.parser$lzyINIT1(GlobalOptions.scala:21) at scala.cli.commands.shared.GlobalOptions$.parser(GlobalOptions.scala:21) at scala.cli.commands.addpath.AddPathOptions$.parser$lzyINIT1(AddPathOptions.scala:19) at scala.cli.commands.addpath.AddPathOptions$.parser(AddPathOptions.scala:19) at scala.cli.commands.addpath.AddPath$.(AddPath.scala:13) at scala.cli.commands.addpath.AddPath$.(AddPath.scala:13) at scala.cli.ScalaCliCommands.allCommands(ScalaCliCommands.scala:26) at scala.cli.ScalaCliCommands.commands(ScalaCliCommands.scala:67) ...

— Reply to this email directly, view it on GitHub https://github.com/VirtusLab/scala-cli/pull/2964#issuecomment-2188756970, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVXQDVCJDXC4VIJ2CV7FDYTZJFMATAVCNFSM6AAAAABJLLHSTWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBYG42TMOJXGA . You are receiving this because you were mentioned.Message ID: @.***>

--

Warning: Email sent over the internet may not be secure. Information sent by email may not remain confidential. Do not include health information or other confidential personal information in an email without proper encryption security. This email may be used only in accordance with applicable laws. If you received this email in error, notify the sender and destroy the email and any attachments.

corey-at-protenus avatar Jun 26 '24 05:06 corey-at-protenus

Reproduced locally (This is @corey-at-protenus 's main account).

coreyoconnor avatar Jul 02 '24 00:07 coreyoconnor

Ok. There are other problems with recurse. Modifying the Formatter does not seem correct. I'll need a re-think on this feature. For now I propose reverting the prefix addition: https://github.com/alexarchambault/case-app/pull/555

coreyoconnor avatar Jul 04 '24 06:07 coreyoconnor

This PR can be closed. The update was included in #3152 :)

coreyoconnor avatar Sep 15 '24 17:09 coreyoconnor