Replace Jackson serde (#10035)

JSON serialization setup between Language Server and Runtime is a major contributor to startup time. This PR experiments with an alternative implementation that remedies the problem.
The new serializer uses [jsoniter-scala](https://github.com/plokhotnyuk/jsoniter-scala) which by some accounts claims to be really fast. In our case, more importantly, we pay negligible cost of startup setup compared to Jackson which was horribly slow.

# Important Notes
Before:
![Screenshot from 2024-06-06 15-35-18](https://github.com/enso-org/enso/assets/292128/56103b82-777e-459f-966e-abdef25c2430)
After:
![Screenshot from 2024-06-06 15-35-02](https://github.com/enso-org/enso/assets/292128/00a36647-dfae-4dc8-a1b7-bf69069ef109)

Yes. About 0.8sec.
This commit is contained in:
Hubert Plociniczak 2024-06-11 17:03:12 +02:00 committed by GitHub
parent aaaebcabf8
commit 4da5e611c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
60 changed files with 526 additions and 1901 deletions

View File

@ -285,6 +285,7 @@ lazy val enso = (project in file("."))
`json-rpc-server`, `json-rpc-server`,
`language-server`, `language-server`,
`polyglot-api`, `polyglot-api`,
`polyglot-api-macros`,
`project-manager`, `project-manager`,
`syntax-rust-definition`, `syntax-rust-definition`,
`text-buffer`, `text-buffer`,
@ -480,11 +481,6 @@ val helidon = Seq(
// === Jackson ================================================================ // === Jackson ================================================================
val jacksonVersion = "2.15.2" val jacksonVersion = "2.15.2"
val jackson = Seq(
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-cbor" % jacksonVersion,
"com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion,
"com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonVersion
)
// === JAXB ================================================================ // === JAXB ================================================================
@ -563,6 +559,7 @@ val fansiVersion = "0.4.0"
val httpComponentsVersion = "4.4.1" val httpComponentsVersion = "4.4.1"
val apacheArrowVersion = "14.0.1" val apacheArrowVersion = "14.0.1"
val snowflakeJDBCVersion = "3.15.0" val snowflakeJDBCVersion = "3.15.0"
val jsoniterVersion = "2.28.5"
// ============================================================================ // ============================================================================
// === Utility methods ===================================================== // === Utility methods =====================================================
@ -1437,8 +1434,6 @@ lazy val `engine-common` = project
Test / fork := true, Test / fork := true,
commands += WithDebugCommand.withDebug, commands += WithDebugCommand.withDebug,
Test / envVars ++= distributionEnvironmentOverrides, Test / envVars ++= distributionEnvironmentOverrides,
Test / javaOptions ++= Seq(
),
libraryDependencies ++= Seq( libraryDependencies ++= Seq(
"org.graalvm.polyglot" % "polyglot" % graalMavenPackagesVersion % "provided" "org.graalvm.polyglot" % "polyglot" % graalMavenPackagesVersion % "provided"
) )
@ -1464,11 +1459,13 @@ lazy val `polyglot-api` = project
libraryDependencies ++= Seq( libraryDependencies ++= Seq(
"org.graalvm.sdk" % "polyglot-tck" % graalMavenPackagesVersion % "provided", "org.graalvm.sdk" % "polyglot-tck" % graalMavenPackagesVersion % "provided",
"org.graalvm.truffle" % "truffle-api" % graalMavenPackagesVersion % "provided", "org.graalvm.truffle" % "truffle-api" % graalMavenPackagesVersion % "provided",
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-macros" % jsoniterVersion,
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-core" % jsoniterVersion,
"io.circe" %% "circe-yaml" % circeYamlVersion % "provided", // as required by `pkg` and `editions`
"com.google.flatbuffers" % "flatbuffers-java" % flatbuffersVersion, "com.google.flatbuffers" % "flatbuffers-java" % flatbuffersVersion,
"org.scalatest" %% "scalatest" % scalatestVersion % Test, "org.scalatest" %% "scalatest" % scalatestVersion % Test,
"org.scalacheck" %% "scalacheck" % scalacheckVersion % Test "org.scalacheck" %% "scalacheck" % scalacheckVersion % Test
), ),
libraryDependencies ++= jackson,
GenerateFlatbuffers.flatcVersion := flatbuffersVersion, GenerateFlatbuffers.flatcVersion := flatbuffersVersion,
Compile / sourceGenerators += GenerateFlatbuffers.task Compile / sourceGenerators += GenerateFlatbuffers.task
) )
@ -1477,6 +1474,17 @@ lazy val `polyglot-api` = project
.dependsOn(`text-buffer`) .dependsOn(`text-buffer`)
.dependsOn(`logging-utils`) .dependsOn(`logging-utils`)
.dependsOn(testkit % Test) .dependsOn(testkit % Test)
.dependsOn(`polyglot-api-macros`)
lazy val `polyglot-api-macros` = project
.in(file("engine/polyglot-api-macros"))
.settings(
frgaalJavaCompilerSetting,
libraryDependencies ++= Seq(
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-core" % jsoniterVersion % "provided",
"com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-macros" % jsoniterVersion % "provided"
)
)
lazy val `language-server` = (project in file("engine/language-server")) lazy val `language-server` = (project in file("engine/language-server"))
.enablePlugins(JPMSPlugin) .enablePlugins(JPMSPlugin)

View File

@ -46,14 +46,14 @@ The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.fasterxml.jackson.core.jackson-databind-2.15.2`. Copyright notices related to this dependency can be found in the directory `com.fasterxml.jackson.core.jackson-databind-2.15.2`.
'jackson-dataformat-cbor', licensed under the The Apache Software License, Version 2.0, is distributed with the engine. 'jsoniter-scala-core_2.13', licensed under the MIT License, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.fasterxml.jackson.dataformat.jackson-dataformat-cbor-2.15.2`.
'jackson-module-scala_2.13', licensed under the The Apache Software License, Version 2.0, is distributed with the engine.
The license information can be found along with the copyright notices. The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `com.fasterxml.jackson.module.jackson-module-scala_2.13-2.15.2`. Copyright notices related to this dependency can be found in the directory `com.github.plokhotnyuk.jsoniter-scala.jsoniter-scala-core_2.13-2.28.5`.
'jsoniter-scala-macros_2.13', licensed under the MIT License, is distributed with the engine.
The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `com.github.plokhotnyuk.jsoniter-scala.jsoniter-scala-macros_2.13-2.28.5`.
'pureconfig-core_2.13', licensed under the Mozilla Public License, version 2.0, is distributed with the engine. 'pureconfig-core_2.13', licensed under the Mozilla Public License, version 2.0, is distributed with the engine.
@ -106,11 +106,6 @@ The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.monovore.decline_2.13-2.4.1`. Copyright notices related to this dependency can be found in the directory `com.monovore.decline_2.13-2.4.1`.
'paranamer', licensed under the BSD, is distributed with the engine.
The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `com.thoughtworks.paranamer.paranamer-2.8`.
'akka-actor-typed_2.13', licensed under the Apache-2.0, is distributed with the engine. 'akka-actor-typed_2.13', licensed under the Apache-2.0, is distributed with the engine.
The license file can be found at `licenses/APACHE2.0`. The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.typesafe.akka.akka-actor-typed_2.13-2.6.20`. Copyright notices related to this dependency can be found in the directory `com.typesafe.akka.akka-actor-typed_2.13-2.6.20`.

View File

@ -1,145 +0,0 @@
Here are people who have contributed to the development of Jackson JSON processor
binary data formats module
(version numbers in brackets indicate release in which the problem was fixed)
Tatu Saloranta (tatu.saloranta@iki.fi): author
--------------------------------------------------------------------------------
Credits for individual projects, since 2.8.0
--------------------------------------------------------------------------------
Michael Zeng (shotbythought@github)
* Contributed fix for #27: (protobuf) Fixed long deserialization problem for longs of ~13digit length
(2.8.2)
* Reported #58 (avro): Regression due to changed namespace of inner enum types
(2.8.8)
Kenji Noguchi (knoguchi@github)
* Reported #70 (protobuf), contributed fix: Can't deserialize packed repeated field
(2.8.9)
marsqing@github
* Reported #85: (protobuf) _decode32Bits() bug in ProtobufParser
(2.8.9)
* Reported #94: (protobuf) Should _ensureRoom in ProtobufGenerator.writeString()
(2.8.10)
* Reported #106 (protobuf), contributed fix for: calling _skipUnknownValue() twice
(2.8.11 / 2.9.1)
* Reported #116 (protobuf), contributed fix for: Should skip the positive byte
which is the last byte of an varint
(2.9.3)
* Reported #126, contributed fix for: always call checkEnd() when skip unknown field
(2.8.11 / 2.9.3)
baharclerode@github:
* Contributed #14 (avro): Add support for Avro annotations via `AvroAnnotationIntrospector`
(2.9.0)
* Contributed #15 (avro): Add a way to produce "file" style Avro output
(2.9.0)
* Contributed #57 (avro): Add support for @Stringable annotation
(2.9.0)
* Contributed #59 (avro): Add support for @AvroAlias annotation for Record/Enum name evolution
(2.9.0)
* Contributed #60 (avro): Add support for `@Union` and polymorphic types
(2.9.0)
Eldad Rudich (eldadru@github)
* Reported #68 (proto): Getting "type not supported as root type by protobuf" for serialization
of short and UUID types
(2.9.0)
philipa@github
* Reported #114 (cbor), contributed fix for: copyStructure(): avoid duplicate tags
when copying tagged binary
(2.9.3)
Jacek Lach (JacekLach@github)
* Reported #124: Invalid value returned for negative int32 where the absolute value is > 2^31 - 1
(2.9.3)
Leo Wang (wanglingsong@github)
* Reported #135: Infinite sequence of `END_OBJECT` tokens returned at end of streaming read
(2.9.6)
Michael Milkin (mmilkin@github)
* Reported, Contributed fix for #142: (ion) `IonParser.getNumberType()` returns `null`
for `IonType.FLOAT`
(2.9.7)
Guido Medina (guidomedina@github)
* Reported #153: (smile) Unable to set a compression input/output decorator to a `SmileFactory`
(2.9.8)
Alexander Cyon (Sajjon@github)
* Reported #159: (cbor) Some short UTF Strings encoded using non-canonical form
(2.9.9)
Łukasz Dziedziak (lukidzi@github)
* Reported, contributed fix for #161: (avro) Deserialize from newer version to older
one throws NullPointerException
(2.9.9)
Carter Kozak (cakofony@github)
* Reported, suggested fix for #155: Inconsistent support for FLUSH_PASSED_TO_STREAM
(2.10.0)
Fernando Raganhan Barbosa (raganhan@github)
* Suggested #163: (ion) Update `ion-java` dependency
(2.10.0)
Juliana Amorim (amorimjuliana@github)
* Reported #168: (avro) `JsonMappingException` for union types with multiple Record types
(2.10.0)
Marcos Passos (marcospassos@github)
* Contributed fix for #168: (avro) `JsonMappingException` for union types with multiple Record types
(2.10.0)
* Contributed fix for #173: (avro) Improve Union type serialization performance
(2.10.0)
* Contributed fix for #211: (avro) Fix schema evolution involving maps of non-scalar
(2.10.5)
* Contributed fix for #216: (avro) Avro null deserialization
(2.11.2)
* Contributed #219: Cache record names to avoid hitting class loader
(2.11.3)
John (iziamos@github)
* Reported, suggested fix for #178: Fix issue wit input offsets when parsing CBOR from `InputStream`
(2.10.0)
Paul Adolph (padolph@github)
* Reported #185: Internal parsing of tagged arrays can lead to stack overflow
(2.10.1)
Yanming Zhou (quaff@github)
* Reported #188: Unexpected `MismatchedInputException` for `byte[]` value bound to `String`
in collection/array
(2.10.1)
Zack Slayton (zslayton@github)
* Reported, contributed fix for #189: (ion) IonObjectMapper close()s the provided IonWriter unnecessarily
(2.10.2)
Binh Tran (ankel@github)
* Reported, contributed fix for #192: (ion) Allow `IonObjectMapper` with class name annotation introspector
to deserialize generic subtypes
(2.11.0)
Jonas Konrad (yawkat@github)
* Reported, contributed fix for #201: `CBORGenerator.Feature.WRITE_MINIMAL_INTS` does not write
most compact form for all integers
(2.11.0)
Michael Liedtke (mcliedtke@github)
* Contributed fix for #212: (ion) Optimize `IonParser.getNumberType()` using
`IonReader.getIntegerSize()`
(2.12.0)

View File

@ -1,8 +0,0 @@
This copy of Jackson JSON processor Scala module is licensed under the
Apache (Software) License, version 2.0 ("the License").
See the License for details about distribution rights, and the
specific rights regarding derivative works.
You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0

View File

@ -1 +0,0 @@
Copyright (c) 2011 ScalaStuff.org (joint venture of Alexander Dvorkovyy and Ruud Diterwich)

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Andriy Plokhotnyuk, and respective contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Andriy Plokhotnyuk, and respective contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,121 +0,0 @@
/*
* Copyright 2007 Paul Hammant
* Copyright 2013 Samuel Halliday
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
*
* Copyright (c) 2013 Stefan Fleiter
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/***
*
* Copyright (c) 2007 Paul Hammant
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/***
*
* Portions Copyright (c) 2007 Paul Hammant
* Portions copyright (c) 2000-2007 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/

View File

@ -51,14 +51,14 @@ The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.fasterxml.jackson.core.jackson-databind-2.15.2`. Copyright notices related to this dependency can be found in the directory `com.fasterxml.jackson.core.jackson-databind-2.15.2`.
'jackson-dataformat-cbor', licensed under the The Apache Software License, Version 2.0, is distributed with the project-manager. 'jsoniter-scala-core_2.13', licensed under the MIT License, is distributed with the project-manager.
The license file can be found at `licenses/APACHE2.0`. The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `com.fasterxml.jackson.dataformat.jackson-dataformat-cbor-2.15.2`. Copyright notices related to this dependency can be found in the directory `com.github.plokhotnyuk.jsoniter-scala.jsoniter-scala-core_2.13-2.28.5`.
'jackson-module-scala_2.13', licensed under the The Apache Software License, Version 2.0, is distributed with the project-manager. 'jsoniter-scala-macros_2.13', licensed under the MIT License, is distributed with the project-manager.
The license file can be found at `licenses/APACHE2.0`. The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `com.fasterxml.jackson.module.jackson-module-scala_2.13-2.15.2`. Copyright notices related to this dependency can be found in the directory `com.github.plokhotnyuk.jsoniter-scala.jsoniter-scala-macros_2.13-2.28.5`.
'pureconfig-core_2.13', licensed under the Mozilla Public License, version 2.0, is distributed with the project-manager. 'pureconfig-core_2.13', licensed under the Mozilla Public License, version 2.0, is distributed with the project-manager.
@ -86,11 +86,6 @@ The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.google.flatbuffers.flatbuffers-java-24.3.25`. Copyright notices related to this dependency can be found in the directory `com.google.flatbuffers.flatbuffers-java-24.3.25`.
'paranamer', licensed under the BSD, is distributed with the project-manager.
The license information can be found along with the copyright notices.
Copyright notices related to this dependency can be found in the directory `com.thoughtworks.paranamer.paranamer-2.8`.
'akka-actor-typed_2.13', licensed under the Apache-2.0, is distributed with the project-manager. 'akka-actor-typed_2.13', licensed under the Apache-2.0, is distributed with the project-manager.
The license file can be found at `licenses/APACHE2.0`. The license file can be found at `licenses/APACHE2.0`.
Copyright notices related to this dependency can be found in the directory `com.typesafe.akka.akka-actor-typed_2.13-2.6.20`. Copyright notices related to this dependency can be found in the directory `com.typesafe.akka.akka-actor-typed_2.13-2.6.20`.

View File

@ -1,145 +0,0 @@
Here are people who have contributed to the development of Jackson JSON processor
binary data formats module
(version numbers in brackets indicate release in which the problem was fixed)
Tatu Saloranta (tatu.saloranta@iki.fi): author
--------------------------------------------------------------------------------
Credits for individual projects, since 2.8.0
--------------------------------------------------------------------------------
Michael Zeng (shotbythought@github)
* Contributed fix for #27: (protobuf) Fixed long deserialization problem for longs of ~13digit length
(2.8.2)
* Reported #58 (avro): Regression due to changed namespace of inner enum types
(2.8.8)
Kenji Noguchi (knoguchi@github)
* Reported #70 (protobuf), contributed fix: Can't deserialize packed repeated field
(2.8.9)
marsqing@github
* Reported #85: (protobuf) _decode32Bits() bug in ProtobufParser
(2.8.9)
* Reported #94: (protobuf) Should _ensureRoom in ProtobufGenerator.writeString()
(2.8.10)
* Reported #106 (protobuf), contributed fix for: calling _skipUnknownValue() twice
(2.8.11 / 2.9.1)
* Reported #116 (protobuf), contributed fix for: Should skip the positive byte
which is the last byte of an varint
(2.9.3)
* Reported #126, contributed fix for: always call checkEnd() when skip unknown field
(2.8.11 / 2.9.3)
baharclerode@github:
* Contributed #14 (avro): Add support for Avro annotations via `AvroAnnotationIntrospector`
(2.9.0)
* Contributed #15 (avro): Add a way to produce "file" style Avro output
(2.9.0)
* Contributed #57 (avro): Add support for @Stringable annotation
(2.9.0)
* Contributed #59 (avro): Add support for @AvroAlias annotation for Record/Enum name evolution
(2.9.0)
* Contributed #60 (avro): Add support for `@Union` and polymorphic types
(2.9.0)
Eldad Rudich (eldadru@github)
* Reported #68 (proto): Getting "type not supported as root type by protobuf" for serialization
of short and UUID types
(2.9.0)
philipa@github
* Reported #114 (cbor), contributed fix for: copyStructure(): avoid duplicate tags
when copying tagged binary
(2.9.3)
Jacek Lach (JacekLach@github)
* Reported #124: Invalid value returned for negative int32 where the absolute value is > 2^31 - 1
(2.9.3)
Leo Wang (wanglingsong@github)
* Reported #135: Infinite sequence of `END_OBJECT` tokens returned at end of streaming read
(2.9.6)
Michael Milkin (mmilkin@github)
* Reported, Contributed fix for #142: (ion) `IonParser.getNumberType()` returns `null`
for `IonType.FLOAT`
(2.9.7)
Guido Medina (guidomedina@github)
* Reported #153: (smile) Unable to set a compression input/output decorator to a `SmileFactory`
(2.9.8)
Alexander Cyon (Sajjon@github)
* Reported #159: (cbor) Some short UTF Strings encoded using non-canonical form
(2.9.9)
Łukasz Dziedziak (lukidzi@github)
* Reported, contributed fix for #161: (avro) Deserialize from newer version to older
one throws NullPointerException
(2.9.9)
Carter Kozak (cakofony@github)
* Reported, suggested fix for #155: Inconsistent support for FLUSH_PASSED_TO_STREAM
(2.10.0)
Fernando Raganhan Barbosa (raganhan@github)
* Suggested #163: (ion) Update `ion-java` dependency
(2.10.0)
Juliana Amorim (amorimjuliana@github)
* Reported #168: (avro) `JsonMappingException` for union types with multiple Record types
(2.10.0)
Marcos Passos (marcospassos@github)
* Contributed fix for #168: (avro) `JsonMappingException` for union types with multiple Record types
(2.10.0)
* Contributed fix for #173: (avro) Improve Union type serialization performance
(2.10.0)
* Contributed fix for #211: (avro) Fix schema evolution involving maps of non-scalar
(2.10.5)
* Contributed fix for #216: (avro) Avro null deserialization
(2.11.2)
* Contributed #219: Cache record names to avoid hitting class loader
(2.11.3)
John (iziamos@github)
* Reported, suggested fix for #178: Fix issue wit input offsets when parsing CBOR from `InputStream`
(2.10.0)
Paul Adolph (padolph@github)
* Reported #185: Internal parsing of tagged arrays can lead to stack overflow
(2.10.1)
Yanming Zhou (quaff@github)
* Reported #188: Unexpected `MismatchedInputException` for `byte[]` value bound to `String`
in collection/array
(2.10.1)
Zack Slayton (zslayton@github)
* Reported, contributed fix for #189: (ion) IonObjectMapper close()s the provided IonWriter unnecessarily
(2.10.2)
Binh Tran (ankel@github)
* Reported, contributed fix for #192: (ion) Allow `IonObjectMapper` with class name annotation introspector
to deserialize generic subtypes
(2.11.0)
Jonas Konrad (yawkat@github)
* Reported, contributed fix for #201: `CBORGenerator.Feature.WRITE_MINIMAL_INTS` does not write
most compact form for all integers
(2.11.0)
Michael Liedtke (mcliedtke@github)
* Contributed fix for #212: (ion) Optimize `IonParser.getNumberType()` using
`IonReader.getIntegerSize()`
(2.12.0)

View File

@ -1,8 +0,0 @@
This copy of Jackson JSON processor Scala module is licensed under the
Apache (Software) License, version 2.0 ("the License").
See the License for details about distribution rights, and the
specific rights regarding derivative works.
You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0

View File

@ -1,29 +0,0 @@
------------------------
From file com/fasterxml/jackson/module/scala/introspect/BeanIntrospector.scala:
/*
* Derived from source code of scalabeans:
* https://raw.github.com/scalastuff/scalabeans/62b50c4e2482cbc1f494e0ac5c6c54fadc1bbcdd/src/main/scala/org/scalastuff/scalabeans/BeanIntrospector.scala
*
* The scalabeans code is covered by the copyright statement that follows.
*/
/*
* Copyright (c) 2011 ScalaStuff.org (joint venture of Alexander Dvorkovyy and Ruud Diterwich)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
------------------------

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Andriy Plokhotnyuk, and respective contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Andriy Plokhotnyuk, and respective contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,121 +0,0 @@
/*
* Copyright 2007 Paul Hammant
* Copyright 2013 Samuel Halliday
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
*
* Copyright (c) 2013 Stefan Fleiter
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/***
*
* Copyright (c) 2007 Paul Hammant
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/***
*
* Portions Copyright (c) 2007 Paul Hammant
* Portions copyright (c) 2000-2007 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/

View File

@ -13,10 +13,10 @@ import org.enso.logger.akka.ActorMessageLogging
import org.enso.logger.masking.ToLogString import org.enso.logger.masking.ToLogString
import org.enso.polyglot.runtime.Runtime import org.enso.polyglot.runtime.Runtime
import org.enso.polyglot.runtime.Runtime.{Api, ApiEnvelope} import org.enso.polyglot.runtime.Runtime.{Api, ApiEnvelope}
import org.enso.polyglot.runtime.serde.ApiSerde
import org.graalvm.polyglot.io.MessageEndpoint import org.graalvm.polyglot.io.MessageEndpoint
import java.nio.ByteBuffer import java.nio.ByteBuffer
import scala.util.{Failure, Success} import scala.util.{Failure, Success}
/** An actor managing a connection to Enso's runtime server. */ /** An actor managing a connection to Enso's runtime server. */
@ -90,7 +90,7 @@ final class RuntimeConnector(
context.stop(self) context.stop(self)
case msg: Runtime.ApiEnvelope => case msg: Runtime.ApiEnvelope =>
engine.sendBinary(Runtime.Api.serialize(msg)) engine.sendBinary(ApiSerde.serialize(msg))
msg match { msg match {
case Api.Request(Some(id), _) => case Api.Request(Some(id), _) =>
@ -178,7 +178,7 @@ object RuntimeConnector {
override def sendText(text: String): Unit = {} override def sendText(text: String): Unit = {}
override def sendBinary(data: ByteBuffer): Unit = override def sendBinary(data: ByteBuffer): Unit =
Runtime.Api.deserializeApiEnvelope(data) match { ApiSerde.deserializeApiEnvelope(data) match {
case Success(msg) => case Success(msg) =>
actor ! MessageFromRuntime(msg) actor ! MessageFromRuntime(msg)
case Failure(ex) => case Failure(ex) =>

View File

@ -0,0 +1,46 @@
package org.enso.polyglot.macros
import com.github.plokhotnyuk.jsoniter_scala.macros.CodecMakerConfig
import com.github.plokhotnyuk.jsoniter_scala.core.{
JsonReader,
JsonValueCodec,
JsonWriter
}
import java.io.File
object SerdeConfig {
/** Custom configuration for generating jsoniter's codecs.
*
* API data structures are recursive and have to be allowed explicitly.
* `skipNestedOptionValues` has to be enabled to workaround an apparent
* problem with nested option values present next to a single level option
* values (reported under https://github.com/plokhotnyuk/jsoniter-scala/issues/1146).
*/
val config = CodecMakerConfig
.withAllowRecursiveTypes(allowRecursiveTypes = true)
.withRequireCollectionFields(requireCollectionFields = true)
.withTransientEmpty(false)
.withSkipNestedOptionValues(true)
implicit val fileCodec: JsonValueCodec[File] = new JsonValueCodec[File] {
override def decodeValue(in: JsonReader, default: File): File = {
val t = in.nextToken()
if (t == 'n') in.readNullOrError(null, "expected 'null' or JSON value")
else {
in.rollbackToken()
val path = in.readString(null)
new File(path)
}
}
override def encodeValue(x: File, out: JsonWriter): Unit = {
if (x == null) out.writeNull()
else out.writeVal(x.getPath)
}
override def nullValue: File = null
}
}

View File

@ -1,29 +1,8 @@
package org.enso.polyglot package org.enso.polyglot
import com.fasterxml.jackson.annotation.{JsonSubTypes, JsonTypeInfo} import com.github.plokhotnyuk.jsoniter_scala.macros.named
/** The base trait for the documentation section. */ /** The base trait for the documentation section. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes(
Array(
new JsonSubTypes.Type(
value = classOf[DocSection.Tag],
name = "docsectionTag"
),
new JsonSubTypes.Type(
value = classOf[DocSection.Paragraph],
name = "docsectionParagraph"
),
new JsonSubTypes.Type(
value = classOf[DocSection.Keyed],
name = "docsectionKeyed"
),
new JsonSubTypes.Type(
value = classOf[DocSection.Marked],
name = "docsectionMarked"
)
)
)
sealed trait DocSection sealed trait DocSection
object DocSection { object DocSection {
@ -44,6 +23,7 @@ object DocSection {
* @param name the tag name * @param name the tag name
* @param body the tag text * @param body the tag text
*/ */
@named("docsecionTag")
case class Tag(name: String, body: String) extends DocSection case class Tag(name: String, body: String) extends DocSection
/** The paragraph of the text. /** The paragraph of the text.
@ -58,6 +38,7 @@ object DocSection {
* *
* @param body the elements that make up this paragraph * @param body the elements that make up this paragraph
*/ */
@named("docsecionParagraph")
case class Paragraph(body: String) extends DocSection case class Paragraph(body: String) extends DocSection
/** The section that starts with the key followed by the colon and the body. /** The section that starts with the key followed by the colon and the body.
@ -81,6 +62,7 @@ object DocSection {
* @param key the section key * @param key the section key
* @param body the elements the make up the body of the section * @param body the elements the make up the body of the section
*/ */
@named("docsecionKeyed")
case class Keyed(key: String, body: String) extends DocSection case class Keyed(key: String, body: String) extends DocSection
/** The section that starts with the mark followed by the header and the body. /** The section that starts with the mark followed by the header and the body.
@ -107,27 +89,11 @@ object DocSection {
* @param header the section header * @param header the section header
* @param body the elements that make up the body of the section * @param body the elements that make up the body of the section
*/ */
@named("docsecionMarked")
case class Marked(mark: Mark, header: Option[String], body: String) case class Marked(mark: Mark, header: Option[String], body: String)
extends DocSection extends DocSection
/** The base trait for the section marks. */ /** The base trait for the section marks. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes(
Array(
new JsonSubTypes.Type(
value = classOf[Mark.Important],
name = "docsectionMarkImportant"
),
new JsonSubTypes.Type(
value = classOf[Mark.Info],
name = "docsectionMarkInfo"
),
new JsonSubTypes.Type(
value = classOf[Mark.Example],
name = "docsectionMarkExample"
)
)
)
sealed trait Mark sealed trait Mark
object Mark { object Mark {
case class Important() extends Mark case class Important() extends Mark

View File

@ -1,28 +1,7 @@
package org.enso.polyglot package org.enso.polyglot
import com.fasterxml.jackson.annotation.{JsonSubTypes, JsonTypeInfo} import com.github.plokhotnyuk.jsoniter_scala.macros.named
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes(
Array(
new JsonSubTypes.Type(
value = classOf[ExportedSymbol.Module],
name = "exportedModule"
),
new JsonSubTypes.Type(
value = classOf[ExportedSymbol.Type],
name = "exportedType"
),
new JsonSubTypes.Type(
value = classOf[ExportedSymbol.Constructor],
name = "exportedConstructor"
),
new JsonSubTypes.Type(
value = classOf[ExportedSymbol.Method],
name = "exportedMethod"
)
)
)
sealed trait ExportedSymbol { sealed trait ExportedSymbol {
def module: String def module: String
@ -59,6 +38,7 @@ object ExportedSymbol {
* *
* @param module the module name * @param module the module name
*/ */
@named("exportedModule")
case class Module(module: String) extends ExportedSymbol { case class Module(module: String) extends ExportedSymbol {
/** @inheritdoc */ /** @inheritdoc */
@ -75,6 +55,7 @@ object ExportedSymbol {
* @param module the module defining this atom * @param module the module defining this atom
* @param name the type name * @param name the type name
*/ */
@named("exportedType")
case class Type(module: String, name: String) extends ExportedSymbol { case class Type(module: String, name: String) extends ExportedSymbol {
/** @inheritdoc */ /** @inheritdoc */
@ -87,6 +68,7 @@ object ExportedSymbol {
* @param module the module where this constructor is defined * @param module the module where this constructor is defined
* @param name the constructor name * @param name the constructor name
*/ */
@named("exportedConstructor")
case class Constructor(module: String, name: String) extends ExportedSymbol { case class Constructor(module: String, name: String) extends ExportedSymbol {
/** @inheritdoc */ /** @inheritdoc */
@ -99,6 +81,7 @@ object ExportedSymbol {
* @param module the module defining this method * @param module the module defining this method
* @param name the method name * @param name the method name
*/ */
@named("exportedMethod")
case class Method(module: String, name: String) extends ExportedSymbol { case class Method(module: String, name: String) extends ExportedSymbol {
/** @inheritdoc */ /** @inheritdoc */

View File

@ -1,6 +1,6 @@
package org.enso.polyglot package org.enso.polyglot
import com.fasterxml.jackson.annotation.{JsonIgnore, JsonSubTypes, JsonTypeInfo} import com.github.plokhotnyuk.jsoniter_scala.macros.named
import org.enso.logger.masking.ToLogString import org.enso.logger.masking.ToLogString
import java.util.UUID import java.util.UUID
@ -8,43 +8,6 @@ import java.util.UUID
import scala.collection.immutable.ListSet import scala.collection.immutable.ListSet
/** A search suggestion. */ /** A search suggestion. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes(
Array(
new JsonSubTypes.Type(
value = classOf[Suggestion.Module],
name = "suggestionModule"
),
new JsonSubTypes.Type(
value = classOf[Suggestion.Type],
name = "suggestionType"
),
new JsonSubTypes.Type(
value = classOf[Suggestion.Constructor],
name = "suggestionConstructor"
),
new JsonSubTypes.Type(
value = classOf[Suggestion.Getter],
name = "suggestionGetter"
),
new JsonSubTypes.Type(
value = classOf[Suggestion.DefinedMethod],
name = "suggestionDefinedMethod"
),
new JsonSubTypes.Type(
value = classOf[Suggestion.Conversion],
name = "suggestionConversion"
),
new JsonSubTypes.Type(
value = classOf[Suggestion.Function],
name = "suggestionFunction"
),
new JsonSubTypes.Type(
value = classOf[Suggestion.Local],
name = "suggestionLocal"
)
)
)
sealed trait Suggestion extends ToLogString { sealed trait Suggestion extends ToLogString {
def externalId: Option[Suggestion.ExternalID] def externalId: Option[Suggestion.ExternalID]
@ -243,6 +206,7 @@ object Suggestion {
* @param documentation the documentation string * @param documentation the documentation string
* @param reexports modules re-exporting this module * @param reexports modules re-exporting this module
*/ */
@named("suggestionModule")
case class Module( case class Module(
module: String, module: String,
documentation: Option[String], documentation: Option[String],
@ -295,6 +259,7 @@ object Suggestion {
* @param documentation the documentation string * @param documentation the documentation string
* @param reexports modules re-exporting this atom * @param reexports modules re-exporting this atom
*/ */
@named("suggestionType")
case class Type( case class Type(
externalId: Option[ExternalID], externalId: Option[ExternalID],
module: String, module: String,
@ -355,6 +320,7 @@ object Suggestion {
* @param annotations the list of annotations * @param annotations the list of annotations
* @param reexports modules re-exporting this atom * @param reexports modules re-exporting this atom
*/ */
@named("suggestionConstructor")
case class Constructor( case class Constructor(
externalId: Option[ExternalID], externalId: Option[ExternalID],
module: String, module: String,
@ -404,23 +370,6 @@ object Suggestion {
} }
/** Base trait for method suggestions. */ /** Base trait for method suggestions. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes(
Array(
new JsonSubTypes.Type(
value = classOf[Suggestion.Getter],
name = "suggestionMethodGetter"
),
new JsonSubTypes.Type(
value = classOf[Suggestion.DefinedMethod],
name = "suggestionMethodDefinedMethod"
),
new JsonSubTypes.Type(
value = classOf[Suggestion.Conversion],
name = "suggestionMethodConversion"
)
)
)
sealed trait Method extends Suggestion { sealed trait Method extends Suggestion {
def arguments: Seq[Argument] def arguments: Seq[Argument]
def selfType: String def selfType: String
@ -441,6 +390,7 @@ object Suggestion {
* @param annotations the list of annotations * @param annotations the list of annotations
* @param reexports modules re-exporting this method * @param reexports modules re-exporting this method
*/ */
@named("suggestionMethodGetter")
case class Getter( case class Getter(
externalId: Option[ExternalID], externalId: Option[ExternalID],
module: String, module: String,
@ -455,7 +405,6 @@ object Suggestion {
with ToLogString { with ToLogString {
/** @inheritdoc */ /** @inheritdoc */
@JsonIgnore
override def isStatic: Boolean = false override def isStatic: Boolean = false
override def withReexports(reexports: Set[String]): Suggestion = override def withReexports(reexports: Set[String]): Suggestion =
@ -507,6 +456,7 @@ object Suggestion {
* @param annotations the list of annotations * @param annotations the list of annotations
* @param reexports modules re-exporting this method * @param reexports modules re-exporting this method
*/ */
@named("suggestionMethodDefinedMethod")
case class DefinedMethod( case class DefinedMethod(
externalId: Option[ExternalID], externalId: Option[ExternalID],
module: String, module: String,
@ -568,6 +518,7 @@ object Suggestion {
* @param documentation the documentation string * @param documentation the documentation string
* @param reexports modules re-exporting this conversion * @param reexports modules re-exporting this conversion
*/ */
@named("suggestionMethodConversion")
case class Conversion( case class Conversion(
externalId: Option[ExternalID], externalId: Option[ExternalID],
module: String, module: String,
@ -579,15 +530,12 @@ object Suggestion {
) extends Method { ) extends Method {
/** @inheritdoc */ /** @inheritdoc */
@JsonIgnore
override def isStatic: Boolean = false override def isStatic: Boolean = false
/** @inheritdoc */ /** @inheritdoc */
@JsonIgnore
override def annotations: Seq[String] = Seq() override def annotations: Seq[String] = Seq()
/** @inheritdoc */ /** @inheritdoc */
@JsonIgnore
override def name: String = override def name: String =
Kind.Conversion.From Kind.Conversion.From
@ -636,6 +584,7 @@ object Suggestion {
* @param scope the scope where the function is defined * @param scope the scope where the function is defined
* @param documentation the documentation string * @param documentation the documentation string
*/ */
@named("suggestionFunction")
case class Function( case class Function(
externalId: Option[ExternalID], externalId: Option[ExternalID],
module: String, module: String,
@ -693,6 +642,7 @@ object Suggestion {
* @param scope the scope where the value is defined * @param scope the scope where the value is defined
* @param documentation the documentation string * @param documentation the documentation string
*/ */
@named("suggestionLocal")
case class Local( case class Local(
externalId: Option[ExternalID], externalId: Option[ExternalID],
module: String, module: String,

View File

@ -1,54 +1,25 @@
package org.enso.polyglot.data package org.enso.polyglot.data
import com.fasterxml.jackson.annotation.{JsonSubTypes, JsonTypeInfo}
import com.github.plokhotnyuk.jsoniter_scala.macros.named
/** An either-or-both data type. */ /** An either-or-both data type. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes(
Array(
new JsonSubTypes.Type(
value = classOf[These.Here[_]],
name = "theseHere"
),
new JsonSubTypes.Type(
value = classOf[These.There[_]],
name = "theseThere"
),
new JsonSubTypes.Type(
value = classOf[These.Both[_, _]],
name = "theseBoth"
)
)
)
sealed trait These[+A, +B] sealed trait These[+A, +B]
object These { object These {
@named("theseHere")
case class Here[+A]( case class Here[+A](
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.PROPERTY
)
here: A here: A
) extends These[A, Nothing] ) extends These[A, Nothing]
@named("theseThere")
case class There[+B]( case class There[+B](
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.PROPERTY
)
there: B there: B
) extends These[Nothing, B] ) extends These[Nothing, B]
@named("theseBoth")
case class Both[+A, +B]( case class Both[+A, +B](
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.PROPERTY
)
here: A, here: A,
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.PROPERTY
)
there: B there: B
) extends These[A, B] ) extends These[A, B]
} }

View File

@ -1,28 +1,12 @@
package org.enso.polyglot.data package org.enso.polyglot.data
import com.fasterxml.jackson.annotation.{JsonIgnore, JsonSubTypes, JsonTypeInfo}
import com.github.plokhotnyuk.jsoniter_scala.macros.named
import scala.collection.mutable import scala.collection.mutable
/** A rose-tree like data structure that distinguishes between root and node /** A rose-tree like data structure that distinguishes between root and node
* elements. * elements.
*/ */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXTERNAL_PROPERTY,
property = "type"
)
@JsonSubTypes(
Array(
new JsonSubTypes.Type(
value = classOf[Tree.Root[_]],
name = "treeRoot"
),
new JsonSubTypes.Type(
value = classOf[Tree.Node[_]],
name = "treeNode"
)
)
)
sealed trait Tree[+A] { sealed trait Tree[+A] {
/** Build a new tree by applying a function to all elements of this tree. /** Build a new tree by applying a function to all elements of this tree.
@ -30,7 +14,6 @@ sealed trait Tree[+A] {
* @param f the function to apply to each element * @param f the function to apply to each element
* @return the new tree after applying the function `f` to elements * @return the new tree after applying the function `f` to elements
*/ */
@JsonIgnore
final def map[B](f: A => B): Tree[B] = final def map[B](f: A => B): Tree[B] =
Tree.map(this)(f) Tree.map(this)(f)
@ -40,7 +23,6 @@ sealed trait Tree[+A] {
* @param f the partial function to apply * @param f the partial function to apply
* @return the result of running `f` on the first element it's defined for. * @return the result of running `f` on the first element it's defined for.
*/ */
@JsonIgnore
final def collectFirst[B](f: PartialFunction[A, B]): Option[B] = final def collectFirst[B](f: PartialFunction[A, B]): Option[B] =
Tree.collectFirst(this)(f) Tree.collectFirst(this)(f)
@ -50,7 +32,6 @@ sealed trait Tree[+A] {
* @return a new tree consisting of all elements of this tree that satisfy * @return a new tree consisting of all elements of this tree that satisfy
* the given predicate p. * the given predicate p.
*/ */
@JsonIgnore
final def filter(p: A => Boolean): Tree[A] = final def filter(p: A => Boolean): Tree[A] =
Tree.filter(this)(p) Tree.filter(this)(p)
@ -61,7 +42,6 @@ sealed trait Tree[+A] {
* @return the result of applying the fold operator f between all the * @return the result of applying the fold operator f between all the
* elements and `acc` * elements and `acc`
*/ */
@JsonIgnore
final def fold[B](acc: B)(f: (B, A) => B): B = final def fold[B](acc: B)(f: (B, A) => B): B =
Tree.fold(this, acc)(f) Tree.fold(this, acc)(f)
@ -70,7 +50,6 @@ sealed trait Tree[+A] {
* @param that the tree to join with * @param that the tree to join with
* @return the result of joining this and that trees * @return the result of joining this and that trees
*/ */
@JsonIgnore
final def zip[B](that: Tree[B]): Tree[These[A, B]] = final def zip[B](that: Tree[B]): Tree[These[A, B]] =
Tree.zip(this, that) Tree.zip(this, that)
@ -87,41 +66,32 @@ sealed trait Tree[+A] {
* @param p the predicate comparing the elements * @param p the predicate comparing the elements
* @return the result of joining this and that trees * @return the result of joining this and that trees
*/ */
@JsonIgnore
final def zipBy[B](that: Tree[B])(p: (A, B) => Boolean): Tree[These[A, B]] = final def zipBy[B](that: Tree[B])(p: (A, B) => Boolean): Tree[These[A, B]] =
Tree.zipBy(this, that)(p) Tree.zipBy(this, that)(p)
/** Check whether the tree is empty. */ /** Check whether the tree is empty. */
@JsonIgnore
final def isEmpty: Boolean = final def isEmpty: Boolean =
Tree.isEmpty(this) Tree.isEmpty(this)
/** Check whether the tree is not empty. */ /** Check whether the tree is not empty. */
@JsonIgnore
final def nonEmpty: Boolean = final def nonEmpty: Boolean =
!isEmpty !isEmpty
/** Convert tree to vector. */ /** Convert tree to vector. */
@JsonIgnore
final def toVector: Vector[A] = final def toVector: Vector[A] =
Tree.toVector(this) Tree.toVector(this)
} }
object Tree { object Tree {
@named("treeRoot")
case class Root[+A]( case class Root[+A](
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME
)
children: Vector[Node[A]] children: Vector[Node[A]]
) extends Tree[A] ) extends Tree[A]
@named("treeNode")
case class Node[+A]( case class Node[+A](
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME)
element: A, element: A,
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME
)
children: Vector[Node[A]] children: Vector[Node[A]]
) extends Tree[A] ) extends Tree[A]

View File

@ -1,7 +1,5 @@
package org.enso.polyglot.data package org.enso.polyglot.data
import com.fasterxml.jackson.annotation.JsonIgnore
import scala.collection.mutable import scala.collection.mutable
/** A collection that represents subsumption relationships between types. /** A collection that represents subsumption relationships between types.
@ -30,7 +28,6 @@ case class TypeGraph(
* *
* @param name the fully-qualified typename * @param name the fully-qualified typename
*/ */
@JsonIgnore
def insertWithoutParent(name: String): Unit = { def insertWithoutParent(name: String): Unit = {
parentLinks.update(name, Set()) parentLinks.update(name, Set())
} }
@ -40,7 +37,6 @@ case class TypeGraph(
* @param typeName the fully-qualified name of the type to set the parent for * @param typeName the fully-qualified name of the type to set the parent for
* @param parentName the fully-qualified name of the parent of `typeName` * @param parentName the fully-qualified name of the parent of `typeName`
*/ */
@JsonIgnore
def insert(typeName: String, parentName: String): Unit = { def insert(typeName: String, parentName: String): Unit = {
parentLinks.updateWith(typeName) { parentLinks.updateWith(typeName) {
case Some(parents) => Some(parents + parentName) case Some(parents) => Some(parents + parentName)
@ -57,7 +53,6 @@ case class TypeGraph(
* parents for * parents for
* @return the set of direct parents for `typeName` * @return the set of direct parents for `typeName`
*/ */
@JsonIgnore
def getDirectParents(typeName: String): Set[String] = { def getDirectParents(typeName: String): Set[String] = {
parentLinks.getOrElse(typeName, Set(defaultRootType)) parentLinks.getOrElse(typeName, Set(defaultRootType))
} }
@ -70,7 +65,6 @@ case class TypeGraph(
* @param typeName the fully-qualified type name for which to get the parents * @param typeName the fully-qualified type name for which to get the parents
* @return all parents of `typeName`, ordered by specificity * @return all parents of `typeName`, ordered by specificity
*/ */
@JsonIgnore
def getParents(typeName: String): List[String] = { def getParents(typeName: String): List[String] = {
var seenNodes: Set[String] = Set() var seenNodes: Set[String] = Set()

View File

@ -0,0 +1,40 @@
package org.enso.polyglot.runtime.serde
import org.enso.polyglot.runtime.Runtime.ApiEnvelope
import java.nio.ByteBuffer
import com.github.plokhotnyuk.jsoniter_scala.core.{
readFromByteBuffer,
writeToArray,
JsonValueCodec
}
import org.enso.polyglot.macros.SerdeConfig
import com.github.plokhotnyuk.jsoniter_scala.macros.JsonCodecMaker
import scala.util.Try
object ApiSerde {
import SerdeConfig._
implicit private val apiEnvelopeCodec: JsonValueCodec[ApiEnvelope] =
JsonCodecMaker.make[ApiEnvelope](config)
/** Serializes an ApiEnvelope into a byte buffer.
*
* @param message the message to serialize.
* @return the serialized version of the message.
*/
def serialize(message: ApiEnvelope): ByteBuffer = {
ByteBuffer.wrap(writeToArray(message))
}
/** Deserializes a byte buffer into an ApiEnvelope, which can be a Request
* or a Response.
*
* @param bytes the buffer to deserialize
* @return the deserialized message, if the byte buffer can be deserialized.
*/
def deserializeApiEnvelope(bytes: ByteBuffer): Try[ApiEnvelope] =
Try(readFromByteBuffer[ApiEnvelope](bytes))
}

View File

@ -0,0 +1,141 @@
package org.enso.polyglot.runtime.serde
import java.util.UUID
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
import org.enso.polyglot.Suggestion
import org.enso.polyglot.data.Tree
import org.enso.polyglot.runtime.Runtime.Api.SuggestionAction
import org.enso.polyglot.runtime.Runtime.{Api, ApiEnvelope}
class SerdeSpec extends AnyFlatSpec with Matchers {
it should "serialize and deserialize API messages in JSON" in {
val message: ApiEnvelope = Api.Response(
Api.SuggestionsDatabaseModuleUpdateNotification(
module = "Dummy",
actions = Vector.empty,
exports = Vector.empty,
updates = Tree.Root(
children = Vector(
Tree.Node(
element = Api.SuggestionUpdate(
suggestion = Suggestion
.Module("local.New_Project_1.Main", documentation = None),
action = SuggestionAction.Add()
),
children = Vector.empty
),
Tree.Node(
element = Api.SuggestionUpdate(
suggestion = Suggestion
.DefinedMethod(
externalId = Some(UUID.randomUUID()),
module = "local.New_Project_1.Main",
name = "main",
arguments = Seq.empty,
selfType = "local.New_Project_1.Main",
returnType = "Standard.Base.Any.Any",
isStatic = true,
documentation = None,
annotations = Seq.empty
),
action = SuggestionAction.Add()
),
children = Vector(
Tree.Node(
element = Api.SuggestionUpdate(
suggestion = Suggestion
.Local(
externalId = Some(UUID.randomUUID()),
module = "local.New_Project_1.Main",
name = "main",
returnType = "Standard.Base.Any.Any",
scope = Suggestion.Scope(
Suggestion.Position(0, 1),
Suggestion.Position(2, 3)
),
documentation = None
),
action = SuggestionAction.Add()
),
children = Vector.empty
),
Tree.Node(
element = Api.SuggestionUpdate(
suggestion = Suggestion
.Type(
externalId = Some(UUID.randomUUID()),
module = "Standard.Base.Data.Set",
name = "Set",
params = Seq(
Suggestion
.Argument("foo", "bar", true, false, None, None)
),
returnType = "Standard.Base.Data.Set.Set",
parentType = Some("Standard.Base.Any.Any"),
documentation =
Some(" An unordered collection of unique values"),
reexports = Set("foo")
),
action = SuggestionAction.Modify(documentation = Some(None))
),
children = Vector.empty
),
Tree.Node(
element = Api.SuggestionUpdate(
suggestion = Suggestion
.Type(
externalId = Some(UUID.randomUUID()),
module = "Standard.Base.Data.Vector",
name = "Set",
params = Seq(
Suggestion
.Argument("foo", "bar", true, false, None, None)
),
returnType = "Standard.Base.Data.Set.Set",
parentType = Some("Standard.Base.Any.Any"),
documentation =
Some(" An unordered collection of unique values"),
reexports = Set("foo")
),
action = SuggestionAction.Modify(
documentation = Some(None),
returnType = Some("foo")
)
),
children = Vector.empty
)
)
)
)
)
)
)
val d1 = ApiSerde.serialize(message)
val d2 = ApiSerde.deserializeApiEnvelope(d1).get
message should equal(d2)
val libLoaded =
Api.Response(
None,
Api.LibraryLoaded(
"Standard",
"Base",
"0.0.0-dev",
new java.io.File(
"enso/built-distribution/enso-engine-0.0.0-dev-linux-amd64/enso-0.0.0-dev/lib/Standard/Base/0.0.0-dev"
)
)
)
val e1 = ApiSerde.serialize(libLoaded)
val e2 = ApiSerde.deserializeApiEnvelope(e1).get
libLoaded should equal(e2)
}
}

View File

@ -5,6 +5,7 @@ import org.enso.lockmanager.client.{
RuntimeServerRequestHandler RuntimeServerRequestHandler
} }
import org.enso.polyglot.runtime.Runtime.{Api, ApiRequest, ApiResponse} import org.enso.polyglot.runtime.Runtime.{Api, ApiRequest, ApiResponse}
import org.enso.polyglot.runtime.serde.ApiSerde
import org.graalvm.polyglot.io.MessageEndpoint import org.graalvm.polyglot.io.MessageEndpoint
import java.nio.ByteBuffer import java.nio.ByteBuffer
@ -20,7 +21,7 @@ class Endpoint(handler: Handler)
*/ */
private val reverseRequestEndpoint = new RuntimeServerRequestHandler { private val reverseRequestEndpoint = new RuntimeServerRequestHandler {
override def sendToClient(request: Api.Request): Unit = override def sendToClient(request: Api.Request): Unit =
client.sendBinary(Api.serialize(request)) client.sendBinary(ApiSerde.serialize(request))
} }
var client: MessageEndpoint = _ var client: MessageEndpoint = _
@ -36,7 +37,7 @@ class Endpoint(handler: Handler)
* @param msg the message to send. * @param msg the message to send.
*/ */
def sendToClient(msg: Api.Response): Unit = def sendToClient(msg: Api.Response): Unit =
client.sendBinary(Api.serialize(msg)) client.sendBinary(ApiSerde.serialize(msg))
/** Sends a notification to the runtime. /** Sends a notification to the runtime.
* *
@ -54,7 +55,7 @@ class Endpoint(handler: Handler)
override def sendText(text: String): Unit = {} override def sendText(text: String): Unit = {}
override def sendBinary(data: ByteBuffer): Unit = override def sendBinary(data: ByteBuffer): Unit =
Api.deserializeApiEnvelope(data).foreach { ApiSerde.deserializeApiEnvelope(data).foreach {
case request: Api.Request => case request: Api.Request =>
handler.onMessage(request) handler.onMessage(request)
case response: Api.Response => case response: Api.Response =>

View File

@ -1,6 +1,5 @@
package org.enso.interpreter.instrument.job package org.enso.interpreter.instrument.job
import cats.implicits._
import com.oracle.truffle.api.TruffleLogger import com.oracle.truffle.api.TruffleLogger
import org.enso.common.CompilationStage import org.enso.common.CompilationStage
import org.enso.compiler.CompilerResult import org.enso.compiler.CompilerResult
@ -287,19 +286,24 @@ final class EnsureCompiledJob(
private def compile( private def compile(
module: Module module: Module
)(implicit ctx: RuntimeContext): Either[Throwable, CompilerResult] = )(implicit ctx: RuntimeContext): Either[Throwable, CompilerResult] =
Either.catchNonFatal { try {
val compilationStage = module.getCompilationStage val compilationStage = module.getCompilationStage
if (!compilationStage.isAtLeast(CompilationStage.AFTER_CODEGEN)) { if (!compilationStage.isAtLeast(CompilationStage.AFTER_CODEGEN)) {
ctx.executionService.getLogger ctx.executionService.getLogger
.log(Level.FINEST, s"Compiling ${module.getName}.") .log(Level.FINEST, s"Compiling ${module.getName}.")
val result = ctx.executionService.getContext.getCompiler val result = ctx.executionService.getContext.getCompiler
.run(module.asCompilerModule()) .run(module.asCompilerModule())
Right(
result.copy(compiledModules = result.copy(compiledModules =
result.compiledModules.filter(_.getName != module.getName) result.compiledModules.filter(_.getName != module.getName)
) )
)
} else { } else {
CompilerResult.empty Right(CompilerResult.empty)
} }
} catch {
case e: Throwable =>
Left(e)
} }
/** Apply pending edits to the file. /** Apply pending edits to the file.

View File

@ -1,74 +0,0 @@
package org.enso.compiler.test.context;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.module.scala.DefaultScalaModule;
import java.util.List;
import org.enso.interpreter.util.ScalaConversions;
import org.enso.polyglot.Suggestion;
import org.junit.Test;
import scala.Option;
public class JacksonTest {
@Test
public void testSerdeOfSuggestion() throws Exception {
Object shape =
new Suggestion.Module("SampleModule", Option.apply("doc"), ScalaConversions.set());
final ObjectMapper m = new ObjectMapper().registerModule(new DefaultScalaModule());
String result = m.writerWithDefaultPrettyPrinter().writeValueAsString(shape);
Suggestion suggestion = m.readerFor(Suggestion.class).readValue(result);
assertEquals("SampleModule", suggestion.name());
assertEquals("doc", suggestion.documentation().get());
assertEquals(Suggestion.Module.class, suggestion.getClass());
}
@Test
public void testArraySerdeOfSuggestion() throws Exception {
Object shape =
new Suggestion[] {
new Suggestion.Module("SampleModule", Option.apply("doc"), ScalaConversions.set())
};
final ObjectMapper m = new ObjectMapper().registerModule(new DefaultScalaModule());
String result = m.writerWithDefaultPrettyPrinter().writeValueAsString(shape);
var it = m.readerFor(Suggestion.class).readValues(result);
var suggestion = it.nextValue();
assertEquals(Suggestion.Module.class, suggestion.getClass());
if (suggestion instanceof Suggestion.Module module) {
assertEquals("SampleModule", module.name());
assertEquals("doc", module.documentation().get());
} else {
fail("Expecting Suggestion.Module: " + suggestion);
}
}
@Test
public void testRecordSerdeOfSuggestion() throws Exception {
Object shape =
new SuggestionCache(
11,
List.of(
new Suggestion.Module(
"SampleModule", Option.apply("doc"), ScalaConversions.set())));
final ObjectMapper m = new ObjectMapper().registerModule(new DefaultScalaModule());
String result = m.writerWithDefaultPrettyPrinter().writeValueAsString(shape);
var cache = (SuggestionCache) m.readerFor(SuggestionCache.class).readValue(result);
assertEquals("One suggestion", 1, cache.suggestions.size());
if (cache.suggestions().get(0) instanceof Suggestion.Module module) {
assertEquals("SampleModule", module.name());
assertEquals("doc", module.documentation().get());
} else {
fail("Expecting Suggestion.Module: " + cache);
}
}
public record SuggestionCache(
@JsonProperty("version") int version,
@JsonProperty("suggestions") List<Suggestion> suggestions) {}
}

View File

@ -5,6 +5,7 @@ import org.enso.distribution.locking.ThreadSafeLockManager
import org.enso.lockmanager.server.LockManagerService import org.enso.lockmanager.server.LockManagerService
import org.enso.polyglot.RuntimeServerInfo import org.enso.polyglot.RuntimeServerInfo
import org.enso.polyglot.runtime.Runtime.Api import org.enso.polyglot.runtime.Runtime.Api
import org.enso.polyglot.runtime.serde.ApiSerde
import org.graalvm.polyglot.io.{MessageEndpoint, MessageTransport} import org.graalvm.polyglot.io.{MessageEndpoint, MessageTransport}
import java.nio.ByteBuffer import java.nio.ByteBuffer
@ -46,13 +47,13 @@ class RuntimeServerEmulator(
private val connector = system.actorOf( private val connector = system.actorOf(
TestRuntimeServerConnector.props( TestRuntimeServerConnector.props(
lockManagerService, lockManagerService,
{ response => endpoint.sendBinary(Api.serialize(response)) } { response => endpoint.sendBinary(ApiSerde.serialize(response)) }
) )
) )
/** Sends a message to the runtime. */ /** Sends a message to the runtime. */
def sendToRuntime(msg: Api.Request): Unit = def sendToRuntime(msg: Api.Request): Unit =
endpoint.sendBinary(Api.serialize(msg)) endpoint.sendBinary(ApiSerde.serialize(msg))
/** Creates a [[MessageTransport]] that should be provided when building the /** Creates a [[MessageTransport]] that should be provided when building the
* context. * context.
@ -64,7 +65,7 @@ class RuntimeServerEmulator(
override def sendText(text: String): Unit = {} override def sendText(text: String): Unit = {}
override def sendBinary(data: ByteBuffer): Unit = { override def sendBinary(data: ByteBuffer): Unit = {
Api.deserializeApiEnvelope(data) match { ApiSerde.deserializeApiEnvelope(data) match {
case Success(request: Api.Request) => case Success(request: Api.Request) =>
connector ! request connector ! request
case Success(response: Api.Response) => case Success(response: Api.Response) =>

View File

@ -2,6 +2,7 @@ package org.enso.interpreter.caches;
import com.oracle.truffle.api.TruffleFile; import com.oracle.truffle.api.TruffleFile;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
@ -19,6 +20,8 @@ import org.enso.text.Hex;
final class CacheUtils { final class CacheUtils {
private CacheUtils() {} private CacheUtils() {}
private static int BUFFER_SIZE = 1024;
static Function<Object, Object> writeReplace(CompilerContext context, boolean keepUUIDs) { static Function<Object, Object> writeReplace(CompilerContext context, boolean keepUUIDs) {
return (obj) -> return (obj) ->
switch (obj) { switch (obj) {
@ -82,7 +85,14 @@ final class CacheUtils {
try { try {
var digest = messageDigest(); var digest = messageDigest();
for (var source : pkgSources) { for (var source : pkgSources) {
digest.update(source.file().readAllBytes()); byte[] buffer = new byte[BUFFER_SIZE];
try (InputStream is = source.file().newInputStream()) {
int read = is.read(buffer, 0, BUFFER_SIZE);
while (read > -1) {
digest.update(buffer, 0, read);
read = is.read(buffer, 0, BUFFER_SIZE);
}
}
} }
return Hex.toHexString(digest.digest()); return Hex.toHexString(digest.digest());
} catch (IOException ex) { } catch (IOException ex) {

View File

@ -1,145 +0,0 @@
Here are people who have contributed to the development of Jackson JSON processor
binary data formats module
(version numbers in brackets indicate release in which the problem was fixed)
Tatu Saloranta (tatu.saloranta@iki.fi): author
--------------------------------------------------------------------------------
Credits for individual projects, since 2.8.0
--------------------------------------------------------------------------------
Michael Zeng (shotbythought@github)
* Contributed fix for #27: (protobuf) Fixed long deserialization problem for longs of ~13digit length
(2.8.2)
* Reported #58 (avro): Regression due to changed namespace of inner enum types
(2.8.8)
Kenji Noguchi (knoguchi@github)
* Reported #70 (protobuf), contributed fix: Can't deserialize packed repeated field
(2.8.9)
marsqing@github
* Reported #85: (protobuf) _decode32Bits() bug in ProtobufParser
(2.8.9)
* Reported #94: (protobuf) Should _ensureRoom in ProtobufGenerator.writeString()
(2.8.10)
* Reported #106 (protobuf), contributed fix for: calling _skipUnknownValue() twice
(2.8.11 / 2.9.1)
* Reported #116 (protobuf), contributed fix for: Should skip the positive byte
which is the last byte of an varint
(2.9.3)
* Reported #126, contributed fix for: always call checkEnd() when skip unknown field
(2.8.11 / 2.9.3)
baharclerode@github:
* Contributed #14 (avro): Add support for Avro annotations via `AvroAnnotationIntrospector`
(2.9.0)
* Contributed #15 (avro): Add a way to produce "file" style Avro output
(2.9.0)
* Contributed #57 (avro): Add support for @Stringable annotation
(2.9.0)
* Contributed #59 (avro): Add support for @AvroAlias annotation for Record/Enum name evolution
(2.9.0)
* Contributed #60 (avro): Add support for `@Union` and polymorphic types
(2.9.0)
Eldad Rudich (eldadru@github)
* Reported #68 (proto): Getting "type not supported as root type by protobuf" for serialization
of short and UUID types
(2.9.0)
philipa@github
* Reported #114 (cbor), contributed fix for: copyStructure(): avoid duplicate tags
when copying tagged binary
(2.9.3)
Jacek Lach (JacekLach@github)
* Reported #124: Invalid value returned for negative int32 where the absolute value is > 2^31 - 1
(2.9.3)
Leo Wang (wanglingsong@github)
* Reported #135: Infinite sequence of `END_OBJECT` tokens returned at end of streaming read
(2.9.6)
Michael Milkin (mmilkin@github)
* Reported, Contributed fix for #142: (ion) `IonParser.getNumberType()` returns `null`
for `IonType.FLOAT`
(2.9.7)
Guido Medina (guidomedina@github)
* Reported #153: (smile) Unable to set a compression input/output decorator to a `SmileFactory`
(2.9.8)
Alexander Cyon (Sajjon@github)
* Reported #159: (cbor) Some short UTF Strings encoded using non-canonical form
(2.9.9)
Łukasz Dziedziak (lukidzi@github)
* Reported, contributed fix for #161: (avro) Deserialize from newer version to older
one throws NullPointerException
(2.9.9)
Carter Kozak (cakofony@github)
* Reported, suggested fix for #155: Inconsistent support for FLUSH_PASSED_TO_STREAM
(2.10.0)
Fernando Raganhan Barbosa (raganhan@github)
* Suggested #163: (ion) Update `ion-java` dependency
(2.10.0)
Juliana Amorim (amorimjuliana@github)
* Reported #168: (avro) `JsonMappingException` for union types with multiple Record types
(2.10.0)
Marcos Passos (marcospassos@github)
* Contributed fix for #168: (avro) `JsonMappingException` for union types with multiple Record types
(2.10.0)
* Contributed fix for #173: (avro) Improve Union type serialization performance
(2.10.0)
* Contributed fix for #211: (avro) Fix schema evolution involving maps of non-scalar
(2.10.5)
* Contributed fix for #216: (avro) Avro null deserialization
(2.11.2)
* Contributed #219: Cache record names to avoid hitting class loader
(2.11.3)
John (iziamos@github)
* Reported, suggested fix for #178: Fix issue wit input offsets when parsing CBOR from `InputStream`
(2.10.0)
Paul Adolph (padolph@github)
* Reported #185: Internal parsing of tagged arrays can lead to stack overflow
(2.10.1)
Yanming Zhou (quaff@github)
* Reported #188: Unexpected `MismatchedInputException` for `byte[]` value bound to `String`
in collection/array
(2.10.1)
Zack Slayton (zslayton@github)
* Reported, contributed fix for #189: (ion) IonObjectMapper close()s the provided IonWriter unnecessarily
(2.10.2)
Binh Tran (ankel@github)
* Reported, contributed fix for #192: (ion) Allow `IonObjectMapper` with class name annotation introspector
to deserialize generic subtypes
(2.11.0)
Jonas Konrad (yawkat@github)
* Reported, contributed fix for #201: `CBORGenerator.Feature.WRITE_MINIMAL_INTS` does not write
most compact form for all integers
(2.11.0)
Michael Liedtke (mcliedtke@github)
* Contributed fix for #212: (ion) Optimize `IonParser.getNumberType()` using
`IonReader.getIntegerSize()`
(2.12.0)

View File

@ -1 +0,0 @@
The scalabeans code is covered by the copyright statement that follows.

View File

@ -1 +0,0 @@
Copyright (c) 2011 ScalaStuff.org (joint venture of Alexander Dvorkovyy and Ruud Diterwich)

View File

@ -0,0 +1 @@
/plokhotnyuk/jsoniter-scala/blob/master/LICENSE

View File

@ -0,0 +1 @@
/plokhotnyuk/jsoniter-scala/blob/master/LICENSE

View File

@ -1,60 +0,0 @@
/***
*
* Copyright (c) 2007 Paul Hammant
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/***
*
* Portions Copyright (c) 2007 Paul Hammant
* Portions copyright (c) 2000-2007 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/

View File

@ -1,9 +0,0 @@
1. Redistributions of source code must retain the above copyright
2. Redistributions in binary form must reproduce the above copyright
3. Neither the name of the copyright holders nor the names of its
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
Copyright (c) 2007 Paul Hammant
Copyright (c) 2009 Paul Hammant
Portions Copyright (c) 2007 Paul Hammant
Portions copyright (c) 2000-2007 INRIA, France Telecom
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

View File

@ -1,2 +0,0 @@
Copyright (c) 2013 Stefan Fleiter
Copyright 2013 Samuel Halliday

View File

@ -1,3 +1,3 @@
7255345E2327C888424E105C9BDCAC88093A45A99DAB595112AD9F277198A841 18BDE068A3B0348CA51E2E8ACD035F5FDE5ACABFBE472FC6E2DC0534E2008531
628AFF763350011A2AD598D7203867862925EC3FAB1F46CB86E95D21FFB52CC9 6BDC0CFBC6B989AB54B80972AA01FA38B296187CFEEB80A14B3DC14F99B64586
0 0

View File

@ -1,145 +0,0 @@
Here are people who have contributed to the development of Jackson JSON processor
binary data formats module
(version numbers in brackets indicate release in which the problem was fixed)
Tatu Saloranta (tatu.saloranta@iki.fi): author
--------------------------------------------------------------------------------
Credits for individual projects, since 2.8.0
--------------------------------------------------------------------------------
Michael Zeng (shotbythought@github)
* Contributed fix for #27: (protobuf) Fixed long deserialization problem for longs of ~13digit length
(2.8.2)
* Reported #58 (avro): Regression due to changed namespace of inner enum types
(2.8.8)
Kenji Noguchi (knoguchi@github)
* Reported #70 (protobuf), contributed fix: Can't deserialize packed repeated field
(2.8.9)
marsqing@github
* Reported #85: (protobuf) _decode32Bits() bug in ProtobufParser
(2.8.9)
* Reported #94: (protobuf) Should _ensureRoom in ProtobufGenerator.writeString()
(2.8.10)
* Reported #106 (protobuf), contributed fix for: calling _skipUnknownValue() twice
(2.8.11 / 2.9.1)
* Reported #116 (protobuf), contributed fix for: Should skip the positive byte
which is the last byte of an varint
(2.9.3)
* Reported #126, contributed fix for: always call checkEnd() when skip unknown field
(2.8.11 / 2.9.3)
baharclerode@github:
* Contributed #14 (avro): Add support for Avro annotations via `AvroAnnotationIntrospector`
(2.9.0)
* Contributed #15 (avro): Add a way to produce "file" style Avro output
(2.9.0)
* Contributed #57 (avro): Add support for @Stringable annotation
(2.9.0)
* Contributed #59 (avro): Add support for @AvroAlias annotation for Record/Enum name evolution
(2.9.0)
* Contributed #60 (avro): Add support for `@Union` and polymorphic types
(2.9.0)
Eldad Rudich (eldadru@github)
* Reported #68 (proto): Getting "type not supported as root type by protobuf" for serialization
of short and UUID types
(2.9.0)
philipa@github
* Reported #114 (cbor), contributed fix for: copyStructure(): avoid duplicate tags
when copying tagged binary
(2.9.3)
Jacek Lach (JacekLach@github)
* Reported #124: Invalid value returned for negative int32 where the absolute value is > 2^31 - 1
(2.9.3)
Leo Wang (wanglingsong@github)
* Reported #135: Infinite sequence of `END_OBJECT` tokens returned at end of streaming read
(2.9.6)
Michael Milkin (mmilkin@github)
* Reported, Contributed fix for #142: (ion) `IonParser.getNumberType()` returns `null`
for `IonType.FLOAT`
(2.9.7)
Guido Medina (guidomedina@github)
* Reported #153: (smile) Unable to set a compression input/output decorator to a `SmileFactory`
(2.9.8)
Alexander Cyon (Sajjon@github)
* Reported #159: (cbor) Some short UTF Strings encoded using non-canonical form
(2.9.9)
Łukasz Dziedziak (lukidzi@github)
* Reported, contributed fix for #161: (avro) Deserialize from newer version to older
one throws NullPointerException
(2.9.9)
Carter Kozak (cakofony@github)
* Reported, suggested fix for #155: Inconsistent support for FLUSH_PASSED_TO_STREAM
(2.10.0)
Fernando Raganhan Barbosa (raganhan@github)
* Suggested #163: (ion) Update `ion-java` dependency
(2.10.0)
Juliana Amorim (amorimjuliana@github)
* Reported #168: (avro) `JsonMappingException` for union types with multiple Record types
(2.10.0)
Marcos Passos (marcospassos@github)
* Contributed fix for #168: (avro) `JsonMappingException` for union types with multiple Record types
(2.10.0)
* Contributed fix for #173: (avro) Improve Union type serialization performance
(2.10.0)
* Contributed fix for #211: (avro) Fix schema evolution involving maps of non-scalar
(2.10.5)
* Contributed fix for #216: (avro) Avro null deserialization
(2.11.2)
* Contributed #219: Cache record names to avoid hitting class loader
(2.11.3)
John (iziamos@github)
* Reported, suggested fix for #178: Fix issue wit input offsets when parsing CBOR from `InputStream`
(2.10.0)
Paul Adolph (padolph@github)
* Reported #185: Internal parsing of tagged arrays can lead to stack overflow
(2.10.1)
Yanming Zhou (quaff@github)
* Reported #188: Unexpected `MismatchedInputException` for `byte[]` value bound to `String`
in collection/array
(2.10.1)
Zack Slayton (zslayton@github)
* Reported, contributed fix for #189: (ion) IonObjectMapper close()s the provided IonWriter unnecessarily
(2.10.2)
Binh Tran (ankel@github)
* Reported, contributed fix for #192: (ion) Allow `IonObjectMapper` with class name annotation introspector
to deserialize generic subtypes
(2.11.0)
Jonas Konrad (yawkat@github)
* Reported, contributed fix for #201: `CBORGenerator.Feature.WRITE_MINIMAL_INTS` does not write
most compact form for all integers
(2.11.0)
Michael Liedtke (mcliedtke@github)
* Contributed fix for #212: (ion) Optimize `IonParser.getNumberType()` using
`IonReader.getIntegerSize()`
(2.12.0)

View File

@ -1,28 +0,0 @@
------------------------
From file com/fasterxml/jackson/module/scala/introspect/BeanIntrospector.scala:
/*
* Derived from source code of scalabeans:
* https://raw.github.com/scalastuff/scalabeans/62b50c4e2482cbc1f494e0ac5c6c54fadc1bbcdd/src/main/scala/org/scalastuff/scalabeans/BeanIntrospector.scala
*
* The scalabeans code is covered by the copyright statement that follows.
*/
/*
* Copyright (c) 2011 ScalaStuff.org (joint venture of Alexander Dvorkovyy and Ruud Diterwich)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
------------------------

View File

@ -1,2 +0,0 @@
The scalabeans code is covered by the copyright statement that follows.
Copyright (c) 2011 ScalaStuff.org (joint venture of Alexander Dvorkovyy and Ruud Diterwich)

View File

@ -0,0 +1 @@
/plokhotnyuk/jsoniter-scala/blob/master/LICENSE

View File

@ -0,0 +1 @@
/plokhotnyuk/jsoniter-scala/blob/master/LICENSE

View File

@ -1,60 +0,0 @@
/***
*
* Copyright (c) 2007 Paul Hammant
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/***
*
* Portions Copyright (c) 2007 Paul Hammant
* Portions copyright (c) 2000-2007 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/

View File

@ -1,9 +0,0 @@
1. Redistributions of source code must retain the above copyright
2. Redistributions in binary form must reproduce the above copyright
3. Neither the name of the copyright holders nor the names of its
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
Copyright (c) 2007 Paul Hammant
Copyright (c) 2009 Paul Hammant
Portions Copyright (c) 2007 Paul Hammant
Portions copyright (c) 2000-2007 INRIA, France Telecom
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

View File

@ -1,2 +0,0 @@
Copyright (c) 2013 Stefan Fleiter
Copyright 2013 Samuel Halliday

View File

@ -1,3 +1,3 @@
ECE7DA5C5F2AA668330D02E802158890374B9E29D008A9752FDC31B97894A1DC 482FAAF233FCF62EB6FC44FEC957DC79001FF33F15D640C542A03482F452C982
9C894B66374B5FA85C5ACA368DAAA5934DD295F4233911B5A4CB2B6E46A100B4 707A702E516A641673B26AAD1F4BC35919B4DBB0C3E3D76BD032C3FF2A54A8D7
0 0