Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kicito
Copy link
Contributor

@kicito kicito commented Mar 3, 2025

This PR changes the following:

  • Changes all interpreter constructors from Inputstream & URI to ModuleSource, each wtith a specific implementation of additional paths to include when scanning for lib.
  • Adds new classes representing ModuleSource - InputstreamSource, and ProgramSource, to support different scenarios of interpreter creation.
  • Changes the default module lookup to cwd instead of the parent path of the parsing ModuleSource.
  • Encapsulate the ModuleSource creation into a static create method.

@mwallnoefer
Copy link
Member

Very good @kicito that you are trying to eliminate more deprecated (Java 20+) URL constructors.

@kicito
Copy link
Contributor Author

kicito commented Mar 3, 2025

Thank you, there are still some new URL around in cmdparser that I do not dare to touch yet. Windows seems to be not satisfied with it, though ;(

@fmontesi
Copy link
Member

fmontesi commented Mar 3, 2025

Yeah, Windows is tricky when it comes to URLs. :\ Let me know how you fare.

kicito added 2 commits March 4, 2025 22:51
attempt to fix windows

fix inputstreamsource

UriUtils covers more cases for constucting path

test windows fix

debug windows

debug windows

debug windows2

fix windows

Update pom.xml

restore changes

remove unused code
@kicito kicito force-pushed the feature/apply-modulesource branch from 1e21204 to a62633b Compare March 4, 2025 21:58
@kicito
Copy link
Contributor Author

kicito commented Mar 4, 2025

All right, after pingponging between linux and windows, the test now passes on all platforms. For cross-platform, I try to use URI for path-related Strings after the program passes cmdParser, which backfires when the program creates a new instance of olParser and cmdParser, specifically when parsing include or embed service before the modulesystem. A way forward for refactoring this is to decouple the cmdParser to a separate file, it does too much at the moment.

@fmontesi fmontesi merged commit b8f7c86 into jolie:master Mar 5, 2025
6 of 7 checks passed
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.

3 participants