Skip to content

Fix Windows file URI path conversion for drive-letter paths #180

Description

@Teakowa

Goal

Correct file_uri_path on Windows so standard file URIs such as file:///D:/path/to/project.opy resolve to the native Windows path D:\path\to\project.opy instead of /D:/path/to/project.opy.

Context

opy-rs v0.1.15 currently decodes a standard Windows file URI with a drive letter into a path that retains the URI-leading slash. This produces /D:/..., which is not a valid native Windows path for the provider workflow.

The defect is observable through Wright's first-party OPY provider integration: Windows installed/native Wright workflows fail once opy-rs resolves the incoming source URI to /D:/.... This is an opy-rs owner defect in file URI/path handling and should not be worked around in Wright.

Related consumer work: wrightkit/wright#245 and wrightkit/wright#252.

Scope

  • Fix file_uri_path handling for Windows drive-letter file URIs.
  • Preserve correct handling for non-Windows paths and other already-supported file URI forms.
  • Add regression coverage for standard Windows drive-letter URIs, including file:///D:/....
  • Verify the provider path remains compatible with the LPP file-URI contract used by Wright.

Non-goals

  • Adding URI/path normalization workarounds in Wright.
  • Changing the LPP wire contract.
  • Broad refactoring of provider path handling unrelated to this defect.
  • Changing source-language semantics or project-loading ownership.

Acceptance Criteria

  • On Windows, file:///D:/path/to/project.opy resolves to the native drive-letter path D:\path\to\project.opy without a leading /.
  • Existing Unix-style file URI behavior remains unchanged.
  • Regression coverage demonstrates the previous /D:/... result would fail.
  • Wright's Windows OPY provider workflow can consume the corrected path without a consumer-side workaround.
  • The fix is released in opy-rs so Wright can update to the owner-provided correction.

Dependencies / ownership

  • Owning repo: opy-rs.
  • Consumer verification: wright after the fixed opy-rs release is available.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions