Skip to content
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

Native image - Correct Windows paths in resources #31308

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
public class ResourceHelper {

public static void registerResources(String resource) {
resource = resource.replace('\\', '/')); // correct Windows paths
Copy link
Member

Choose a reason for hiding this comment

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

this probably fixes it but why is the resource using non portable paths to begin with? should be platform neutral before it gets here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, this doesn't seem right. We should tackle this earlier. At this point the path has already been written by Quarkus to a txt file and parsed in the wrong format.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You guys are the experts 😄

Copy link
Member

Choose a reason for hiding this comment

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

@zakkak will you have a look at this issue?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, but the sooner I will probably be able to have a look at it will be late next week.

In the meantime, #31185 is now merged, @melloware could you please confirm the issue is still present in Quarkus main?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am running on 2.16.3 not on SNAPSHOT so I have not confirmed it in main yet. Will try to get to it.

Version currentGraalVmVersion = Version.getCurrent();
if (currentGraalVmVersion.compareTo(22, 3) >= 0) {
// Use the public API RuntimeResourceAccess with GraalVM >= 22.3