Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Offline feature work #3485

Merged
merged 21 commits into from
Jun 12, 2016
Merged

Offline feature work #3485

merged 21 commits into from
Jun 12, 2016

Conversation

livarcocc
Copy link

Implements a feature that adds a nuget packages archive to the SDK.
When the user uses dotnet for the first time, we use that archive to prime the nuget cache without having to hit the network.
Also added the first time use welcome message (fixes https://github.com/dotnet/cli/issues/3404#event-687899575).

cc @blackdwarf @ericstj @piotrpMSFT @brthor @eerhardt

@livarcocc
Copy link
Author

@dotnet-bot Test Windows_NT x64 Release Build please
@dotnet-bot Test Windows_NT x86 Debug Build please

@@ -4,6 +4,6 @@
MAJOR_VERSION=1
MINOR_VERSION=0
PATCH_VERSION=0
RELEASE_SUFFIX=preview2
RELEASE_SUFFIX=preview3

This comment was marked as spam.

You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
Configuring...
-------------------
A command is running to initially populate your local package cache, to improve restorespeed and enable offline access. This command will take up to a minute to complete and will only happen once.";

This comment was marked as spam.

ericstj and others added 17 commits June 10, 2016 16:53
This is a direct copy of the CS folder from the 16.02 SDK package.

I've added a README to indicate where this code came from.
We're builiding a library and don't need the application-related source
so I've removed this in addition to fixing the source to compile as
NETStandard1.0.
This type will archive multiple files de-duplicated in a zip with a
central manifest that describes how to recreate the actual layout.
In addition, any other zip file will be expanded and deduplicated
so that we can further reduce the size of those zips/nupkgs.
All of these are placed in a zip with no-compression, essentially
using the zip as only a container.  We then LZMA compress that
container to achieve maximum compression.
d added the first time use welcome text as well as some E2E tests.
Renaming destinationPath to destinationRelativePath for clarity.  This
string represents the path relative to the extract directory to which
files will be written.

We were missing an Interlocked.Increment during a parallel operation.
…XPERIENCE env variable to have a way to turn off the feature.
…the first time experience. If we can get a handle for this sentinel, we proceed with the first time run, otherwise, it means there is a first time experience running already, in which case we continue running dotnet normally, even though the final (real) sentinel is not present yet. This prevents multiple dotnet commands from running the first time experience in parallel and prevents us from running into parallel nuget restores.
Added copyright headers to all the 'dotnet' code and cleaned up to match
repo style guidelines.
public class NuGetCacheSentinel : INuGetCacheSentinel
{
public static readonly string SENTINEL = $"{Product.Version}.dotnetSentinel";
public static readonly string INPROGRESS_SENTINEL = $"{Product.Version}.inprogress.dotnetSentinel";

This comment was marked as spam.

…because the nuget cache folder did not exist yet. Which translated to us understanding that a first time experience was already running. Now, before creating the handle, we check if the nuget folder exists, if it doesn't, we create it, instead of waiting for nuget to do that during restore.
…CompileTargets and replaced with CompileCliSDk. Also used stage1 to generate the archive for stage2.
@livarcocc
Copy link
Author

@dotnet-bot Test Ubuntu x64 Release Build

@livarcocc
Copy link
Author

@dotnet-bot Test OpenSUSE13.2 x64 Debug Build

@livarcocc
Copy link
Author

@dotnet-bot Test Debian8.2 x64 Debug Build please

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants