Skip to content

Commit

Permalink
Project updates (#25)
Browse files Browse the repository at this point in the history
Enhancements:
- Enable auto updating compiler tool by the VSCode language extension

Technical
- Migrate tests to central project management
  • Loading branch information
degory committed Apr 2, 2024
1 parent 92a3c62 commit d1724f1
Show file tree
Hide file tree
Showing 20 changed files with 47 additions and 42 deletions.
10 changes: 7 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"image": "ghcr.io/degory/ghul/devcontainer:dotnet",
"containerUser": "vscode",
"extensions": [
"degory.ghul"
]
"customizations": {
"vscode": {
"extensions": [
"degory.ghul"
]
}
}
}
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<Version>0.3.0-alpha.1</Version>
<Version>0.3.0-alpha.5</Version>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 degory
Copyright (c) 2024 degory

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion templates/ghul-classlib/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"ghul.compiler": {
"version": "0.7.5",
"version": "0.8.35",
"commands": [
"ghul-compiler"
]
Expand Down
2 changes: 1 addition & 1 deletion templates/ghul-classlib/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
}
]
}
]
]
}
4 changes: 3 additions & 1 deletion templates/ghul-classlib/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<Project>
<PropertyGroup>
<Version>0.1.0-alpha.1</Version>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<GhulCompiler>dotnet ghul-compiler</GhulCompiler>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ghul.runtime" />
<GhulSources Include="src/**/*.ghul" />
</ItemGroup>
</Project>
5 changes: 2 additions & 3 deletions templates/ghul-classlib/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project>
<ItemGroup>
<!-- ghūl runtime -->
<PackageVersion Include="ghul.runtime" Version="1.3.1" />
<PackageVersion Include="ghul.runtime" Version="1.3.3" />
</ItemGroup>
</Project>
</Project>
7 changes: 1 addition & 6 deletions templates/ghul-classlib/ghul-classlib.ghulproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>

<PackageId>example.classlib</PackageId>
<Version>0.0.1-alpha.1</Version>

<GhulCompiler>dotnet ghul-compiler</GhulCompiler>
<PackageOutputPath>./nupkg</PackageOutputPath>
</PropertyGroup>

<ItemGroup>
<GhulSources Include="src/**/*.ghul" />
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions templates/ghul-classlib/ghul.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"update_compiler_tool": true
}
1 change: 1 addition & 0 deletions templates/ghul-classlib/src/ghul-classlib.ghul
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace ClassLibTemplate is
_writer: IO.TextWriter;

init(writer: IO.TextWriter) is
assert writer? else "writer is null";
_writer = writer;
si

Expand Down
2 changes: 1 addition & 1 deletion templates/ghul-console/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"ghul.compiler": {
"version": "0.7.5",
"version": "0.8.35",
"commands": [
"ghul-compiler"
]
Expand Down
4 changes: 3 additions & 1 deletion templates/ghul-console/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<Project>
<PropertyGroup>
<Version>0.1.0-alpha.1</Version>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<GhulCompiler>dotnet ghul-compiler</GhulCompiler>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ghul.runtime" />
<GhulSources Include="src/**/*.ghul" />
</ItemGroup>
</Project>
5 changes: 2 additions & 3 deletions templates/ghul-console/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project>
<ItemGroup>
<!-- ghūl runtime -->
<PackageVersion Include="ghul.runtime" Version="1.3.1" />
<PackageVersion Include="ghul.runtime" Version="1.3.3" />
</ItemGroup>
</Project>
</Project>
7 changes: 0 additions & 7 deletions templates/ghul-console/ghul-console.ghulproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,5 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>

<GhulCompiler>dotnet ghul-compiler</GhulCompiler>
</PropertyGroup>

<ItemGroup>
<GhulSources Include="src/**/*.ghul" />
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions templates/ghul-console/ghul.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"update_compiler_tool": true
}
2 changes: 1 addition & 1 deletion tests/ghul-classlib/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"ghul.compiler": {
"version": "0.7.5",
"version": "0.8.35",
"commands": [
"ghul-compiler"
]
Expand Down
8 changes: 7 additions & 1 deletion tests/ghul-classlib/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<GhulCompiler>dotnet ghul-compiler</GhulCompiler>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ghul.runtime" Version="1.3.1" />
<PackageReference Include="ghul.runtime" />
<GhulSources Include="src/**/*.ghul" />
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions tests/ghul-classlib/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<Project>
<ItemGroup>
<PackageVersion Include="ghul.runtime" Version="1.3.3" />
<PackageVersion Include="example.classlib" Version="0.0.1-alpha.1" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions tests/ghul-classlib/tests.ghul
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ namespace ClassLibTemplate.Tests is
Given_a_TextWriter__Greeter_greet__should_write_Hello_world_to_that_writer() is
@test()

let string_writer = new IO.StringWriter();
let string_writer = IO.StringWriter();

let test_object = new HELLO_WORLD_GREETER(string_writer);
let test_object = HELLO_WORLD_GREETER(string_writer);

test_object.greet();

Expand Down
10 changes: 1 addition & 9 deletions tests/ghul-classlib/tests.ghulproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,9 @@
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Version>0.0.1-alpha.1</Version>

<GhulCompiler>dotnet ghul-compiler</GhulCompiler>
</PropertyGroup>

<ItemGroup>
<GhulSources Include="**/*.ghul" />

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />

<PackageReference Include="example.classlib" Version="0.1.0-alpha.1" />
<PackageReference Include="example.classlib" />
</ItemGroup>
</Project>

0 comments on commit d1724f1

Please sign in to comment.