Skip to content

RDKEMW-3106 : Ensure modules path works in all environments #37

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

Closed
wants to merge 3 commits into from

Conversation

Sid2001-maker
Copy link
Contributor

RDKEMW-3106 : Ensure modules path works in all environments

Reason for change: Cleaned up the code
Test Procedure: build should be successful.
Risks: low
Priority: P2

sid-TEL and others added 3 commits June 16, 2025 18:20
Reason for change: Cleaned up the code
Test Procedure: build should be successful.
Risks: low
Priority: P2
@Sid2001-maker Sid2001-maker requested a review from a team as a code owner June 18, 2025 05:17
@CLAassistant
Copy link

CLAassistant commented Jun 18, 2025

CLA assistant check
All committers have signed the CLA.

else{
char* cwd = getcwd(nullptr,0);
std::string PWD=cwd;
if(PWD=="/package")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may need to remove this check and need to be done via JSruntimeLauncher by setting environment variable JSRUNTIME_MODULES_PATH=/runtime/modules

PWD = "/runtime";
}
sModulesPath=PWD+"/modules/";
setenv("JSRUNTIME_MODULES_PATH",sModulesPath.c_str(),1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to remove setenv also

@@ -75,9 +80,23 @@ void JavaScriptContextBase::registerCommonUtils()

std::string JavaScriptContextBase::readFile(const char *file)
{
std::ifstream src_file(file);
bool isModules = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to isModule

Copy link
Contributor

@madanagopalt madanagopalt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kindly look at comments

@Sid2001-maker Sid2001-maker deleted the topic/RDKEMW-3106 branch June 19, 2025 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants