tursodatabase / tursodatabase/libsql

Build fails when rusqlite feature is disabled on non-Unix systems

Open
#2,049 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
17.2k
Forks
531
Avg merge
1h 12m
Merged PRs (30d)
1

Description

Commit 8ea257afe9534e58cf90c5ee8ccad4fc7545d416 introduced a compile-time error on non-Unix systems.

How to reproduce (eg. on Windows):

cargo build -p libsql --no-default-features --features core

Build fails with the following error:

error[E0599]: no method named `to_str` found for type parameter `impl AsRef<Path>` in the current scope
   --> libsql-sys\src\connection.rs:287:18
    |
200 |           path: impl AsRef<Path>,
    |                 ---------------- method `to_str` not found for this type parameter
...
286 |               let path = path
    |  ________________________-
287 | |                 .to_str()
    | |                 -^^^^^^ method not found in `impl AsRef<Path>`
    | |_________________|
    |

For more information about this error, try `rustc --explain E0599`.
error: could not compile `libsql-sys` (lib) due to 1 previous error

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in libsql-sys/src/connection.rs around line 287 and reproduce the failure with cargo build -p libsql --no-default-features --features core on a non-Unix system such as Windows. Done means the libsql-sys crate builds successfully with the rusqlite feature disabled on non-Unix systems.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sqlite
Domain
build-system, databases, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
54/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.