ryanmcgrath / cacao

Rust bindings for AppKit (macOS) and UIKit (iOS/tvOS). Experimental, but working!
MIT License
1.85k stars 69 forks source link

cyclic package dependency error #43

Closed manuel-mauky closed 2 years ago

manuel-mauky commented 2 years ago

I'd like to try out cacao but I get a cargo error when I want to add the library to the project.

This is my Cargo.toml:

[package]
name = "cacao-example-app"
version = "0.1.0"
edition = "2021"

[dependencies]
cacao = "0.3.0"

I get this error when I run cargo build:

error: cyclic package dependency: package `core-foundation v0.9.3` depends on itself. Cycle:
package `core-foundation v0.9.3`
    ... which satisfies dependency `core-foundation = "^0.9"` of package `iana-time-zone v0.1.42`
    ... which satisfies dependency `iana-time-zone = "^0.1.41"` of package `chrono v0.4.21`
    ... which satisfies dependency `chrono = "^0.4"` of package `core-foundation v0.9.3`
    ... which satisfies dependency `core-foundation = "^0.9"` of package `cacao v0.3.0`

I'm relatively new to rust so I'm not sure if this is a noob question. Can you give a hint on how to fix this? What would be the minimal Cargo.toml to run an example app?

MacOS: 12.3.1, M1 pro chip Rustc: 1.62.1

madsmtm commented 2 years ago

This is an issue with core-foundation, chrono implicitly depends on it.

Fixed by https://github.com/ryanmcgrath/cacao/pull/44.