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

Updated dependencies (fixes compilation error with edge rustc) #25

Merged
merged 2 commits into from
May 31, 2024

Conversation

ink-splatters
Copy link
Contributor

@ink-splatters ink-splatters commented May 31, 2024

What

  • cargo update and fixing consequences

Why

TL;DR

this may seem opinionated however I believe it's justified by compilation error on edge rustc which requires updating ahash and is hard to fix without bulk update given the current dependency tree.

Long version

I got this compilation error [E0635]: unknown feature stdsimd

using the latest rustc:

$ date
Fri May 31 11:45:37 CEST 2024
$ rustc --version
rustc 1.80.0-nightly (6f3df08aa 2024-05-30)

In particular, it breaks ahash before 0.8.7 given the latest rustc is used.

Two times ahash

in the current HEAD, ahash is linked 2 times by cursive. While it could've been possible to update cursive alone, it seemed to be quite brittle, hence cargo update was preferred.

Click for details
$ git checkout 847b9c7
HEAD is now at 847b9c7 Merge pull request #24 from szabgab/patch-1
$
$ rg ahash
Cargo.lock
21:name = "ahash"
32:name = "ahash"
197: "ahash 0.8.3",
218: "ahash 0.7.6",
$
$ cargo tree | rg cursive -A 10
airstation:launchk ic$ cargo tree | rg cursive -A 10
├── cursive v0.20.0
│   ├── ahash v0.8.3
│   │   ├── cfg-if v1.0.0
│   │   ├── getrandom v0.2.7
│   │   │   ├── cfg-if v1.0.0
│   │   │   └── libc v0.2.147
│   │   └── once_cell v1.14.0
│   │   [build-dependencies]
│   │   └── version_check v0.9.4
│   ├── cfg-if v1.0.0
│   ├── crossbeam-channel v0.5.6
--
│   ├── cursive_core v0.3.4
│   │   ├── ahash v0.7.6
│   │   │   ├── getrandom v0.2.7 (*)
│   │   │   └── once_cell v1.14.0
│   │   │   [build-dependencies]
│   │   │   └── version_check v0.9.4
│   │   ├── crossbeam-channel v0.5.6 (*)
│   │   ├── enum-map v2.4.1
│   │   │   └── enum-map-derive v0.10.0 (proc-macro)
│   │   │       ├── proc-macro2 v1.0.66 (*)
│   │   │       ├── quote v1.0.32 (*)

$ cargo tree  | rg cursive -A 10 | rg ahash
│   ├── ahash v0.8.3
│   │   ├── ahash v0.7.6

new_debouncer() fix

the update required fixing new_debouncer() call as the interface has slightly changed

Tests

$ cargo install cargo-pretty-test
$ cargo-pretty-test
...
Click for test results
Generated by cargo-pretty-test
└── (OK) xpc_sys ... (21 tests in 0.00s: ✅ 21)
    └── (OK) src/lib.rs ... (21 tests in 0.00s: ✅ 21)
        ├─ ✅ bindgen_test_layout_ipc_info_name
        ├─ ✅ bindgen_test_layout_ipc_info_space
        ├─ ✅ bindgen_test_layout_ipc_info_space_basic
        ├─ ✅ bindgen_test_layout_ipc_info_tree_name
        ├─ ✅ bindgen_test_layout_mach_port_limits
        ├─ ✅ bindgen_test_layout_mach_port_options
        ├─ ✅ bindgen_test_layout_mach_port_options__bindgen_ty_1
        ├─ ✅ bindgen_test_layout_mach_port_qos
        ├─ ✅ bindgen_test_layout_mach_service_port_info
        ├── objects
        │   ├── xpc_dictionary
        │   │   └── tests
        │   │       ├─ ✅ hashmap_to_raw
        │   │       └─ ✅ raw_to_hashmap
        │   └── xpc_object
        │       └── tests
        │           └─ ✅ safely_get_refs
        ├── tests
        │   └─ ✅ it_works
        └── traits
            └── xpc_value
                └── tests
                    ├─ ✅ xpc_to_rs_with_wrong_type
                    ├─ ✅ xpc_value_array
                    ├─ ✅ xpc_value_bool
                    ├─ ✅ xpc_value_f64
                    ├─ ✅ xpc_value_i64
                    ├─ ✅ xpc_value_mach_recv
                    ├─ ✅ xpc_value_mach_send
                    └─ ✅ xpc_value_u64

Status: OK; total 21 tests in 0.00s: 21 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

@mach-kernel mach-kernel self-requested a review May 31, 2024 12:42
Copy link
Owner

@mach-kernel mach-kernel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ink-splatters!

Thank you very much for your PR! This looks great. Merging!

@@ -104,7 +104,7 @@ pub const SYSTEM_LAUNCH_DAEMONS: &str = "/System/Library/LaunchDaemons";

async fn fsnotify_subscriber() {
let (tx, rx): (Sender<DebounceEventResult>, Receiver<DebounceEventResult>) = channel();
let mut debouncer = new_debouncer(Duration::from_secs(5), None, tx).unwrap();
let mut debouncer = new_debouncer(Duration::from_secs(5), tx).unwrap();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, for reference

@mach-kernel mach-kernel merged commit 13f2396 into mach-kernel:master May 31, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants