Publish daml-lf encoder, parser and error-test-lib [KVL-1424] (#13730)

This commit is contained in:
Hubert Slojewski 2022-04-29 13:59:19 +02:00 committed by GitHub
parent eeeff66769
commit 281de9ac2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 1 deletions

View File

@ -25,6 +25,7 @@ da_scala_library(
"@maven//:org_scalaz_scalaz_core",
],
scalacopts = lf_scalacopts,
tags = ["maven_coordinates=com.daml:daml-lf-encoder:__VERSION__"],
visibility = ["//visibility:public"],
deps = [
"//daml-lf/archive:daml_lf_1.dev_archive_proto_java",

View File

@ -33,6 +33,11 @@ private[daml] object DamlLfEncoder extends App {
private def main() =
try {
System.err.println(
"Daml-LF encoder is designed for testing purpose only, and provided without any guarantee of stability."
)
val appArgs = parseArgs()
implicit val parserParameters: ParserParameters[this.type] =

View File

@ -11,6 +11,12 @@ import com.daml.lf.data.Ref.PackageId
import com.daml.lf.language.Ast.Package
import com.daml.lf.language.{LanguageMajorVersion, LanguageVersion}
/** The Daml-LF Encoder library can be used to build dar files directly from LF
* definitions without passing through Damlc.
*
* It is designed for testing only and provided without any guarantee.
* In particular future version can break the API without notice.
*/
// Important: do not use this in production code. It is designed for testing only.
object Encode {

View File

@ -17,6 +17,7 @@ da_scala_library(
"@maven//:org_scalaz_scalaz_core",
],
scalacopts = lf_scalacopts_stricter,
tags = ["maven_coordinates=com.daml:daml-lf-parser:__VERSION__"],
visibility = [
"//daml-lf:__subpackages__",
"//ledger:__subpackages__",

View File

@ -7,6 +7,12 @@ import com.daml.lf.data.Ref
import com.daml.lf.language.Ast.{Expr, Kind, Module, Type}
import com.daml.lf.language.LanguageVersion
/** The LF Parser library can be used to write Daml-LF Ast using a
* human-friendly syntax.
*
* It is designed for testing only and provided without any guarantee.
* In particular future version may introduce breaking change without notice.
*/
package object parser {
val defaultPackageId = Ref.PackageId.assertFromString("-pkgId-")

View File

@ -41,7 +41,6 @@ da_scala_library(
name = "error-test-utils",
srcs = glob(["src/test/utils/**/*.scala"]),
scala_deps = [],
tags = ["maven_coordinates=com.daml:error-test-package:__VERSION__"],
visibility = ["//:__subpackages__"],
deps = [
":error",
@ -62,6 +61,7 @@ da_scala_library(
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
],
tags = ["maven_coordinates=com.daml:error-test-lib:__VERSION__"],
visibility = ["//ledger:__subpackages__"],
deps = [
"//ledger/error",

View File

@ -17,6 +17,8 @@
type: jar-scala
- target: //daml-lf/data-scalacheck:data-scalacheck
type: jar-scala
- target: //daml-lf/encoder:encoder
type: jar-scala
- target: //daml-lf/engine:engine
type: jar-scala
- target: //daml-lf/interface:interface
@ -27,6 +29,8 @@
type: jar-scala
- target: //daml-lf/language:language
type: jar-scala
- target: //daml-lf/parser:parser
type: jar-scala
- target: //daml-lf/scenario-interpreter:scenario-interpreter
type: jar-scala
- target: //daml-lf/snapshot:snapshot_proto_jar
@ -251,5 +255,7 @@
type: jar-scala
- target: //ledger/error:error
type: jar-scala
- target: //ledger/error:error-test-lib
type: jar-scala
- target: //ledger/error/generator:lib
type: jar-scala