-
Notifications
You must be signed in to change notification settings - Fork 992
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
Fix: resolve our Clojure source dependencies first in the classpath #17919
Conversation
Jenkins BuildsClick to see older builds (12)
|
Weirdly, the CI failed
But locally it's fine. |
afe7572
to
629a5ef
Compare
Does this mean we overwrite
|
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.
A very good catch.
That's the confusing part that took me a long time to figure out @yqrashawn. We have many indirect dependencies, such as prismatic/schema (used by This problem does not exist if we call Even if we stop using bidi (and thus our indirect dependency on prismatic/schema) I think this PR is still a step in the right direction.
Yes, it means our src/* namespaces will be resolved before our direct and indirect dependencies. This problem is probably very rare in most Clojure projects because in those projects they always have a root namespace with the name of the product, which is hopefully unique. In |
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.
Thanks for the explanation, LGTM
629a5ef
to
c9c74e8
Compare
89% of end-end tests have passed
Failed tests (1)Click to expandClass TestActivityCenterContactRequestMultipleDevicePR:
Expected to fail tests (4)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityOneDeviceMerged:
Passed tests (40)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityMultipleDeviceMerged:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestActivityMultipleDevicePRTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestCommunityOneDeviceMerged:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestActivityMultipleDevicePR:
|
…17919) In PR #17867 we have a namespace named schema.core, but this namespace is taken by library prismatic/schema already (see https://github.com/plumatic/schema/tree/master/src/cljc/schema), a library used by our direct dependency on bidi 2.1.6. This leads to a broken build where the ClojureScript compiler reports undeclared vars (https://clojurescript.org/reference/compiler-options#warnings). We change the order Java resolves dependencies via the classpath mechanism. We now first resolve our own Clojure sources, and then project dependencies.
Summary
In the (currently open) malli PR #17867 (comment), @pavloburykh reported the PR build wasn't working and all e2e failed.
The root of the problem is that in our malli PR we have a namespace named
schema.core
, but this namespace is taken by libraryprismatic/schema
already (see source), a library used by our direct dependency onbidi 2.1.6
. This leads to a broken build where the ClojureScript compiler reports undeclared vars (https://clojurescript.org/reference/compiler-options#warnings).This PR changes the order Java resolves dependencies via the classpath mechanism. We now first resolve our own Clojure sources, and then project dependencies.
Note
I tested this solution is correct in this WIP commit bd5b69b, which I extracted for this new PR. Once this PR is merged, I'll remove the WIP commit from the malli PR and rebase from
develop
.Platforms
status: ready