Skip to content

Conversation

@statm
Copy link
Contributor

@statm statm commented Apr 15, 2020

When using web debugging and/or live reload, source bundle is obtained from the packager.
The source url for the bundle is http://{HOST}:{PORT}/{NAME}{EXTENSION}?platform={PLATFORM} where:

{HOST} = "localhost",
{PORT} = "8081",
{NAME} = "index.{PLATFORM}" where {PLATFORM} = "ios", "android", "win32", etc.
{EXTENSION} = ".bundle"

Currently, the NAME field is named SourceBundlePath, which incorrectly implies file path. This CR renames it to SourceBundleName.

(There seems to be a typo in RedBox.cpp. Also fixed that.)

Microsoft Reviewers: Open in CodeFlow

@statm statm requested a review from a team as a code owner April 15, 2020 06:23
@NickGerleman
Copy link
Contributor

You'll need to run "yarn change” to generate a change file for CI to pass.

@statm
Copy link
Contributor Author

statm commented Apr 15, 2020

@NickGerleman thanks!

stackFrameUri.append(devSettings.SourceBundleHost.empty() ? "localhost" : devSettings.SourceBundleHost);
stackFrameUri.append(":");
stackFrameUri.append(devSettings.SourceBundlePath.empty() ? "8081" : devSettings.SourceBundlePort);
stackFrameUri.append(devSettings.SourceBundlePort.empty() ? "8081" : devSettings.SourceBundlePort);
Copy link
Member

Choose a reason for hiding this comment

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

SourceBundlePort [](start = 43, length = 16)

good catch

std::string SourceBundlePath; // {PATH}
std::string SourceBundleExtension; // {EXTENSION}
std::string SourceBundleHost; // Host domain (without port) for the bundler server. Default: "localhost".
std::string SourceBundlePort; // Host port for the bundler server. Default: "8081".
Copy link
Member

Choose a reason for hiding this comment

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

std::string SourceBundlePort [](start = 0, length = 30)

why not just store this as a ushort?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eventually all these stuff will be assembled to a URL for debug that's then passed to React Native as a std::string. I think storing ushort might not be worth the trouble of itoa?

Copy link
Member

@vmoroz vmoroz left a comment

Choose a reason for hiding this comment

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

:shipit:

@chrisglein chrisglein added the Breaking Change This PR will break existing apps and should be part of the known breaking changes for the release label Apr 15, 2020
@statm statm added the AutoMerge Causes a PR to be automatically merged once all requirements are passed (label drives bot activity) label Apr 15, 2020
@ghost
Copy link

ghost commented Apr 15, 2020

Hello @statm!

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.

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.

@statm statm added Breaking Change This PR will break existing apps and should be part of the known breaking changes for the release and removed Breaking Change This PR will break existing apps and should be part of the known breaking changes for the release labels Apr 15, 2020
@ghost ghost merged commit 63aeb0f into microsoft:master Apr 15, 2020
@statm statm deleted the sbp branch April 15, 2020 19:20
asklar pushed a commit to asklar/react-native-windows that referenced this pull request Apr 19, 2020
…oft#4608)

* Rename DeveloperSettings.SourceBundlePath -> SourceBundleName

* Change files

* clang format
@NickGerleman
Copy link
Contributor

@statm @vmoroz I looked at this again, and I don't think this is breaking, since this didn't touch the public IDL. Can you confirm?

@NickGerleman NickGerleman removed the Breaking Change This PR will break existing apps and should be part of the known breaking changes for the release label Apr 23, 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.

5 participants