Mola-maker opened a new pull request, #9044:
URL: https://github.com/apache/opendal/pull/9044
# Which issue does this PR close?
Closes #9043.
# Rationale for this change
`compfs:///data` and `monoiofs:///data` set the root to the relative path
`data`, which is resolved against the process working directory. `fs` and
`hf3fs` keep the leading `/`, and `monoiofs/src/docs.md` requires an absolute
root.
# What changes are included in this PR?
- compfs: the URI path becomes an absolute root. On Windows, a drive path
such as `compfs:///C:/data` is kept as-is, and a bare `C:` becomes `C:/`. This
uses the same rule as the fs change in #9042.
- monoiofs: the URI path becomes `/{path}`. The crate builds only on Linux,
so it needs no drive handling.
- The existing `from_uri_sets_root` tests now expect absolute roots, and a
compfs Windows drive test is added.
Verification:
- `cargo test -p opendal-service-compfs --lib` (Windows 11): 18 passed.
`from_uri_sets_root` fails against the old implementation.
- `cargo clippy -p opendal-service-compfs --all-targets -- -D warnings`:
clean on Windows.
- `cargo clippy --target x86_64-unknown-linux-gnu -p opendal-service-compfs
-p opendal-service-monoiofs --all-targets -- -D warnings`: clean.
- monoiofs does not build on Windows, so I did not run its unit test
locally. CI will run it.
- The end-to-end probe from the issue wrote under the working directory
before this change. `compfs:///C:/...` still resolves to the same absolute
directory as before.
# Are there any user-facing changes?
Yes. `compfs:///path` and `monoiofs:///path` now mean `/path`, not `./path`.
# Breaking changes
# AI Usage Statement
- Harness: Claude Code
- Model: Anthropic Claude
- Effort: default
- Role: Found the bug by comparing `from_uri` implementations and
reproducing it with compfs on Windows, wrote the fix and the tests, and ran the
checks above. A separate review pass checked the docs, RFC 5444 and CI
configuration for any reliance on relative roots and found none.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]