GithubHelp home page GithubHelp logo

Comments (24)

oryonatan avatar oryonatan commented on June 18, 2024 5

still an issue in beta 8 for me.

from rxswift.

awBSH avatar awBSH commented on June 18, 2024 3

The same is affecting the Observable extensions in RxSwiftExt (like https://github.com/RxSwiftCommunity/RxSwiftExt/blob/main/Source/RxSwift/distinct.swift#L27)
Screenshot 2023-08-09 at 17 35 09

from rxswift.

freak4pc avatar freak4pc commented on June 18, 2024 2

The RxSwiftExt issue specifically was resolved in RxSwiftExt 6.2.0.

from rxswift.

0xpablo avatar 0xpablo commented on June 18, 2024 1

A workaround to this issue is to declare a typealias of Observable inside the modules you are experiencing issues:

import RxSwift

// Needed to disambiguate between Foundation's Observable and RxSwift's Observable
typealias Observable = RxSwift.Observable

This shouldn't be needed in a future release: https://forums.swift.org/t/pitch-observation-revised/63757/98

from rxswift.

freak4pc avatar freak4pc commented on June 18, 2024 1

Some more things I noticed that seem to work a bit better then before (In Xcode 15 Beta 4).

  1. In a specific file where I had SwiftUI & RxSwift imported, i removed the SwiftUI import and it knew to take the right Observable even though SwiftUI is imported in other places in the module.
  2. In my main app adding a public typealias Observable = RxSwift.Observable in some central place seems to work with a single statement. It didn't solve the issue in previous betas.

Seems that between this and the option to rename everything to RxObservable, this will be an annoying breaking change, but one with a few possible solutions, depending on the codebase.

These are all the changes I had to do to get my entire project to compile, and we have about 50 modules:
image

from rxswift.

JCSooHwanCho avatar JCSooHwanCho commented on June 18, 2024 1

It seems resolved in Xcode 15 beta 5.

from rxswift.

freak4pc avatar freak4pc commented on June 18, 2024 1

That's interesting, the protocol is still there.
For our huge codebase it also seems to work, but I had to import RxSwift in a single file where just doing import RxCocoa wasn't enough for some reason.

from rxswift.

freak4pc avatar freak4pc commented on June 18, 2024 1

I'm closing this thread for now, seems like indeed this is fixed. If anything changes, feel free to comment here.

from rxswift.

cabeca avatar cabeca commented on June 18, 2024 1

I had this problem in Xcode15 beta 4, then it was fixed (?) in Xcode 15 beta 5, but now it is back again in Xcode beta 6.

But I found something curious:

extension Observable {
    static func unimplemented(file: String = #file, function: String = #function, line: Int = #line)
        -> Observable<Element> { // Error does not happen here
        unimplementedFunction(file: file, function: function, line: line)
            return Observable<Element>.empty()  // <-- Error only happens here
    }
}

This error only seems to apply to return statements in my project. If I remove the Observable<Element> from the return statement so it becomes only .empty() and let the compiler infer the type, it works. It also works with just Observable.empty(). Not sure if this helps or not.

from rxswift.

JCSooHwanCho avatar JCSooHwanCho commented on June 18, 2024 1

apple/swift#67815

I opened an issue about it

from rxswift.

freak4pc avatar freak4pc commented on June 18, 2024

As @0xpablo suggested, this should be solved in the next beta seed hopefully.
Thanks for flagging this!
apple/swift#66367

from rxswift.

JCSooHwanCho avatar JCSooHwanCho commented on June 18, 2024

Is that PR really solves this issue? It just seems ensuring success resolution of macro code, not my code. As long as Observable protocol declaration is public, this problem will be persited, I think.

from rxswift.

freak4pc avatar freak4pc commented on June 18, 2024

@JCSooHwanCho I'm unsure as well. I tried the latest dev snapshot and it doesn't solve it :(
I'm continuing the discussion here:
https://forums.swift.org/t/pitch-observation-revised/63757/101

from rxswift.

freak4pc avatar freak4pc commented on June 18, 2024

I just tested the last nightly seed (Jul 2) of Swift 5.9 and it seems the problem is fixed!
Exciting :) I hope this will be released in an upcoming beta soon.

from rxswift.

JCSooHwanCho avatar JCSooHwanCho commented on June 18, 2024

@freak4pc I found the PR that solves this issue. It resolves this issue by lowering priority of name look-up of standard library.

It doesn't seems the true solution though, it can allow us more time to react for language evolution.

BTW, I have a curiosity about is there any plan renaming to resolve this issue. can you let me know about it?

from rxswift.

freak4pc avatar freak4pc commented on June 18, 2024

I don't think we will make any renames, this is against what we want to achieve with the project here, and I really don't consider it this project's problem that Apple decided to cause havoc 😅

What we can do is expose a public typealias RxObservable = RxSwift.Observable in the repo so folks can use RxObservable and Observable if they need the observability framework, which might help in that specific scenario.

Also note that I'm pretty sure people will be able to use Observability.Observable if they need it, at the worst case.

from rxswift.

freak4pc avatar freak4pc commented on June 18, 2024

I just installed Xcode 15 Beta 3 and the problem is still not solved in our main app /: very strange.

from rxswift.

freak4pc avatar freak4pc commented on June 18, 2024

Here's what I did for now:

  1. I have a new branch on the RxSwift called alias, it introduces a new RxObservable alias.
  2. In my main project, I did a find and replace for the following regex:
image

My project builds now. It's not really a super great solution, but it's reasonable for the time being (much more reasonable than an entire rename).

from rxswift.

oryonatan avatar oryonatan commented on June 18, 2024

I just installed Xcode 15 Beta 3 and the problem is still not solved in our main app /: very strange.

Not fixed in Beta 4 either.

from rxswift.

freak4pc avatar freak4pc commented on June 18, 2024

@oryonatan Mind trying the fix I suggested above? It seems to have solved it for the meanwhile for several projects.

from rxswift.

awBSH avatar awBSH commented on June 18, 2024

issue still reproducible with Xcode 15.0 Beta 7
Screenshot 2023-08-23 at 14 01 15

from rxswift.

arctouch-mateusbrigido avatar arctouch-mateusbrigido commented on June 18, 2024

Issue seems to be gone in Xcode 15.0 beta 8. Anyone else can confirm?

from rxswift.

freak4pc avatar freak4pc commented on June 18, 2024

Apple core team suggests this PR will resolve the issue in an upcoming beta:
apple/swift#68254

See discussion:
apple/swift#67815 (comment)

from rxswift.

kaurprabhjeet avatar kaurprabhjeet commented on June 18, 2024

Hi team I am getting this issue In Xcode 15.0.1 Using pod 'RxSwiftExt', '~> 5'
Screenshot 2023-11-24 at 11 36 44 PM
Can someone guide me here which approach I should follow?
Thanks.

from rxswift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.