Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
<add key="dotnet-try" value="https://dotnet.myget.org/F/dotnet-try/api/v3/index.json" />
Copy link
Contributor

Choose a reason for hiding this comment

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

We are using dotnet-try again?

Copy link
Member Author

Choose a reason for hiding this comment

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

that's the main repo where the latest https://github.com/dotnet/interactive/ nugets get published.

Copy link
Member Author

Choose a reason for hiding this comment

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

The repo we used earlier, https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json did not have any updates since the last version we used.

</packageSources>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>Microsoft.Spark.Extensions.DotNet.Interactive.UnitTest</RootNamespace>
<IsPackable>false</IsPackable>

<RestoreAdditionalProjectSources>https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json</RestoreAdditionalProjectSources>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Moq" Version="4.10.0" />
<PackageReference Include="Microsoft.DotNet.Interactive" Version="1.0.0-beta.20262.1" />
<PackageReference Include="Microsoft.DotNet.Interactive" Version="1.0.0-beta.20319.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public void TestPackageResolver()
};
var probingPaths = new List<DirectoryInfo> { new DirectoryInfo(packageRootPath) };

var mockPackageRestoreContextWrapper = new Mock<PackageRestoreContextWrapper>();
mockPackageRestoreContextWrapper
var mockSupportNugetWrapper = new Mock<SupportNugetWrapper>();
mockSupportNugetWrapper
.SetupGet(m => m.ResolvedPackageReferences)
.Returns(new ResolvedPackageReference[]
{
Expand All @@ -53,7 +53,7 @@ public void TestPackageResolver()
probingPaths)
});

var packageResolver = new PackageResolver(mockPackageRestoreContextWrapper.Object);
var packageResolver = new PackageResolver(mockSupportNugetWrapper.Object);
IEnumerable<string> actualFiles = packageResolver.GetFiles(tempDir.Path);

string metadataFilePath =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class AssemblyKernelExtension : IKernelExtension
private const string TempDirEnvVar = "DOTNET_SPARK_EXTENSION_INTERACTIVE_TMPDIR";

private readonly PackageResolver _packageResolver =
new PackageResolver(new PackageRestoreContextWrapper());
new PackageResolver(new SupportNugetWrapper());

/// <summary>
/// Called by the Microsoft.DotNet.Interactive Assembly Extension Loader.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
<RootNamespace>Microsoft.Spark.Extensions.DotNet.Interactive</RootNamespace>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<IsPackable>true</IsPackable>
<!-- NU5100 warns that a dll was found outside the 'lib' folder while packaging. DotNet.Interactive expects extension dlls in the 'interactive-extensions/dotnet'. -->
<!-- NU5100 warns that a dll was found outside the 'lib' folder while packaging. DotNet.Interactive expects extension dlls in 'interactive-extensions/dotnet'. -->
<NoWarn>NU5100;$(NoWarn)</NoWarn>

<Description>DotNet Interactive Extension for .NET for Apache Spark</Description>
<PackageReleaseNotes>https://github.com/dotnet/spark/tree/master/docs/release-notes</PackageReleaseNotes>
<PackageTags>spark;dotnet;csharp;interactive;dotnet-interactive</PackageTags>

<RestoreAdditionalProjectSources>https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json</RestoreAdditionalProjectSources>
</PropertyGroup>

<ItemGroup>
Expand All @@ -22,7 +20,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Interactive.CSharp" Version="1.0.0-beta.20262.1">
<PackageReference Include="Microsoft.DotNet.Interactive.CSharp" Version="1.0.0-beta.20319.1">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ namespace Microsoft.Spark.Extensions.DotNet.Interactive
{
internal class PackageResolver
{
private readonly PackageRestoreContextWrapper _packageRestoreContextWrapper;
private readonly SupportNugetWrapper _supportNugetWrapper;
private readonly ConcurrentDictionary<string, byte> _filesCopied;
private long _metadataCounter;

internal PackageResolver(PackageRestoreContextWrapper packageRestoreContextWrapper)
internal PackageResolver(SupportNugetWrapper supportNugetWrapper)
{
_packageRestoreContextWrapper = packageRestoreContextWrapper;
_supportNugetWrapper = supportNugetWrapper;
_filesCopied = new ConcurrentDictionary<string, byte>();
_metadataCounter = 0;
}
Expand Down Expand Up @@ -112,7 +112,7 @@ internal IEnumerable<string> GetFiles(string writePath)
private IEnumerable<ResolvedNuGetPackage> GetNewPackages()
{
IEnumerable<ResolvedPackageReference> packages =
_packageRestoreContextWrapper.ResolvedPackageReferences;
_supportNugetWrapper.ResolvedPackageReferences;
foreach (ResolvedPackageReference package in packages)
{
IEnumerable<FileInfo> files =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

namespace Microsoft.Spark.Extensions.DotNet.Interactive
{
internal class PackageRestoreContextWrapper
internal class SupportNugetWrapper
{
internal virtual IEnumerable<ResolvedPackageReference> ResolvedPackageReferences =>
((ISupportNuget)KernelInvocationContext.Current.HandlingKernel)
.PackageRestoreContext
.ResolvedPackageReferences;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netcoreapp3.1</TargetFrameworks>
<RootNamespace>Microsoft.Spark.Worker</RootNamespace>
<GenerateDocumentationFile>true</GenerateDocumentationFile>

<!--Microsoft.DotNet.DependencyManager requires this additional source-->
<RestoreAdditionalProjectSources>https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json</RestoreAdditionalProjectSources>
</PropertyGroup>

<ItemGroup>
Expand Down