JakeWharton / picnic

A Kotlin DSL and Java/Kotlin builder API for constructing HTML-like tables which can be rendered to text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0.3.0 introduced an undocumented dependency on java8 - String.

johnLegasse opened this issue · comments

0.3.0 specifically commit: 2ef687d
introduced a dependency on java8 String

I was using the lib inside an android application (mainly running on android6 devices).
project is setup:

  • with Java source/target compatibility 8
  • kotlin jvm target 8

Project compile without any issue or warning but the app ultimately crash when invoking the codePoints method.

E java.lang.NoSuchMethodError: No virtual method codePoints()Ljava/util/stream/IntStream; in class Ljava/lang/String; or its super classes (declaration of 'java.lang.String' appears in /system/framework/core-libart.jar) E at com.jakewharton.picnic.SimpleLayout.draw(textLayout.kt:62) E at com.jakewharton.picnic.TextRendering.render(textRender.kt:314) E at com.jakewharton.picnic.TextRendering.render$default(textRender.kt:16)

Can I inquire as to what you're using it for on Android?

I'll look into fixing this though.

Short answer: cause it's pretty.
Bit longer:
It is used when debugging android devices, soft&hardware (custom hardware, custom android, Gafam less, no external services which means no firebase/sentry etc)
Instead of having probes listening to basically every android event (only some), I rely on the logcat which is already a collector for most of them.
The logcat is either snapshotted or streamed to a log server and then analyzed by a support agent.
When running in debug/trace mode, apps need to be as explicit as they could and preferably output something as easy to read and process.
eg: an anti virus scan, printing a beautiful table with the global stats and another with statistics per path, beautiful tree instead of hundred of line sequentially printed.

Released 0.3.1 with the fix. Might take an hour to show up on Maven central.

perfect !
thank you