Exclude logback-test.xml from published testing-utils library - #593
Exclude logback-test.xml from published testing-utils library#593mrdziuban wants to merge 1 commit into
logback-test.xml from published testing-utils library#593Conversation
|
✅ All required contributors have signed the CLA for this PR. Thank you! |
|
I have hereby read the Digital Asset CLA and agree to its terms |
andreaslochbihler-da
left a comment
There was a problem hiding this comment.
Dear @mrdziuban,
Thanks for this suggestion to move the logback-test.xml file. While this prevents the packaging of logback-test.xml, it also destroys the log config for all the tests. For example, if I run a unit test in the sbt shell prior to this PR, the logback-test.xml file ensures that the logs are written to log/canton-test.log. With this PR, this doesn't happen any more on my machine.
Can you look into why this is the case and figure out how to retain the old behavior?
f1d3d68 to
e648c1f
Compare
logback-test.xml to test scope so it's not included in the published librarylogback-test.xml from published testing-utils library
|
Thanks for taking a look @andreaslochbihler-da. I've updated this to keep |
Fixes canton-network/splice#5942. digital-asset#535 moved `community/util-observability/src/test/resources/logback-test.xml` to `base/testing-utils/src/main/resources/logback-test.xml`, resulting in `logback-test.xml` being bundled in the `com.daml::testing-utils` JAR file. This conflicts with the `logback-test.xml` in the splice repo (at `canton/community/util-observability/src/test/resources/logback-test.xml`) and causes logback to log warnings: ``` Resource [logback-test.xml] occurs multiple times on the classpath. Resource [logback-test.xml] occurs at [jar:file:/home/matt/.cache/coursier/v1/https/repo1.maven.org/maven2/com/daml/testing-utils_2.13/3.5.3/testing-utils_2.13-3.5.3.jar!/logback-test.xml] Resource [logback-test.xml] occurs at [file:/home/matt/Projects/splice/canton/community/util-observability/target/scala-2.13/test-classes/logback-test.xml] ``` This updates the `testing-utils` project to modify `Compile / packageBin / mappings` and exclude `logback-test.xml` from the published JAR. Signed-off-by: Matt Dziuban <mrdziuban@gmail.com>
e648c1f to
b4be0f2
Compare
|
Hi @andreaslochbihler-da, I just wanted to check back in on this -- would you mind taking another look when you have a chance? Thanks. |
Fixes canton-network/splice#5942.
#535 moved
community/util-observability/src/test/resources/logback-test.xmltobase/testing-utils/src/main/resources/logback-test.xml, resulting inlogback-test.xmlbeing bundled in thecom.daml::testing-utilsJAR file. This conflicts with thelogback-test.xmlin the splice repo (atcanton/community/util-observability/src/test/resources/logback-test.xml) and causes logback to log warnings:This updates the
testing-utilsproject to modifyCompile / packageBin / mappingsand excludelog back-test.xmlfrom the published JAR.