Last week I worked on these two issues.
- Changing the default value of ignorePeerDependencies to true
- Improve the build-distro command by allowing per-version customization
So let's dive into the details.
Changing the default value of ignorePeerDependencies to true
As you know, we had an error with building the O3 frontend. You could refresh your memory by reading this talk post: Cannot Build the O3 Reference UI
So to mitigate this, I added a maven parameter that allows users to ignore legacy peer dependencies: https://github.com/openmrs/openmrs-sdk/commit/8e9f5cc57f24dc2714f128cf78d3b5569ab34844.
As explained by Ian Bacher in this talk post, we need the legacy-peer-deps flag when using any version of NPM 7 or newer.
Therefore, I made the default value of ignorePeerDependencies to be true.
This change led to some test errors, which I promptly addressed by setting the ignorePeerDependencies parameter to "false" in those tests.
The changes were successfully merged into the OpenMRS master branch. You can find the commit here: Changing the default value of ignorePeerDependencies to true(#243)
Improve the build-distro command by allowing per-version customization
The next objective in my GSOC project is to enhance the build-distro and setup commands by enabling per-version customizations. The idea is to automatically select the appropriate Java version (Java 8 or Java 11) based on the OpenMRS version being used.
To achieve this, I followed the approach mentioned in the previous blog post:
Added Java 8 and 11 Docker files to the build-distro plugin's resources.
Implemented version-based selection: During the build process, the SDK determines the OpenMRS version being used. For versions between 2.0 and 2.3 (inclusive), the SDK defaults to generating Docker images based on Java 8. For versions 2.4 and newer, the SDK uses Java 11 as the base image for Docker images.
I created a pull request for this improvement, and you can find here: SDK-319: Improve the build-distro command by allowing per-version cutomizations. #244
My main focus this week will be on addressing mentor feedback and finalizing this pull request. Thank you for reading, and I'll keep you updated on further developments.