-
Notifications
You must be signed in to change notification settings - Fork 217
Conversation
Thanks for the detailed feedback @vitek-karas. |
@vitek-karas I've committed the changes except file renames/moves in this change d181371 |
@vitek-karas with the latest commit, I believe I've addressed all of your comments. Thanks. |
Thanks @vitek-karas, I've addressed your comments in this checkin: 2f379ec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
679d686
to
fe3316a
Compare
This changes implements the [app-host support](https://github.com/dotnet/designs/blob/master/accepted/single-file/design.md#the-host ) for executing .net core apps published as a single file. This change implements [stage 1](https://github.com/dotnet/designs/blob/master/accepted/single-file/staging.md#1-self-extractor), which [extracts out](https://github.com/dotnet/designs/blob/master/accepted/single-file/extract.md ) the embedded files to disk. On startup, the AppHost detects whether it's own binary is a .net core bundle. If so, on the first run, the host extracts embedded files to: * $DOTNET_BUNDLE_EXTRACT_BASE_DIR/.net/<app>/<id>/... if DOTNET_BUNDLE_EXTRACT_BASE_DIR is set * $TMPDIR/.net/<app>/<id>/... otherwise. On subsequent runs, the files extracted above are reused. AppHost (X64) size increase: Windows 5KB Linux 11KB Mac 6KB Testing: Tested the single-file extraction locally with several kinds of dotnet apps (wpf, winforms, web, mvc, console, etc.) Added a test case that runs a bundled apps with sub directories Add a test for processing bundles
* Use spaces instead of tabs for indentation * Fix trace messages * Fix some rebasing problems * Improve pal::get_temp_dir() on windows. * Fix a few minor issues (function ordering etc) * Read/Write file extraction in 8KB chunks * Also fix a bug in the extractor for a similar issue. * Rename bundle processor to bundle runner
On Ubuntu, $TMPDIR is not set. So, add an option to try /var/tmp or /tmp directories.
@vitek-karas I had to make another small change: 3de5b31 to get tmp-directory on Ubuntu. |
@vitek-karas, I merged the change, in order to facilitate its flow into SDK repo, where I have other changes to be tested with this AppHost. If you have any concerns with 3de5b31, I'll address it separately. I'm also planning to put out another PR with more test cases. |
@swaroop-sridhar Thanks! LGTM |
* AppHost: Support bundles (stage 1) This changes implements the [app-host support](https://github.com/dotnet/designs/blob/master/accepted/single-file/design.md#the-host ) for executing .net core apps published as a single file. This change implements [stage 1](https://github.com/dotnet/designs/blob/master/accepted/single-file/staging.mddotnet/core-setup#1-self-extractor), which [extracts out](https://github.com/dotnet/designs/blob/master/accepted/single-file/extract.md ) the embedded files to disk. On startup, the AppHost detects whether it's own binary is a .net core bundle. If so, on the first run, the host extracts embedded files to: * if `DOTNET_BUNDLE_EXTRACT_BASE_DIR` is set, to `$DOTNET_BUNDLE_EXTRACT_BASE_DIR/.net/<app>/<id>/...` . Otherwise, * On Windows, to `%TEMP%/.net/<app>/<id>/...` * On Unix systems, if `$TMPDIR` is set, to `$TMPDIR/.net/<app>/<id>/...` . Otherwise to `/var/tmp` or `/tmp` if those paths are available and accessible. On subsequent runs, the files extracted above are reused. AppHost (X64) size increase: Windows 5KB Linux 11KB Mac 6KB Testing: Tested the single-file extraction locally with several kinds of dotnet apps (wpf, winforms, web, mvc, console, etc.) Added a test case that runs a bundled apps with sub directories Also fixed a bug in the Microsoft.NET.HostModel.extractor wrt processing bundled files in chunks. Commit migrated from dotnet/core-setup@4a01e55
This changes implements the app-host support for executing .net core apps published as a single file.
This change implements stage 1, which extracts out the embedded files to disk.
On startup, the AppHost detects whether it's own binary is a .net core bundle.
If so, on the first run, the host extracts embedded files to:
On subsequent runs, the files extracted above are reused.
AppHost (X64) size increase:
Windows 5KB, Linux 11KB, Mac 6KB
Testing:
Tested the single-file extraction locally with several kinds of dotnet apps
(wpf, winforms, web, mvc, console, etc.)
Added a test case that runs a bundled apps with sub directories