tursodatabase / tursodatabase/libsql
BUG: Compilation fail on Windows when the 'replication' feature is not enabled.
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 17.2k
- Forks
- 531
- Avg merge
- 1h 12m
- Merged PRs (30d)
- 1
Description
[dependencies.libsql]
git = "https://github.com/tursodatabase/libsql"
rev = "6b13d77519db51289b63bb164d7844eb7ce9b25d"
default-features = false
features = ["core"]
Error
error[E0433]: failed to resolve: could not find `unix` in `os`
--> C:\Users\...\.cargo\git\checkouts\libsql-311658d335deb3b1\6b13d77\libsql-sys\src\connection.rs:285:26
|
285 | use std::os::unix::ffi::OsStrExt;
| ^^^^ could not find `unix` in `os`
error[E0599]: no method named `as_bytes` found for reference `&OsStr` in the current scope
--> C:\Users\...\.cargo\git\checkouts\libsql-311658d335deb3b1\6b13d77\libsql-sys\src\connection.rs:286:73
|
286 | let path = std::ffi::CString::new(path.as_ref().as_os_str().as_bytes())
| ^^^^^^^^ help: there is a method with a similar name: `as_encoded_bytes`
Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `libsql-sys` (lib) due to 2 previous errors
# Ok
features = ["core", "replication"]
Is the replication feature mandatory?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with libsql-sys/src/connection.rs around lines 285-286 and reproduce the Windows build using default-features = false with only the core feature. Trace why the Unix-only OsStrExt import is compiled without replication, then verify that the intended feature combination builds successfully on Windows and clarify whether replication is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100