Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CombineLatest see its Next.Event debug log truncated #930

Closed
3 of 8 tasks
juliengdt opened this issue Oct 7, 2016 · 2 comments
Closed
3 of 8 tasks

CombineLatest see its Next.Event debug log truncated #930

juliengdt opened this issue Oct 7, 2016 · 2 comments

Comments

@juliengdt
Copy link

juliengdt commented Oct 7, 2016

Short description of the issue:

On combineLatest(), debug() truncate the log of the Event.Next at the middle with "...": it can be useful to see full stack for debugging

Self contained code example that reproduces the issue:

        let rx_disposeBag = DisposeBag()

        let aString = Variable<String>("A is the default value of aString")
        let bString = Variable<String>("B is the default value of bString")
        let cString = Variable<String>("C is the default value of cString")
        let dString = Variable<String>("D is the default value of dString")
        let eString = Variable<String>("E is the default value of eString")
        let fString = Variable<String>("F is the default value of fString")
        let gString = Variable<String>("G is the default value of gString")



        let rx_combinedString = Observable.combineLatest(aString.asObservable(), bString.asObservable(), cString.asObservable(),
                                                         dString.asObservable(), eString.asObservable(), fString.asObservable(),
                                                         gString.asObservable()) {
                                                            (aNew: String, bNew: String, cNew: String, dNew: String, eNew: String, fNew: String, gNew: String)  in
                                                            (aNew,bNew,cNew,dNew,eNew,fNew,gNew)
            }.debug()


        aString.value = ("A1 is the new value of aString")


        rx_combinedString.subscribe(onNext: { print($0)}).addDisposableTo(rx_disposeBag)

Xcode version:

  8.0

Expected outcome:

XXXr.swift:83 (viewDidLoad()) -> subscribed
XXX:83 (viewDidLoad()) -> Event next(("A1 is the new value of aString", "B is the default value of bString", "C is the default value of cString", "D is the default value of dString", "E is the default value of eString", "F is the default value of fString", "G is the default value of gString"))
("A1 is the new value of aString", "B is the default value of bString", "C is the default value of cString", "D is the default value of dString", "E is the default value of eString", "F is the default value of fString", "G is the default value of gString")

What actually happens:

XXXr.swift:83 (viewDidLoad()) -> subscribed
XXX:83 (viewDidLoad()) -> Event next(("A1 is the new... value of gString"))
("A1 is the new value of aString", "B is the default value of bString", "C is the default value of cString", "D is the default value of dString", "E is the default value of eString", "F is the default value of fString", "G is the default value of gString")

Installation method:

  • CocoaPods
  • Carthage
  • Git submodules

I have multiple versions of Xcode installed:

  • yes (which ones)
  • no

Level of RxSwift knowledge:

  • just starting
  • I have a small code base
  • I have a significant code base
@kzaher
Copy link
Member

kzaher commented Oct 7, 2016

Hi @juliengdt ,

I guess we can try to add another flag there that controls should it be truncated.

@juliengdt
Copy link
Author

Hi @kzaher yes great idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants