question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when building native image for application with pureconfig

See original GitHub issue

When I’m trying to build native image for scala application which contains pureconfig. I get the following waring

warning: unknown locality of class Lexample/Hello$anon$exportedReader$macro$16$1;, assuming class is not local. To remove the warning report an issue to the library or language author. The issue is caused by Lexample/Hello$anon$exportedReader$macro$16$1; which is not following the naming convention.

Which is shortly followed by the error:

[error] Parsing context:
[error] 	parsing example.Hello$anon$exportedReader$macro$16$1.inst$macro$1(Hello.scala:6)
[error] 	parsing example.Hello$.main(Hello.scala:6)
[error] 	parsing example.Hello.main(Hello.scala)
[error] 	parsing com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:147)
[error] 	parsing com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
[error] Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
[error] Error: Image build request failed with exit status 1
[error] java.lang.RuntimeException: Failed to run native-image, exit status: 1
[error] 	at scala.sys.package$.error(package.scala:26)
[error] 	at com.typesafe.sbt.packager.graalvmnativeimage.GraalVMNativeImagePlugin$.$anonfun$projectSettings$3(GraalVMNativeImagePlugin.scala:52)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error] 	at sbt.std.Transform$$anon$4.work(System.scala:67)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] 	at sbt.Execute.work(Execute.scala:278)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[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)

I prepared minimal test case project, where I have the instruction how to reproduce the issue https://github.com/CucumisSativus/pureconfig-nativeimage

Please let me know if I can assist you somehow with reproducing or fixing this issue.

Thanks in advance for handling it!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jcazevedocommented, Aug 13, 2019

No trouble at all! Thanks for the help @lbialy!

1reaction
CucumisSativuscommented, Aug 13, 2019

Thanks a lot for your help @lbialy.

@jcazevedo im closing this issue since its not related to pureconfig. Sorry for the trouble I caused

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building native images and compiling with GraalVM and sbt
GraalVM promises a significant speedup in compile times and as I am working with Scala, which is notoriously known for its long compile...
Read more >
4 Easy steps to load configuration with pure-config
Type supported by pure config: Error Handling: Sample Application for Pure Config: Build.sbt: Application.conf: Config Extractor: ...
Read more >
Error Handling - PureConfig
PureConfig features a rich error model used on reading operations. Most PureConfig methods that read Scala types from configurations return a ConfigReader.
Read more >
7mind/izumi - Gitter
Hi good Izumi folks! I'm bumping versions in my application (ZIO+Http4s+Tapir+Distage) and got some problems. I saw that Cats effect 3 is not...
Read more >
pureconfig / pureconfig Download - JitPack
pureconfig /pureconfig ... Add it in your root build.gradle at the end of repositories: ... or JSON to native Scala classes in a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found