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

Single-File: Pass BUNDLE_PROBE property to the runtime #34845

Merged
merged 3 commits into from
Apr 24, 2020

Conversation

swaroop-sridhar
Copy link
Contributor

As described in the design doc, pass the bundle_probe function pointer encoded as a string to the runtime.

@ghost
Copy link

ghost commented Apr 11, 2020

Tagging @swaroop-sridhar as an area owner. If you would like to be tagged for a label, please notify danmosemsft.

@swaroop-sridhar swaroop-sridhar force-pushed the property branch 6 times, most recently from f4c4315 to a710057 Compare April 13, 2020 08:01
Copy link
Member

@vitek-karas vitek-karas left a comment

Choose a reason for hiding this comment

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

Just minor stuff, looks good.

src/installer/corehost/cli/bundle/runner.cpp Outdated Show resolved Hide resolved
src/installer/corehost/cli/bundle/runner.h Outdated Show resolved Hide resolved
src/installer/corehost/cli/hostmisc/pal.unix.cpp Outdated Show resolved Hide resolved
Type the path-string as a char16_t* string instead of wchar_t*
wchar_t* size varies by architecture.

bool STDMETHODCALLTYPE bundle_probe(const char16_t* path, int64_t* offset, int64_t* size);
@swaroop-sridhar
Copy link
Contributor Author

@vitek-karas I updated the bundle_probe interface from

bool STDMETHODCALLTYPE bundle_probe(const wchar_t* path, int64_t* offset, int64_t* size)

to

bool STDMETHODCALLTYPE bundle_probe(const char16_t* path, int64_t* offset, int64_t* size)

because:

  • wchar_t is 16-bit encoding on Windows while it is 32-bit encoding on most Unix systems
  • The runtime uses 16-bit encoded unicode characters.

Therefore, the interface uses the fixed char16_t type. This fixed the test failures on Linux.

@swaroop-sridhar swaroop-sridhar merged commit bfa10f1 into dotnet:master Apr 24, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants