core-foundation-rs icon indicating copy to clipboard operation
core-foundation-rs copied to clipboard

CFIndex not found in this scope error

Open ckampfe opened this issue 2 years ago • 5 comments

It's possible something in the recent core-foundation-sys update broke. I'm getting this on a compile of an application with core-foundation at 0.9.3 and core-foundation-sys at 0.8.5:

   Compiling core-foundation v0.9.3
error[E0412]: cannot find type `CFIndex` in this scope
  --> /Users/clark/.cargo/registry/src/index.crates.io-6f17d22bba15001f/core-foundation-0.9.3/src/mach_port.rs:17:16
   |
17 |         order: CFIndex,
   |                ^^^^^^^ not found in this scope
   |
help: consider importing this type alias
   |
1  + use base::CFIndex;
   |

I do not directly depend on either core-foundation or core-foundation-sys, they are pulled in by libraries I use.

ckampfe avatar Jul 24 '23 15:07 ckampfe

I just started getting the same error. core-foundation needs a new release. The latest release 0.9.3 is old and is missing an import for CFIndex. But this issue was already fixed on master, so a 0.9.4 release from latest master seems to be needed.

Here's the code with the issue: https://github.com/servo/core-foundation-rs/blob/6642b11b4c907406779e82382bf94e7ed6d6efd2/core-foundation/src/mach_port.rs#L1 That import line is missing CFIndex, which is present on master

tonyalaribe avatar Jul 24 '23 15:07 tonyalaribe

Same problem here, with versione 0.9.3 Needed to add use base::CFIndex; in core-foundation-0.9.3/src/mach_port.rs to fix it.

guglielmino avatar Jul 24 '23 16:07 guglielmino

We need a release of code-foundation to go with the core-foundation-sys release I think. This commit is the troublesome one. https://github.com/servo/core-foundation-rs/commit/6d00383bafd95f7457a288e1948fc4111a34ae9e

hjmallon avatar Jul 24 '23 16:07 hjmallon

I've yanked core-foundation-sys 0.8.5

jrmuizel avatar Jul 24 '23 16:07 jrmuizel

Given #620 is merged, can there be a new release again?

micolous avatar Sep 13 '23 06:09 micolous

This should no longer be an issue as version 0.9.4 was published last year and 0.10 has now been published. If there's still an issue, please re-open.

waywardmonkeys avatar Aug 12 '24 03:08 waywardmonkeys