Skip to content

Commit

Permalink
[WIP] Do not remove a root package that is not explicitly specified i…
Browse files Browse the repository at this point in the history
…n ChiselIgnores
  • Loading branch information
0xced committed Mar 12, 2024
1 parent beace6f commit 64affc6
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions samples/SqlClientSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
var result = await command.ExecuteScalarAsync();

Console.WriteLine($"{result}");
_ = new BinaryData(Array.Empty<byte>());
return 0;
}
catch (Exception exception)
Expand Down
1 change: 1 addition & 0 deletions samples/SqlClientSample/SqlClientSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
<PackageReference Include="System.Memory.Data" Version="1.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ digraph
"System.Diagnostics.EventLog/8.0.0"
"System.IdentityModel.Tokens.Jwt/6.35.0" [ color = lightcoral ]
"System.IO.FileSystem.AccessControl/5.0.0" [ color = lightcoral ]
"System.Memory.Data/1.0.2" [ color = lightcoral ]
"System.Memory.Data/1.0.2"
"System.Runtime.Caching/8.0.0"
"System.Runtime.CompilerServices.Unsafe/6.0.0" [ color = lightcoral ]
"System.Security.AccessControl/5.0.0" [ color = lightcoral ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class System.Diagnostics.DiagnosticSource/6.0.1 removed
class System.Diagnostics.EventLog/8.0.0 default
class System.IdentityModel.Tokens.Jwt/6.35.0 removed
class System.IO.FileSystem.AccessControl/5.0.0 removed
class System.Memory.Data/1.0.2 removed
class System.Memory.Data/1.0.2 default
class System.Runtime.Caching/8.0.0 default
class System.Runtime.CompilerServices.Unsafe/6.0.0 removed
class System.Security.AccessControl/5.0.0 removed
Expand Down
2 changes: 1 addition & 1 deletion tests/Chisel.Tests/DependencyGraphTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public async Task SqlClientGraph(string graphFormat)
"System.Text.Json",
];
var assetsFile = GetAssetsPath("SqlClientGraph.json");
var graph = new DependencyGraph(resolvedPackages, assetsFile, tfm: "net8.0", rid: "win-x64", ignores: []);
var graph = new DependencyGraph(resolvedPackages, assetsFile, tfm: "net8.0-windows", rid: "win-x64", ignores: []);
var (removed, notFound, removedRoots) = graph.Remove([ "Azure.Identity", "Microsoft.IdentityModel.JsonWebTokens", "Microsoft.IdentityModel.Protocols.OpenIdConnect" ]);
await using var writer = new StringWriter();

Expand Down
17 changes: 11 additions & 6 deletions tests/Chisel.Tests/ProjectAssets/SqlClientGraph.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 3,
"targets": {
"net8.0": {
"net8.0-windows7.0": {
"Azure.Core/1.35.0": {
"type": "package",
"dependencies": {
Expand Down Expand Up @@ -632,7 +632,7 @@
}
}
},
"net8.0/win-x64": {
"net8.0-windows7.0/win-x64": {
"Azure.Core/1.35.0": {
"type": "package",
"dependencies": {
Expand Down Expand Up @@ -2504,20 +2504,25 @@
}
},
"projectFileDependencyGroups": {
"net8.0": [
"net8.0-windows7.0": [
"Microsoft.Data.SqlClient >= 5.2.0",
"Microsoft.Identity.Client >= 4.56.0"
"Microsoft.Identity.Client >= 4.56.0",
"System.Memory.Data >= 1.0.2"
]
},
"project": {
"version": "1.0.0",
"frameworks": {
"net8.0": {
"targetAlias": "net8.0",
"net8.0-windows7.0": {
"targetAlias": "net8.0-windows",
"dependencies": {
"Microsoft.Data.SqlClient": {
"target": "Package",
"version": "[5.2.0, )"
},
"System.Memory.Data": {
"target": "Package",
"version": "[1.0.2, )"
}
},
"imports": [
Expand Down

0 comments on commit 64affc6

Please sign in to comment.