You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running test --locked --all-features --all-targets for Windows, it throws the error below.
Run cargo test --locked --all-features --all-targets
cargo test --locked --all-features --all-targets
shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
env:
CARGO_HOME: C:\Users\runneradmin/.cargo
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
Updating crates.io index
Downloading crates ...
Downloaded cexpr v0.[6](https://github.com/sjunepark/bspl/actions/runs/11120249280/job/30896887671#step:5:6).0
// Omitted
error[E0433]: failed to resolve: could not find `unix`in`os`
--> C:\Users\runneradmin/.cargo\registry\src\index.crates.io-6f17d22bba15001f\libsql-sys-0.8.0\src\connection.rs:276:26
|
276 | use std::os::unix::ffi::OsStrExt;| ^^^^ could not find `unix`in`os`|
note: found an item that was configured out
--> /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c\library\std\src\os\mod.rs:27:9
note: the item is gated here
--> /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c\library\std\src\os\mod.rs:19:1
note: found an item that was configured out
--> /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c\library\std\src\os\mod.rs:65:9
note: the item is gated here
--> /rustc/eeb90cda1969383f56a2637cbd3037bdf598841c\library\std\src\os\mod.rs:64:1
error[E0599]: no method named `as_bytes` found forreference `&OsStr`in the current scope
--> C:\Users\runneradmin/.cargo\registry\src\index.crates.io-6f17d22bba15001f\libsql-sys-0.8.0\src\connection.rs:277:73
|
277 |let path = std::ffi::CString::new(path.as_ref().as_os_str().as_bytes())
| ^^^^^^^^
|
help: there is a method `as_encoded_bytes` with a similar name
|
277 |let path = std::ffi::CString::new(path.as_ref().as_os_str().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
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 1.
Context
Got the error above during github actions. Below is the github action jobs script which I ran.
os-check:
# run cargo test on mac and windowsruns-on: ${{ matrix.os }}name: ${{ matrix.os }} / stablestrategy:
fail-fast: falsematrix:
# todo: Add "windows-latest". Currently doesn't work due to `libsql-sys`. os: [ windows-latest ]steps:
# if your project needs OpenSSL, uncomment this to fix Windows builds.# it's commented out by default as the install command takes 5-10m.# - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append# if: runner.os == 'Windows'# - run: vcpkg install openssl:x64-windows-static-md# if: runner.os == 'Windows'
- uses: actions/checkout@v4with:
submodules: true
- name: Install stableuses: dtolnay/rust-toolchain@stable
- name: cargo generate-lockfileif: hashFiles('Cargo.lock') == ''run: cargo generate-lockfile
- name: cargo testrun: cargo test --locked --all-features --all-targets
The text was updated successfully, but these errors were encountered:
sjunepark
changed the title
libsql-sys-0.8.0 compilation fails for windows.libsql-sys-0.8.0 compilation seems to fail for windows.
Oct 1, 2024
Issue
When running
test --locked --all-features --all-targets
for Windows, it throws the error below.Context
Got the error above during github actions. Below is the github action jobs script which I ran.
The text was updated successfully, but these errors were encountered: