Merge pull request #2118 from dotnet/pakrym/no-csv-deps

Remove csv deps file generation
This commit is contained in:
Pavel Krymets 2016-03-30 16:09:34 -07:00
commit dc4bec0307
10 changed files with 2 additions and 52 deletions

View file

@ -265,7 +265,6 @@ namespace Microsoft.DotNet.Cli.Build
// Rename the .deps file
var destinationDeps = Path.Combine(SharedFrameworkNameAndVersionRoot, $"{SharedFrameworkName}.deps.json");
File.Move(Path.Combine(SharedFrameworkNameAndVersionRoot, "framework.deps"), Path.Combine(SharedFrameworkNameAndVersionRoot, $"{SharedFrameworkName}.deps"));
File.Move(Path.Combine(SharedFrameworkNameAndVersionRoot, "framework.deps.json"), destinationDeps);
// Generate RID fallback graph

View file

@ -201,11 +201,6 @@ namespace Microsoft.Dotnet.Cli.Compiler.Common
{
Directory.CreateDirectory(_runtimeOutputPath);
var depsFilePath = Path.Combine(_runtimeOutputPath, _compilerOptions.OutputName + FileNameSuffixes.Deps);
File.WriteAllLines(depsFilePath, exporter
.GetDependencies(LibraryType.Package)
.SelectMany(GenerateLines));
var includeCompile = _compilerOptions.PreserveCompilationContext == true;
var exports = exporter.GetAllExports().ToArray();
@ -253,25 +248,5 @@ namespace Microsoft.Dotnet.Cli.Compiler.Common
appConfig.Save(stream);
}
}
private static IEnumerable<string> GenerateLines(LibraryExport export)
{
return GenerateLines(export, export.RuntimeAssemblyGroups.GetDefaultAssets(), "runtime")
.Union(GenerateLines(export, export.NativeLibraryGroups.GetDefaultAssets(), "native"));
}
private static IEnumerable<string> GenerateLines(LibraryExport export, IEnumerable<LibraryAsset> items, string type)
{
return items.Select(i => DepsFormatter.EscapeRow(new[]
{
export.Library.Identity.Type.Value,
export.Library.Identity.Name,
export.Library.Identity.Version.ToNormalizedString(),
export.Library.Hash,
type,
i.Name,
i.RelativePath
}));
}
}
}

View file

@ -5,7 +5,6 @@ namespace Microsoft.DotNet.ProjectModel
{
public static class FileNameSuffixes
{
public const string Deps = ".deps";
public const string DepsJson = ".deps.json";
public const string RuntimeConfigJson = ".runtimeconfig.json";
public const string RuntimeConfigDevJson = ".runtimeconfig.dev.json";

View file

@ -44,14 +44,6 @@ namespace Microsoft.DotNet.ProjectModel
}
}
public string Deps
{
get
{
return Path.ChangeExtension(Assembly, FileNameSuffixes.Deps);
}
}
public string DepsJson
{
get
@ -84,7 +76,6 @@ namespace Microsoft.DotNet.ProjectModel
{
if (!Framework.IsDesktop())
{
yield return Deps;
yield return DepsJson;
yield return RuntimeConfigJson;
}

View file

@ -183,7 +183,6 @@ namespace Microsoft.DotNet.Tools.Publish
var buildOutputPaths = context.GetOutputPaths(configuration, buildBasePath);
PublishFiles(
new[] {
buildOutputPaths.RuntimeFiles.Deps,
buildOutputPaths.RuntimeFiles.DepsJson,
buildOutputPaths.RuntimeFiles.RuntimeConfigJson
},

View file

@ -26,7 +26,6 @@ namespace Microsoft.DotNet.Tools.Builder.Tests
"TestApp" + FileNameSuffixes.DotNet.DynamicLib,
"TestApp" + FileNameSuffixes.DotNet.ProgramDatabase,
"TestApp" + FileNameSuffixes.CurrentPlatform.Exe,
"TestApp" + FileNameSuffixes.Deps,
"TestApp" + FileNameSuffixes.DepsJson,
"TestLibrary" + FileNameSuffixes.DotNet.DynamicLib,
"TestLibrary" + FileNameSuffixes.DotNet.ProgramDatabase

View file

@ -7,15 +7,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests
{
public class BuildPortableTests : TestBase
{
[Fact]
public void BuildingAPortableProjectProducesDepsFile()
{
var testInstance = TestAssetsManager.CreateTestInstance("PortableTests").WithLockFiles();
var netstandardappOutput = Build(testInstance);
netstandardappOutput.Should().Exist().And.HaveFile("PortableApp.deps");
}
[Fact]
public void BuildingAPortableProjectProducesDepsJsonFile()

View file

@ -202,7 +202,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests
new DirectoryInfo(outputDir).Should().HaveFiles(
new [] { "MyApp.dll", "MyApp" + buildCommand.GetExecutableExtension(),
"MyApp.runtimeconfig.json", "MyApp.deps", "MyApp.deps.json" });
"MyApp.runtimeconfig.json", "MyApp.deps.json" });
}
private void CopyProjectToTempDir(string projectDir, TempDirectory tempDir)

View file

@ -29,7 +29,6 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
publishDir.Should().HaveFiles(new[]
{
"PortableAppWithNative.dll",
"PortableAppWithNative.deps",
"PortableAppWithNative.deps.json"
});
@ -66,7 +65,6 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
publishDir.Should().HaveFiles(new[]
{
"PortableAppWithIntentionalManagedDowngrade.dll",
"PortableAppWithIntentionalManagedDowngrade.deps",
"PortableAppWithIntentionalManagedDowngrade.deps.json",
"System.Linq.dll"
});

View file

@ -125,7 +125,6 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.dll");
publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.pdb");
publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.dll.config");
publishCommand.GetOutputDirectory().Should().NotHaveFile("TestLibraryLesser.deps");
publishCommand.GetOutputDirectory().Should().NotHaveFile("TestLibraryLesser.deps.json");
// dependencies should also be copied
@ -138,7 +137,6 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.dll");
publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.pdb");
publishCommand.GetOutputDirectory().Should().NotHaveFile("TestLibraryLesser.dll.config");
publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.deps");
publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.deps.json");
// dependencies should also be copied