I created a new ticket to update the SDK to use the new Java Date and Time API: [SDK-309] Switching to the new Date and Time API - OpenMRS Issues
I created a new ticket to refactor the SDK to use Java 8 Optional class: [SDK-311] Using Java 8 Optional Class - OpenMRS Issues
I created a ticket and PR for Upgrading the SDK Maven plugins to the latest version of Maven to improve their reliability and performance.
ticket: [SDK-314] Updating maven plugins to the latest versions - OpenMRS Issues
I created a ticket for enhancing the documentation system for all plugins: [SDK-315] Enhance the documentation system for all plugins - OpenMRS Issues
I created a new ticket to enable deploying O3 from build-distro plugin: [SDK-316] Enable deploying O3 from build-distro plugin - OpenMRS Issues
I created a PR for this. Please review it: SDK-316: Enable deploying O3 from build-distro plugin by wikumChamith · Pull Request #234 · openmrs/openmrs-sdk · GitHub
I created a ticket for the objective “Improve the build-distro and setup commands by allowing per-version customizations”: [SDK-319] Improve the build-distro and setup commands by allowing per-version customizations. - OpenMRS Issues
I am getting an empty suggested version list for the platform. When debugging the code I noticed that we are getting an empty list for Artifact(SDKConstants.PLATFORM_ARTIFACT_ID,SDKConstants.SETUP_DEFAULT_PLATFORM_VERSION, Artifact.GROUP_DISTRO)
(org.openmrs.distro:platform:1.11.5)
with this method: https://github.com/openmrs/openmrs-sdk/blob/154ddbffdf97a72e09813c60ad73e2f08e5a55bd/sdk-commons/src/main/java/org/openmrs/maven/plugins/utility/VersionsHelper.java#L52
Is this common for everyone??
Logs: logs - Pastebin.com
We’re currently experiencing issues with our Maven repo.
Now it is working correctly.
Here is the PR for this: SDK-319: Improve the build-distro command by allowing per-version cutomizations. by wikumChamith · Pull Request #244 · openmrs/openmrs-sdk · GitHub
@ibacher I have some concerns on this PR: SDK-319: Improve the build-distro command by allowing per-version cutomizations. by wikumChamith · Pull Request #244 · openmrs/openmrs-sdk · GitHub. Could you check it??
Setting up O3 with the SDK is problematic when the file path contains spaces, triggering the following error: spaces error - Pastebin.com
This becomes problematic when usernames or server names involve spaces. I modified the code to replace spaces with escape characters.
nodeHelper.runNpx(
String.format(
"%s build --target %s --build-config %s",
program,
buildTargetDir.getAbsolutePath().replace(" ", "\\ "),
spaConfigFile.getAbsolutePath().replace(" ", "\\ ")
),
legacyPeerDeps
);
This generates a command like the one below:
npm --cache=/tmp/openmrs-sdk-node12429853391947426928/npm-cache exec -- openmrs@next build --target /home/wikum/openmrs/server\ 20/frontend --build-config /home/wikum/openmrs/server\ 20/spa-build-config.json
the command works fine when entered directly in the terminal, but when it’s run through the SDK, it leads to an error: npm error - Pastebin.com
Any insights or suggestions to fix this issue?
Instead of trying to escape the spaces, I’d just wrap the parameters in double-quotes, e.g., \"%s\"
. The \
to escape spaces is basically functionality provided by the shell and not really well-handled outside of shell contexts. Quotes are more widely useable.
I also tried that but it gives a different error.
nodeHelper.runNpx(String.format("%s build --target \"%s\" --build-config \"%s\"", program, buildTargetDir, spaConfigFile), legacyPeerDeps);
error:
Running 'npm --cache=/tmp/openmrs-sdk-node5415753394153803303/npm-cache exec -- openmrs@next build --target "/home/wikum/openmrs/server 20/frontend" --build-config "/home/wikum/openmrs/server 20/spa-build-config.json"' in /home/wikum/Documents/GSOC/OpenMRS/GSOC-2023/openmrs-sdk
[INFO] [openmrs] ENOENT: no such file or directory, open '/home/wikum/Documents/GSOC/OpenMRS/GSOC-2023/openmrs-sdk/"/home/wikum/openmrs/server 20/spa-build-config.json"'
Full logs: [INFO] Scanning for projects...[INFO] ---------------------------------------- - Pastebin.com
Could we try updating the version of the frontend-maven-plugin? We’ve been pinned to an old version because newer versions require Java 8.
I updated the frontend-maven plugin to the latest version.
public static final String FRONTEND_PLUGIN_GROUP_ID = "com.github.eirslett";
public static final String FRONTEND_PLUGIN_ARTIFACT_ID = "frontend-maven-plugin";
public static final String FRONTEND_PLUGIN_VERSION = "1.13.4";
I am still getting this error:
[INFO] Running 'npm --cache=/tmp/openmrs-sdk-node4766700258631630847/npm-cache exec -- openmrs@next build --target "/home/wikum/openmrs/server 20/frontend" --build-config "/home/wikum/openmrs/server 20/spa-build-config.json"' in /home/wikum/Documents/GSOC/OpenMRS/GSOC-2023/openmrs-sdk
[INFO] [openmrs] ENOENT: no such file or directory, open '/home/wikum/Documents/GSOC/OpenMRS/GSOC-2023/openmrs-sdk/"/home/wikum/openmrs/server 20/spa-build-config.json"'
I think this just falls into the category of “we can’t support paths with spaces”.
Isn’t this going to be a problem for accounts that has space in the user name??