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

Fix case-app initialization #195

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

Gedochao
Copy link
Contributor

@Gedochao Gedochao commented Nov 22, 2024

This fixes the scala-packager CLI failing on init with:

[error] java.lang.NullPointerException: Cannot invoke "caseapp.core.help.Help.progName()" because the return value of "caseapp.core.app.CaseApp.help()" is null
[error] 	at caseapp.core.app.CaseApp.name(CaseApp.scala:[14](https://github.com/VirtusLab/scala-packager/actions/runs/11972808082/job/33380448142?pr=195#step:6:15))
[error] 	at caseapp.core.app.Command.names(Command.scala:9)
[error] 	at caseapp.core.commandparser.RuntimeCommandParser$.$anonfun$commandMap$1(RuntimeCommandParser.scala:30)
[error] 	at scala.collection.immutable.List.flatMap(List.scala:294)
[error] 	at scala.collection.immutable.List.flatMap(List.scala:79)
[error] 	at caseapp.core.commandparser.RuntimeCommandParser$.commandMap(RuntimeCommandParser.scala:29)
[error] 	at caseapp.core.commandparser.RuntimeCommandParser$.parse(RuntimeCommandParser.scala:47)
[error] 	at caseapp.core.app.CommandsEntryPoint.main(CommandsEntryPoint.scala:369)
[error] 	at packager.cli.PackagerCli.main(PackagerCli.scala)
[error] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[error] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] 	at java.base/java.lang.reflect.Method.invoke(Method.java:569)

We'll also run the CLI straight from SBT on the CI as a sanity check (the actual integration checks are in the Scala CLI repo, but we do need a sanity check here).

@Gedochao Gedochao marked this pull request as ready for review November 22, 2024 12:48
@Gedochao Gedochao merged commit ef7a6fd into VirtusLab:main Nov 22, 2024
5 checks passed
@Gedochao Gedochao deleted the maintenance/fix-case-app branch November 22, 2024 12:50
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.

1 participant