Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to parse the OS version when it only contains two components (major and minor) instead of the usual three (major, minor, patch). #240

Open
kadu-v opened this issue Nov 5, 2024 · 0 comments

Comments

@kadu-v
Copy link

kadu-v commented Nov 5, 2024

First of all, thank you for this great project!

This is my first bug report for Dinghy. When testing my Rust crate on an iPhone SE running iOS 18, I encountered an issue where Dinghy cannot parse the device’s OS version correctly.

The problem arises because iPhones running iOS 18 only specify a major and minor version, without a patch version. As a result, the semver::Version::parse function fails due to the semver crate's constraints [1].

Output

❯ cargo dinghy -d iphone test
   Targeting platform auto-ios-aarch64 and device 00008030-001905310105402E
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.00s
     Running unittests src/lib.rs (target/aarch64-apple-ios/debug/deps/test_app-c9930a40faa98dca)
   Targeting platform auto-ios-aarch64 and device 00008030-001905310105402E
  Installing test_app-c9930a40faa98dca to 00008030-001905310105402E (iPhone)
[2024-11-05T12:47:24Z ERROR cargo_dinghy] unexpected end of input while parsing minor version number
error: test failed, to rerun pass `-p test-app --lib`

Caused by:
  process didn't exit successfully: `/Users/kikemori/Documents/mprg/executorch-rs/dinghy/test-ws/../target/debug/cargo-dinghy -p auto-ios-aarch64 -d 00008030-001905310105402E runner -- /Users/kikemori/Documents/mprg/executorch-rs/dinghy/test-ws/target/aarch64-apple-ios/debug/deps/test_app-c9930a40faa98dca` (exit status: 1)
note: test exited abnormally; to see the full output pass --nocapture to the harness.

Related issue

[1] dtolnay/semver#325

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant