What could cause a `does not conform to protocol` problem?

Hi everybody,

I made a package. Inside a package is the Some class which conforms to the SomeProtocol. Package compiles.
I use this package in DemoApp. Package loads. DemoApp is almost empty, only code to put view and logic from package.
This case the Some class does not conform to the SomeProtocol anymore. No additional info, no Do you want to add protocol stubs? in editor, just in Navigator below an error description (but does nothing).

ANY ideas? Where to look? How to look?
Headbang.

I would guess that it's not the same Some class (there could be another type with that name), not the same SomeProtocol, or not the version of the package that you expect (you could be pulling in an older version which doesn't have the conformance).

I made updates for this class many times to see if it change something. I can see the same file in open package and open App in Xcode. I can see changes I made in package. Checked many, many times… ;(


Kind of proof...

If you post a simplified version your code, someone will more likely be able to help. :slight_smile:

// My Package ...
// My app ...

Note: Code placed between a pair of 3 backtick characters (```) like this:
```
// Reset failed unibas address register
func clear_fubar () {
...
}
```

will be displayed pretty formatted:

// Reset failed unibas address register
func clear_fubar () {
   ...
}

I know, but simplifying will take a lot of time, if I want to replicate all Protocols dependencies. I tried this way, believed it could be a common, known problem for someone.

Since there is not a lot of information here, the possible direction of investigate is Observable macro. For me this is the least clear on behavior part, which might cause unexpected issues.

There is also a long-standing issue with Xcode when opening the same package separately and as a dependency in another project/package cause Xcode to freak out…

1 Like

Funny? When I added package locally, App compiles without a problem.