-
Notifications
You must be signed in to change notification settings - Fork 247
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
Use local esm-patient-common-lib in E2E tests #1855
base: main
Are you sure you want to change the base?
Use local esm-patient-common-lib in E2E tests #1855
Conversation
aa6916e
to
d27a72e
Compare
d27a72e
to
dd27578
Compare
@brandones @ibacher @denniskigen @vasharma05 Any idea on how to include I'm trying to find a way to avoid situations like this: #1727 (comment) |
@@ -5,11 +5,13 @@ script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | |||
# create a temporary working directory | |||
working_dir=$(mktemp -d "${TMPDIR:-/tmp/}openmrs-e2e-frontends.XXXXXXXXXX") | |||
# get a list of all the apps in this workspace | |||
apps=$(yarn workspaces list --json | jq -r 'if ((.location == ".") or (.location | test("form-engine-app")) or (.location | test("-app") | not)) then halt else .name end') | |||
apps=$(yarn workspaces list --json | jq -r 'select((.location != ".") and (.location | test("form-engine-app") | not) and (.location | test("-app"))) | .name') |
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.
Ignore this line. Just simplified it to work on mac.
I worry this problem might actually be caused by non-determinism in webpack module federation resolution. This is an old problem. The gist is that each app has its own copy of esm-patient-common-lib, and the first app to load will have its copy loaded, and all other apps will just use that copy. So if the app you're working on loads first, you're good, but if some other app loads first, then your app will try to use the old version of esm-patient-common-lib and it will break. I'm not sure whether this is causing the problem or not. Here's the issue I made for it a long time ago. Actually it looks like I had a good idea about how to solve it, but we never implemented it. Messing with that stuff is challenging work. |
This might actually be easier to solve with module federation 2.0, since there's now a sane way to add plugins to the runtime, e.g., the resolveShare hook looks like it'd do the job. |
Requirements
Summary
Screenshots
Related Issue
Other