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

chore(android): detailed getter and setter deprecation warning #11049

Merged
merged 4 commits into from
Jul 17, 2020

Conversation

garymathews
Copy link
Contributor

@garymathews garymathews commented Jul 12, 2019

  • Display a verbose deprecation message detailing the occurrence.
  • Prevent logs displaying in production builds.
TEST CASE
const win = Ti.UI.createWindow({ backgroundColor: 'gray' });

console.log(win.getBackgroundColor());
win.setBackgroundColor('white');

win.open();
Getter method deprecated, please use `obj.backgroundColor;` or `obj['backgroundColor'];` instead.
console.log(win.getBackgroundColor());
                ^
    at (/app.js:3:17)

JIRA Ticket

@build
Copy link
Contributor

build commented Jul 12, 2019

Messages
📖

💾 Here's the generated SDK zipfile.

📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖

✅ All tests are passing
Nice one! All 6716 tests are passing.
(There are 704 skipped tests not included in that total)

Generated by 🚫 dangerJS against 14094df

Copy link
Contributor

@sgtcoolguy sgtcoolguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I'm ok, since this wouldn't "spam" the logs so much - but it does vary in an important way in that:

  • iOS would still complain at runtime for usage
  • This just blanket mentions the deprecation, but doesn't basically "flag" usage

If we want to do it at build time, we could have a babel plugin that flagged the exact usages - and possibly also easily convert it to "fix" usages.

@sgtcoolguy sgtcoolguy modified the milestones: 8.2.0, 8.3.0 Sep 5, 2019
@sgtcoolguy sgtcoolguy removed this from the 8.3.0 milestone Dec 10, 2019
@garymathews garymathews force-pushed the TIMOB-27242 branch 2 times, most recently from 8b4190c to 769d355 Compare December 17, 2019 00:09
@garymathews garymathews changed the title build(android): add getter and setter deprecation warning to cli chore(android): detailed getter and setter deprecation warning Dec 17, 2019
@build build added this to the 9.0.0 milestone Dec 17, 2019
@ewanharris ewanharris modified the milestones: 9.0.0, 9.1.0 Feb 12, 2020
@ssekhri
Copy link

ssekhri commented Jul 16, 2020

FR Passed.
The detailed warnings for deprecation of getters and setters is shown.
Verified on:
Mac OS: 10.15.4
SDK: 9.1.0.v20200715172045
Appc CLI: 8.0.0
JDK: 11.0.4
Node: 10.17.0
Studio: 6.0.0.202005141803
Device: Nexus4(v5.1.1) device, Pixel3(v10.0) emulator

@sgtcoolguy sgtcoolguy merged commit 3507dd0 into tidev:master Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants