Skip to content

Properly transcode absolute LoadDLL paths for WINE #1974

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

Merged
merged 3 commits into from
May 31, 2023

Conversation

angerman
Copy link
Collaborator

We have this sub-protocol in the iserv-proxy (which follows the sub-TH protocol). The design is horrendous, and needs to be rethought. The issue we were seeing is that we started the sub-protocol, because a path looked like it was absolute, however on the receiving end (windows), the path /foo/bar/baz, is not an absolute windows path. Thus the corresponding branch dealing with the sub-protocol was not taken and we were stuck with messages sent for the primary protocol, and not understood by the sub-protocol.

This change transcodes unix paths to windows paths, IF the ISERV_TARGET environment var is set to WINE. In this case we know we can use Z:\ as / and share the same file system. This is good enough for haskell.nix, but a massive hack generally.

angerman added 2 commits May 30, 2023 12:58
We have this sub-protocol in the iserv-proxy (which follows the sub-TH
protocol). The design is horrendous, and needs to be rethought.  The
issue we were seeing is that we started the sub-protocol, because a path
looked like it was absolute, however on the receiving end (windows), the
path /foo/bar/baz, is _not_ an absolute windows path. Thus the
corresponding branch dealing with the sub-protocol was not taken and
we were stuck with messages sent for the primary protocol, and not
understood by the sub-protocol.

This change transcodes unix paths to windows paths, _IF_ the
ISERV_TARGET environment var is set to WINE. In this case we know
we can use Z:\\ as / and share the same file system. This is good enough
for haskell.nix, but a massive hack generally.
@angerman angerman self-assigned this May 30, 2023
@angerman
Copy link
Collaborator Author

Tested with Plutus, and it does work there.

@angerman angerman merged commit d07c42c into master May 31, 2023
@angerman angerman deleted the angerman/win32-wibbles branch May 31, 2023 01:10
@ramirez7
Copy link
Contributor

@angerman I think this will fix the TH x-compilation issues I ran into here since I identified it to be this sort of Windows vs Unix path thing.

I'll bump my projects and see if it helps - your patch is basically what I imagined.

@angerman
Copy link
Collaborator Author

@angerman I think this will fix the TH x-compilation issues I ran into here since I identified it to be this sort of Windows vs Unix path thing.

I'll bump my projects and see if it helps - your patch is basically what I imagined.

Cool! Looking forward to your experience report!

@ramirez7
Copy link
Contributor

@angerman I've confirmed it now works in cases where it previously would hang! Thank you for fixing this 👏

@ramirez7
Copy link
Contributor

Here's the MR where I gave haskell.nix a bump. I was able to rip out my TH splice bash script.

@angerman
Copy link
Collaborator Author

Here's the MR where I gave haskell.nix a bump. I was able to rip out my TH splice bash script.

@ramirez7 thanks doe the feedback, this is great!

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