Skip to content

Conversation

@NickGerleman
Copy link
Contributor

@NickGerleman NickGerleman commented Mar 9, 2020

  • Fix Support For SysTraceSection

Addresses #4245, During deforking work I left a build logic typo which caused SysTraceSection to noop. When trying to reenable in deforked React Native, we end up having a compile error since stock Facebook code will pass doubles as an arg to SysTraceSection, and we will internally only accept string.

This was fixed in microsof/react-native by commenting out the SysTraceSection call that passed a double. A real solution is to allow our implementation of FbSystraceSection to accept non-string args and convert to strings, as Facebook's seemingly does.

  • Use type traits to call std::to_string on args not convertible to string
  • Move functions to be private instead of public

Still need a plan to validate this.

  • Simplify things a bit

  • Solely rely on is_convertible

Constructable was sort of wrong before, because we're actually doing assignment, but even then we likely only want things that allow implicit conversions.

Microsoft Reviewers: Open in CodeFlow

* Fix Support For SysTraceSection

Addresses microsoft#4245, During deforking work I left a build logic typo which caused SysTraceSection to noop. When trying to reenable in deforked React Native, we end up having a compile error since stock Facebook code will pass doubles as an arg to SysTraceSection, and we will internally only accept string.

This was fixed in microsof/react-native by commenting out the SysTraceSection call that passed a double. A real solution is to allow our implementation of FbSystraceSection to accept non-string args and convert to strings, as Facebook's seemingly does.

- Use type traits to call std::to_string on args not convertible to string
- Move functions to be private instead of public

Still need a plan to validate this.

* Simplify things a bit

* Solely rely on is_convertible

Constructable was sort of wrong before, because we're actually doing assignment, but even then we likely only want things that allow implicit conversions.
@NickGerleman NickGerleman added the AutoMerge Causes a PR to be automatically merged once all requirements are passed (label drives bot activity) label Mar 9, 2020
@NickGerleman NickGerleman requested a review from a team March 9, 2020 20:02
@NickGerleman NickGerleman requested a review from a team as a code owner March 9, 2020 20:02
@ghost
Copy link

ghost commented Mar 9, 2020

Hello @NickGerleman!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

Do note that I've been instructed to only help merge pull requests of this repository that have been opened for at least 60 minutes. No worries though, I will be back when the time is right! 😉

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost added the vnext label Mar 9, 2020
Copy link
Contributor

@hansenyy hansenyy left a comment

Choose a reason for hiding this comment

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

:shipit:

@ghost ghost merged commit 107fd93 into microsoft:0.60-stable Mar 9, 2020
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AutoMerge Causes a PR to be automatically merged once all requirements are passed (label drives bot activity)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants