Why json4s needs a Scala compiler as a runtime dependency

I found that using json4s native

    <dependency>
        <groupId>org.json4s</groupId>
        <artifactId>json4s-native_2.10</artifactId>
        <version>3.2.9</version>
    </dependency>

contains scalap and scala compiler dependencies.

Why is this needed?

Does it generate code on the fly at runtime?

Why doesn't he use macros that do this processing at compile time?

+4
source share
1 answer

The json4s people answered me in this issue with the following:

Since we need to read the byte code to find out information about scala primitives. This is more necessary at 2.9 than at 2.10

+3
source

Source: https://habr.com/ru/post/1546258/


All Articles