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: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6;net7.0;net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<VersionPrefix>0.2.0</VersionPrefix>
<Description>A configuration provider for pkl files.</Description>
Expand Down
14 changes: 10 additions & 4 deletions Pkl.Tests/Pkl.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 13 additions & 2 deletions Pkl.Tests/Projects/ProjectTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public async Task EvaluatorLoadsProjectWithDependency()
});

Assert.Null(loadProjectException);
Assert.Equal($"file://{project1Path}", project.ProjectFileUri);
Assert.Equal(filePathToUri(project1Path), project.ProjectFileUri);

// Evaluator settings
Assert.Equivalent(new ProjectEvaluatorSettings
Expand Down Expand Up @@ -157,7 +157,7 @@ public async Task EvaluatorLoadsProjectWithDependency()
{
{ "storks", new ProjectLocalDependency
{
ProjectFileUri = $"file://{project2Path}",
ProjectFileUri = filePathToUri(project2Path),
PackageUri = "package://example.com/storks@0.5.0",
Dependencies = new ProjectDependencies
{
Expand All @@ -184,4 +184,15 @@ private static string CreateTestProjects()

return tempDir;
}

private string filePathToUri(string path)
{
var uriBuilder = new UriBuilder()
{
Scheme = Uri.UriSchemeFile,
Path = path,
Host = ""
};
return uriBuilder.Uri.ToString();
}
}
2 changes: 1 addition & 1 deletion Pkl/ModuleSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static ModuleSource FileSource(params string[] pathParts)
{
Scheme = Uri.UriSchemeFile,
Path = path,
Host = "" // Prevent "localohst" authority
Host = "" // Prevent "localhost" authority
};

return new ModuleSource
Expand Down
4 changes: 2 additions & 2 deletions Pkl/Pkl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<PackageId>PklCsharp</PackageId>
<Description>A C# wrapper for the pkl language (https://pkl-lang.org).</Description>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<VersionPrefix>0.2.0</VersionPrefix>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand All @@ -13,7 +13,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MessagePack" Version="2.5.140" />
<PackageReference Include="MessagePack" Version="3.0.308" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="all" />
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions PklGenerator.Tests/PklGenerator.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down