Comments (24)
still an issue in beta 8 for me.
from rxswift.
The same is affecting the Observable extensions in RxSwiftExt (like https://github.com/RxSwiftCommunity/RxSwiftExt/blob/main/Source/RxSwift/distinct.swift#L27)
from rxswift.
The RxSwiftExt issue specifically was resolved in RxSwiftExt 6.2.0.
from rxswift.
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.
Some more things I noticed that seem to work a bit better then before (In Xcode 15 Beta 4).
- 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. - 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:
from rxswift.
It seems resolved in Xcode 15 beta 5.
from rxswift.
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.
I'm closing this thread for now, seems like indeed this is fixed. If anything changes, feel free to comment here.
from rxswift.
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.
I opened an issue about it
from rxswift.
As @0xpablo suggested, this should be solved in the next beta seed hopefully.
Thanks for flagging this!
apple/swift#66367
from rxswift.
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.
@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.
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.
@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.
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.
I just installed Xcode 15 Beta 3 and the problem is still not solved in our main app /: very strange.
from rxswift.
Here's what I did for now:
- I have a new branch on the RxSwift called
alias
, it introduces a new RxObservable alias. - In my main project, I did a find and replace for the following regex:
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.
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.
@oryonatan Mind trying the fix I suggested above? It seems to have solved it for the meanwhile for several projects.
from rxswift.
issue still reproducible with Xcode 15.0 Beta 7
from rxswift.
Issue seems to be gone in Xcode 15.0 beta 8
. Anyone else can confirm?
from rxswift.
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.
Hi team I am getting this issue In Xcode 15.0.1 Using pod 'RxSwiftExt', '~> 5'
Can someone guide me here which approach I should follow?
Thanks.
from rxswift.
Related Issues (20)
- Any support/plan of Privacy Manifest? HOT 119
- Deprecated code warnings in playground Filtering_and_Conditional_Operators.xcplaygroundpage HOT 1
- -[RxCocoa.RxTextViewDelegateProxy text]: unrecognized selector sent to instance 0x28132bdb0 HOT 2
- asSingle -> Sequence contains more than one element. HOT 5
- Update
- Cocoapods trunk push verification fails on pods dependent on RxSwift using Xcode 15+ HOT 4
- ConnectableObservable cannot connect once it was disposed HOT 2
- Why is the https://api.snapkit.com initialized before FinishLaunchingWithOptions? HOT 1
- drive's onNext closure should be main actor isolated HOT 1
- No available version for github "ReactiveX/RxSwift" satisfies the requirement: == 6.6.0 HOT 4
- Using in a React Native Native Module crashes with outlined init with copy of Disposable HOT 7
- Proposal, add overlapping buffers. HOT 2
- withLatestFrom *only* takes immediate values it does not wait for deferred events from the `second` observable HOT 10
- `asSingle()` to automatically run `take(1)` beforehand HOT 17
- need add PrivacyInfo.xcprivacy HOT 1
- Need add PrivacyInfo.xcprivacy after 2024.5.1 HOT 1
- `bind` function may cause ambiguity HOT 5
- Add support for visionOS in Podspec
- ITMS-91065: Missing signature HOT 1
- Upload Privacy Policy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxswift.