Remove csv deps

This commit is contained in:
Pavel Krymets 2016-03-29 10:01:13 -07:00
parent c617ee1d80
commit c8a632bac1
10 changed files with 2 additions and 52 deletions

View file

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

View file

@ -201,11 +201,6 @@ namespace Microsoft.Dotnet.Cli.Compiler.Common
{ {
Directory.CreateDirectory(_runtimeOutputPath); 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 includeCompile = _compilerOptions.PreserveCompilationContext == true;
var exports = exporter.GetAllExports().ToArray(); var exports = exporter.GetAllExports().ToArray();
@ -253,25 +248,5 @@ namespace Microsoft.Dotnet.Cli.Compiler.Common
appConfig.Save(stream); 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 static class FileNameSuffixes
{ {
public const string Deps = ".deps";
public const string DepsJson = ".deps.json"; public const string DepsJson = ".deps.json";
public const string RuntimeConfigJson = ".runtimeconfig.json"; public const string RuntimeConfigJson = ".runtimeconfig.json";
public const string RuntimeConfigDevJson = ".runtimeconfig.dev.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 public string DepsJson
{ {
get get
@ -84,7 +76,6 @@ namespace Microsoft.DotNet.ProjectModel
{ {
if (!Framework.IsDesktop()) if (!Framework.IsDesktop())
{ {
yield return Deps;
yield return DepsJson; yield return DepsJson;
yield return RuntimeConfigJson; yield return RuntimeConfigJson;
} }

View file

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

View file

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

View file

@ -7,15 +7,7 @@ namespace Microsoft.DotNet.Tools.Builder.Tests
{ {
public class BuildPortableTests : TestBase 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] [Fact]
public void BuildingAPortableProjectProducesDepsJsonFile() public void BuildingAPortableProjectProducesDepsJsonFile()

View file

@ -202,7 +202,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Tests
new DirectoryInfo(outputDir).Should().HaveFiles( new DirectoryInfo(outputDir).Should().HaveFiles(
new [] { "MyApp.dll", "MyApp" + buildCommand.GetExecutableExtension(), 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) private void CopyProjectToTempDir(string projectDir, TempDirectory tempDir)

View file

@ -29,7 +29,6 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
publishDir.Should().HaveFiles(new[] publishDir.Should().HaveFiles(new[]
{ {
"PortableAppWithNative.dll", "PortableAppWithNative.dll",
"PortableAppWithNative.deps",
"PortableAppWithNative.deps.json" "PortableAppWithNative.deps.json"
}); });
@ -66,7 +65,6 @@ namespace Microsoft.DotNet.Tools.Publish.Tests
publishDir.Should().HaveFiles(new[] publishDir.Should().HaveFiles(new[]
{ {
"PortableAppWithIntentionalManagedDowngrade.dll", "PortableAppWithIntentionalManagedDowngrade.dll",
"PortableAppWithIntentionalManagedDowngrade.deps",
"PortableAppWithIntentionalManagedDowngrade.deps.json", "PortableAppWithIntentionalManagedDowngrade.deps.json",
"System.Linq.dll" "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.dll");
publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.pdb"); publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.pdb");
publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.dll.config"); publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.dll.config");
publishCommand.GetOutputDirectory().Should().NotHaveFile("TestLibraryLesser.deps");
publishCommand.GetOutputDirectory().Should().NotHaveFile("TestLibraryLesser.deps.json"); publishCommand.GetOutputDirectory().Should().NotHaveFile("TestLibraryLesser.deps.json");
// dependencies should also be copied // 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.dll");
publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.pdb"); publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.pdb");
publishCommand.GetOutputDirectory().Should().NotHaveFile("TestLibraryLesser.dll.config"); publishCommand.GetOutputDirectory().Should().NotHaveFile("TestLibraryLesser.dll.config");
publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.deps");
publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.deps.json"); publishCommand.GetOutputDirectory().Should().HaveFile("TestLibraryLesser.deps.json");
// dependencies should also be copied // dependencies should also be copied