sdk icon indicating copy to clipboard operation
sdk copied to clipboard

Publish the console host in its own nuget package

Open Sridhar-MS opened this issue 11 years ago • 16 comments

This is needed for xplat publish. dotnet/sdk#4381 discusses the scenario of publishing for all runtimes when --runtime switch is not specified by the user.

Sridhar-MS avatar Nov 20 '15 18:11 Sridhar-MS

@gkhanna79 this is dependent on the outcome of our host conversations. Assigning to you until that story fleshes out a bit.

TheRealPiotrP avatar Nov 23 '15 20:11 TheRealPiotrP

@piotrpMSFT Is this about the shared host?

gkhanna79 avatar Nov 23 '15 20:11 gkhanna79

@gkhanna79 yes, this is regarding shared host @schellap started a conversation about this today. I'm curious if NuGet is really the right answer... Or should these be zip files. Will they really behave like NuGets?

TheRealPiotrP avatar Dec 30 '15 09:12 TheRealPiotrP

What is the design for cross-architecture compilation for CLI as that will influence what this shapes up to be?

gkhanna79 avatar Dec 30 '15 14:12 gkhanna79

@anurse, how will you be consuming the host?

@piotrpMSFT, I asked this mainly for servicing the host using the dotnet servicing methods.

I am thinking two types of servicing:

  1. Explicit COREHOST_LIBPATH to load custom hosts like corerun and also clihost (current host)
  2. Use the DOTNET_SERVICING/PackageName/PackageVersion to load a serviced host dll if 1 doesn't exist. PackageName and PackageVersion will be baked into the host at build time.

schellap avatar Dec 30 '15 17:12 schellap

Also, ILC and other folks can start using the unified host without dependency on dotnet through the Nuget package.

schellap avatar Dec 30 '15 18:12 schellap

These really don't sound like NuGet packages, but I am totally in favor of the idea of distributing them as versioned artifacts on a feed that is consumed by the CLI somehow. In general, I don't want to create the impression that an application takes a dependency on the host.

I think the best way to do this would be to work out how we will be packaging runtimes (which should NOT be in NuGet packages, IMHO ;)), and include the host in that package. That means that for x-plat publishing, you would use dotnet CLI commands to fetch and install a runtime package for a different platform and then dotnet-compile and dotnet-publish can use those.

analogrelay avatar Jan 03 '16 23:01 analogrelay

I don't want to create the impression that an application takes a dependency on the host.

I agree. That said, servicing of the host is independent of how cross-compilation/publishing is going to work.

Let us use https://github.com/dotnet/cli/issues/438 to discuss how servicing of the host should work and use this to have a base package inplace for the host (something that we can do right now).

gkhanna79 avatar Jan 04 '16 19:01 gkhanna79

@Sridhar-MS Can you confirm you still need this issue to be addressed (i.e. need a nuget package for the universal host)?

gkhanna79 avatar Jan 04 '16 23:01 gkhanna79

I don't want to create the impression that an application takes a dependency on the host.

Currently, the app takes a dependency on NETStandard.Library NuGet package which brings in the runtime. We can make an entry for the host nupkg in the standard library package.

@gkhanna79, moving forward, I believe we need the nupkg for both aquisition and servicing. For now, we can assume the host would come from the dotnet CLI, but like @anurse also suggests, it should come from NETStandard.Library just like the CLR.

As far as servicing is concerned, there are two models:

  1. DOTNET_SERVICING location to support ASP .NET/CLI servicing models
  2. App local DLL copy to support a pull model by the user
  3. Lastly, user can themselves replace the corehost.exe as last resort from the host nupkg feed.

Cc @ericstj

schellap avatar Jan 05 '16 04:01 schellap

We can make an entry for the host nupkg in the standard library package.

Host is an implementation detail that shouldn't be reflected in the standard library since it is not part of the library (and we shouldn't use standard library as means to deliver the host).

it should come from NETStandard.Library just like the CLR.

@anurse Can you please elaborate on why this is required?

gkhanna79 avatar Jan 05 '16 22:01 gkhanna79

it should come from NETStandard.Library just like the CLR.

@anurse Can you please elaborate on why this is required?

not really, since I agree with you that it should not be part of the Standard Library, neither should the CLR itself IMO. The runtime (and probably the host) should come using their own packaging mechanism.

analogrelay avatar Jan 05 '16 23:01 analogrelay

@schellap What are the next steps on this?

gkhanna79 avatar Jan 08 '16 16:01 gkhanna79

@piotrpMSFT could you please move this to RTM? For RC, I am thinking about having the user pull the latest corehost from the dotnet/cli servicing drop.

schellap avatar Jan 25 '16 20:01 schellap

This is done.

TheRealPiotrP avatar Mar 03 '16 08:03 TheRealPiotrP

Are we happy with how this is done? Right now there is a circular dependency here (CLI repo produces package, corefx consumes it, CLI consumes corefx).

ericstj avatar Mar 03 '16 15:03 ericstj