-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override engine and archive reader in canton jar used for testing #16667
Conversation
b8b58b1
to
0e5bf1c
Compare
daml-lf/integration-test/BUILD.bazel
Outdated
java_binary( | ||
name = "canton-test", | ||
main_class = "com.digitalasset.canton.CantonCommunityApp", | ||
visibility = ["//visibility:public"], | ||
runtime_deps = [ | ||
# Do not sort | ||
"//daml-lf/engine", | ||
"//daml-lf/archive:daml_lf_archive_reader", | ||
"@canton//:lib", | ||
], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The crux of the PR is here !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Love this. Patch that jar!
val cantonPath = rlocation( | ||
"external/canton/lib/canton-open-source-2.7.0-SNAPSHOT.jar" | ||
) | ||
val cantonPath = rlocation("daml-lf/integration-test:canton-test_deploy.jar") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! That saves me a job!!
0e5bf1c
to
306a6f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice lateral solution to the problem (even if it has some limitations).
306a6f9
to
024e6fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need this to be able to use daml-script for testing.
daml-lf/integration-test/BUILD.bazel
Outdated
java_binary( | ||
name = "canton-test", | ||
main_class = "com.digitalasset.canton.CantonCommunityApp", | ||
visibility = ["//visibility:public"], | ||
runtime_deps = [ | ||
# Do not sort | ||
"//daml-lf/engine", | ||
"//daml-lf/archive:daml_lf_archive_reader", | ||
"@canton//:lib", | ||
], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Love this. Patch that jar!
024e6fa
to
08bdb06
Compare
08bdb06
to
9a5d6a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks Remy!
val cantonPath = rlocation( | ||
"external/canton/lib/canton-open-source-2.7.0-SNAPSHOT.jar" | ||
) | ||
val jarPath = if (devMode) cantonDevPath else cantonPath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that devMode
gets into scope from import config._
But we can make a future PR to improve the clarity of this.
The PR creates a jar for canton where LF libraries is overrides for testing LF Dev.
In this PR, we distinguish test using the "hacked" canton jar (using the bazel tag
canton-dev
) from the one using the standard jar.Using infrastructure of #16765, we should be able to disable in case of breaking change in LF, and the automatically reenable those test canton have been updated with the change.