What happened
macOS builds currently fail due to issues using NSColor trait as a type. I fixed this issue by using NSColor access with objc2 and objc2-app-kit crates in favor of the deprecated objc and cocoa crates. Happy to submit the PR for this if you are ok with updating these dependencies.
Steps to reproduce
- clone repository
- Install dependencies with
npm install - Setup tinymist side car with
mkdir src-tauri/binaries && ./scripts/download-tinymist.sh - Run development build with
npm run tauri:dev
Expected behaviour
Successfully build InkyCap for macOS target.
Platform / OS
macOS 15.7.4
Install type
Built from source
InkyCap version
26.6.2
Notes, logs, or screenshots
main error message:
error[E0782]: expected a type, found a trait
--> src/commands/system_color.rs:76:39
|
76 | let accent: cocoa::base::id = NSColor::controlAccentColor(nil);
| ^^^^^^^
|
help: you can add the `dyn` keyword if you want a trait object
|
76 | let accent: cocoa::base::id = <dyn NSColor>::controlAccentColor(nil);
| ++++ +
For more information about this error, try `rustc --explain E0782`.
warning: `inkycap` (lib) generated 51 warnings
error: could not compile `inkycap` (lib) due to 1 previous error; 51 warnings emitted
### What happened
macOS builds currently fail due to issues using NSColor trait as a type. I fixed this issue by using NSColor access with objc2 and objc2-app-kit crates in favor of the deprecated objc and cocoa crates. Happy to submit the PR for this if you are ok with updating these dependencies.
### Steps to reproduce
1. clone repository
2. Install dependencies with `npm install`
3. Setup tinymist side car with `mkdir src-tauri/binaries && ./scripts/download-tinymist.sh`
4. Run development build with `npm run tauri:dev`
### Expected behaviour
Successfully build InkyCap for macOS target.
### Platform / OS
macOS 15.7.4
### Install type
Built from source
### InkyCap version
26.6.2
### Notes, logs, or screenshots
main error message:
```bash
error[E0782]: expected a type, found a trait
--> src/commands/system_color.rs:76:39
|
76 | let accent: cocoa::base::id = NSColor::controlAccentColor(nil);
| ^^^^^^^
|
help: you can add the `dyn` keyword if you want a trait object
|
76 | let accent: cocoa::base::id = <dyn NSColor>::controlAccentColor(nil);
| ++++ +
For more information about this error, try `rustc --explain E0782`.
warning: `inkycap` (lib) generated 51 warnings
error: could not compile `inkycap` (lib) due to 1 previous error; 51 warnings emitted
```