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

use addDisposableTo method can not make a warning #1427

Closed
5 of 17 tasks
dakeshi opened this issue Sep 29, 2017 · 1 comment
Closed
5 of 17 tasks

use addDisposableTo method can not make a warning #1427

dakeshi opened this issue Sep 29, 2017 · 1 comment

Comments

@dakeshi
Copy link
Contributor

dakeshi commented Sep 29, 2017

Short description of the issue:
When I search some tutorials about RxSwift, I find out so many sample codes still use deprecated addDisposableTo method instead of disposed(by:). I think that the main reason is a missing warning message.

Deprecated addDisposableTo method can not make a warning during a build time. To show a warning and avoid an old method, it need to comment out in Deprecated.swift.

/// **@available(\*, deprecated, message="use disposed(by:) instead")** 

Um. it is not the correct statement. It should be:

@available(*, deprecated, message: "use disposed(by:) instead")

Expected outcome:

show a warning to avoid to use deprecated method

What actually happens:

no warning.

RxSwift/RxCocoa/RxBlocking/RxTest version/commit

3.6.1

Platform/Environment

  • iOS
  • macOS
  • tvOS
  • watchOS
  • playgrounds

How easy is to reproduce? (chances of successful reproduce after running the self contained code)

  • easy, 100% repro
  • sometimes, 10%-100%
  • hard, 2% - 10%
  • extremely hard, %0 - 2%

Xcode version:

9.0

Installation method:

  • CocoaPods
  • Carthage
  • Git submodules

I have multiple versions of Xcode installed:
(so we can know if this is a potential cause of your issue)

  • yes (which ones)
  • no

Level of RxSwift knowledge:
(this is so we can understand your level of knowledge
and formulate the response in an appropriate manner)

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

kzaher commented Sep 30, 2017

Hi @dakeshi ,

Thnx for reporting this. We haven't been able to deprecate this for 3.x release, but we've deprecated it now in 4.x.

@kzaher kzaher closed this as completed Sep 30, 2017
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