Skip to content
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

Merged
merged 1 commit into from
May 2, 2023

Conversation

remyhaemmerle-da
Copy link
Collaborator

@remyhaemmerle-da remyhaemmerle-da commented Apr 6, 2023

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.

@remyhaemmerle-da remyhaemmerle-da force-pushed the remy-lf-integration branch 2 times, most recently from b8b58b1 to 0e5bf1c Compare April 6, 2023 09:34
Comment on lines 52 to 62
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",
],
)
Copy link
Collaborator Author

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 !

Copy link
Contributor

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")
Copy link
Contributor

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!!

Copy link
Contributor

@carlpulley-da carlpulley-da left a 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).

Copy link
Contributor

@nickchapman-da nickchapman-da left a 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.

Comment on lines 52 to 62
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",
],
)
Copy link
Contributor

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!

@remyhaemmerle-da remyhaemmerle-da changed the base branch from main to remy-integration-test April 27, 2023 13:55
@remyhaemmerle-da remyhaemmerle-da marked this pull request as ready for review April 27, 2023 16:48
Base automatically changed from remy-integration-test to main April 27, 2023 20:26
Copy link
Contributor

@nickchapman-da nickchapman-da left a 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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants