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

[ASTextNode2] Provide compiler flag to enable ASTextNode2 for all usages. #410

Merged
merged 5 commits into from
Jul 3, 2017

Conversation

appleguy
Copy link
Member

@appleguy appleguy commented Jul 2, 2017

The runtime switch is helpful, but is too slow to be shipped in a large
production application where startup time is carefully optimized.

Although this doesn't pass text-related snapshot tests when enabled, it
does allow apps to rely on built-in components like ASButtonNode using
the same text stack as when they are manually creating ASTextNode2
instances.

A simpler approach would be to use a #define ASTextNode ASTextNode2,
but this would create unusual keyword highlighting in code referencing
ASTextNode. However, because it would be less invasive and this is
not on by default, we could do that instead if preferred.

…ges.

The runtime switch is helpful, but is too slow to be shipped in a large
production application where startup time is carefully optimized.

Although this doesn't pass text-related snapshot tests when enabled, it
does allow apps to rely on built-in components like ASButtonNode using
the same text stack as when they are manually creating ASTextNode2
instances.

A simpler approach would be to use a #define ASTextNode ASTextNode2,
but this would create unusual keyword highlighting in code referencing
ASTextNode. However, because it would be less invasive and this is
not on by default, we could do that instead if preferred.
@@ -11,6 +11,7 @@
//

#import <AsyncDisplayKit/ASTextNode2.h>
#import <AsyncDisplayKit/ASTextNode.h> // Definition of ASTextNodeDelegate
Copy link
Member Author

Choose a reason for hiding this comment

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

In the future everything will be merged. However, in a separate diff, we could clean this up to add an ASTextNodeDefinitions.h or similar to declare both the highlight enum and the delegate protocol.

I'm aiming to keep this particular diff quick, but it does raise the question of what our migration path should be to ASTextNode2.

@ghost
Copy link

ghost commented Jul 2, 2017

🚫 CI failed with log

@ghost
Copy link

ghost commented Jul 2, 2017

🚫 CI failed with log

Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

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

To make the relationship between this compile-time flag and the runtime options more clear, lets:

  • Add linking comments between the two sites (ASAvailability.h and ASTextNode+Beta.h).
  • Rename the macro to something like ASTEXTNODE_EXPERIMENT_GLOBAL_ENABLE to reinforce the connection.

Beyond that I'm cool with landing this puppy.

Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

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

Perfect!

@appleguy appleguy merged commit 2cda73a into master Jul 3, 2017
@appleguy appleguy deleted the ASTN2_ENABLED branch July 3, 2017 04:40
bernieperez pushed a commit to AtomTickets/Texture that referenced this pull request Apr 25, 2018
…ges. (TextureGroup#410)

* [ASTextNode2] Provide compiler flag to enable ASTextNode2 for all usages.

The runtime switch is helpful, but is too slow to be shipped in a large
production application where startup time is carefully optimized.

Although this doesn't pass text-related snapshot tests when enabled, it
does allow apps to rely on built-in components like ASButtonNode using
the same text stack as when they are manually creating ASTextNode2
instances.

A simpler approach would be to use a #define ASTextNode ASTextNode2,
but this would create unusual keyword highlighting in code referencing
ASTextNode. However, because it would be less invasive and this is
not on by default, we could do that instead if preferred.

* Update AsyncDisplayKit.h

* [ASTextNode2] Improve naming and documentation of ASTEXTNODE_EXPERIMENT_GLOBAL_ENABLE

* [ASTextNode2] CHANGELOG.md for TextureGroup#410.
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

2 participants