From bcddb04015141697bf907b85168150dcc177dd5f Mon Sep 17 00:00:00 2001 From: Kristian Nedrevold Date: Fri, 10 Mar 2023 19:11:13 +0100 Subject: [PATCH 1/2] Added point about building native image with --no-fallback Toolkit will be great when building CLI applications as it adds pretty much all the functionality you might need. Native image is great for building CLI applications because of the quick startup. It does however not work with CE without the --no-fallback flag. To stop users being confused by the image not working with a not obvious error message I figure it would be good to add a quick little info at the bottom here. Can probably be moved to a separate page when the docs are more fleshed out. The text i stolen from the CE documentation https://typelevel.org/cats-effect/docs/core/native-image --- docs/index.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index ebfda99..5c8100c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -51,6 +51,10 @@ object Hello extends IOApp.Simple { def run = IO.println("Hello toolkit!") } ``` + +### Native Image +When building GraalVM Native Image the --no-fallback option is required, otherwise native-image will try searching a static reflection configuration for [this Enumeration method]. Thus using this flag is safe only if you're not using Enumerations in your codebase, see [this comment] for more info. + @:@ [Scala CLI]: https://scala-cli.virtuslab.org/ @@ -63,4 +67,7 @@ object Hello extends IOApp.Simple { [Http4s Ember Client]: https://http4s.org/v0.23/docs/client.html [Circe]: https://circe.github.io/circe/ [Decline Effect]: https://ben.kirw.in/decline/effect.html -[Munit Cats Effect]: https://github.com/typelevel/munit-cats-effect \ No newline at end of file +[Munit Cats Effect]: https://github.com/typelevel/munit-cats-effect + +[this Enumeration method]: https://github.com/scala/scala/blob/v2.13.8/src/library/scala/Enumeration.scala#L190-L215= +[this comment]: https://github.com/typelevel/cats-effect/issues/3051#issuecomment-1167026949 From e664cea4eeca1d7191419387b8cb9bd2dba25d76 Mon Sep 17 00:00:00 2001 From: Kristian Nedrevold Date: Fri, 10 Mar 2023 19:11:13 +0100 Subject: [PATCH 2/2] Added point about building native image with --no-fallback Toolkit will be great when building CLI applications as it adds pretty much all the functionality you might need. Native image is great for building CLI applications because of the quick startup. It does however not work with CE without the --no-fallback flag. To stop users being confused by the image not working with a not obvious error message I figure it would be good to add a quick little info at the bottom here. Can probably be moved to a separate page when the docs are more fleshed out. The text i stolen from the CE documentation https://typelevel.org/cats-effect/docs/core/native-image Fixed text position in index.md --- docs/index.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/index.md b/docs/index.md index 5c8100c..957af99 100644 --- a/docs/index.md +++ b/docs/index.md @@ -51,13 +51,15 @@ object Hello extends IOApp.Simple { def run = IO.println("Hello toolkit!") } ``` +@:@ ### Native Image -When building GraalVM Native Image the --no-fallback option is required, otherwise native-image will try searching a static reflection configuration for [this Enumeration method]. Thus using this flag is safe only if you're not using Enumerations in your codebase, see [this comment] for more info. -@:@ +When building GraalVM Native Image the --no-fallback option is required, otherwise native-image will try searching +a static reflection configuration for [this Enumeration method]. Thus using this flag is safe only if you're not using +Enumerations in your codebase, see [this comment] for more info. -[Scala CLI]: https://scala-cli.virtuslab.org/ +[Scala CLI]: https://scala-cli.virtuslab.org/_ [Scala Toolkit]: https://github.com/VirtusLab/toolkit [Cats]: https://typelevel.org/cats [Cats Effect]: https://typelevel.org/cats-effect @@ -70,4 +72,4 @@ When building GraalVM Native Image the --no-fallback option is required, otherwi [Munit Cats Effect]: https://github.com/typelevel/munit-cats-effect [this Enumeration method]: https://github.com/scala/scala/blob/v2.13.8/src/library/scala/Enumeration.scala#L190-L215= -[this comment]: https://github.com/typelevel/cats-effect/issues/3051#issuecomment-1167026949 +[this comment]: https://github.com/typelevel/cats-effect/issues/3051#issuecomment-1167026949 \ No newline at end of file