Skip to content

Commit e68e981

Browse files
Net7 (#328)
* Retarget to net7 * Target net7 * Update docs +semver minor
1 parent 7eb9841 commit e68e981

File tree

18 files changed

+72
-39
lines changed

18 files changed

+72
-39
lines changed

.github/workflows/cd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup .NET
1717
uses: actions/setup-dotnet@v1
1818
with:
19-
dotnet-version: 6.0.x
19+
dotnet-version: 7.0.x
2020
- name: Package
2121
run: dotnet run --project build/Build.csproj -- --target Package
2222
- uses: actions/upload-artifact@v2

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Setup .NET
2828
uses: actions/setup-dotnet@v1
2929
with:
30-
dotnet-version: 6.0.x
30+
dotnet-version: 7.0.x
3131
- name: Test
3232
run: dotnet run --project build/Build.csproj -- --target Test --configuration ${{ matrix.build_config }} --clean
3333
- name: Coveralls

Engine/Engine.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<Nullable>enable</Nullable>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net7.0</TargetFramework>
66
<PackageId>textrude.engine</PackageId>
77
<Description>The engine for Textrude</Description>
88
<Authors>Neil MacMullen</Authors>
@@ -22,10 +22,10 @@
2222
<PackageReference Include="Humanizer" Version="2.14.1" />
2323
<PackageReference Include="Microsoft.Recognizers.Text" Version="1.8.6" />
2424
<PackageReference Include="Microsoft.Recognizers.Text.DateTime" Version="1.8.6" />
25-
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
26-
<PackageReference Include="Scriban" Version="5.5.1" />
25+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
26+
<PackageReference Include="Scriban" Version="5.7.0" />
2727
<PackageReference Include="System.Collections.Immutable" Version="7.0.0" />
28-
<PackageReference Include="YamlDotNet" Version="12.3.1" />
28+
<PackageReference Include="YamlDotNet" Version="13.0.2" />
2929
</ItemGroup>
3030

3131
</Project>

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ For **text-processing** or **data-processing**
4646

4747
## Download/build
4848

49-
**Textrude requires [.Net 6.0](https://dotnet.microsoft.com/download/dotnet6.0). If it's not already on your machine you will be prompted to install it.**
49+
**Textrude requires [.Net 7.0](https://dotnet.microsoft.com/download/dotnet7.0). If it's not already on your machine you will be prompted to install it.**
5050

5151
**To run TextrudeInteractive v1.3 and up the [WebView2 runtime] is required. If this is not already installed on your PC you can obtain it from (https://developer.microsoft.com/en-us/microsoft-edge/webview2/)** (This is *not* required if you just want to run the CLI tool.)
5252

@@ -58,8 +58,8 @@ For **text-processing** or **data-processing**
5858

5959
## What's new
6060

61-
### vNext (source only)
62-
- Retarget to Net6
61+
### 1.8.0 (source/binary)
62+
- Retarget to Net7
6363
- Fix bug where a StackOverflowException could be thrown if textrude.to_csv/to_json/to_yaml was called on recursive object
6464
- Add [snippet](doc/snippets.md) support for script editor (thanks to Olof Wistrand)
6565

ScriptLibrary/ScriptLibrary.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
</PropertyGroup>
66

77
<ItemGroup>

SharedApplication/SharedApplication.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
<PropertyGroup>
44
<Nullable>enable</Nullable>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net7.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="CommandLineParser" Version="2.9.1" />
10-
<PackageReference Include="YamlDotNet" Version="12.3.1" />
10+
<PackageReference Include="YamlDotNet" Version="13.0.2" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

Tests/ApplicationEngineTests.cs

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ public void CodeCompletionRejectsLibraryMethods()
6464
.WithTemplate(@"
6565
{{
6666
func __library ; ret 1;end;
67-
func notlibrary ; ret 1;end;
68-
end
6967
}}")
7068
.Render()
7169
.ModelPaths()
@@ -74,11 +72,27 @@ public void CodeCompletionRejectsLibraryMethods()
7472

7573
offeredPaths
7674
.Should()
77-
.Contain("notlibrary");
75+
.NotContain("__library");
76+
}
77+
78+
[TestMethod]
79+
public void CodeCompletionIncludesFunctions()
80+
{
81+
var offeredPaths = new ApplicationEngine(_rte)
82+
.WithTemplate(@"
83+
{{
84+
func myfunc ; ret 1;end;
85+
}}")
86+
.Render()
87+
.ModelPaths()
88+
.Select(p => p.Render())
89+
.ToArray();
7890

7991
offeredPaths
8092
.Should()
81-
.NotContain("__library");
93+
.Contain("myfunc");
94+
95+
8296
}
8397

8498

Tests/Tests.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

99
<ItemGroup>
1010

11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
12-
<PackageReference Include="FluentAssertions" Version="6.9.0" />
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
12+
<PackageReference Include="FluentAssertions" Version="6.10.0" />
1313
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
1414
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
1515

@@ -18,7 +18,7 @@
1818
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1919
</PackageReference>
2020

21-
<PackageReference Include="TimeZoneConverter" Version="6.0.1" />
21+
<PackageReference Include="TimeZoneConverter" Version="6.1.0" />
2222
</ItemGroup>
2323

2424
<ItemGroup>

Textrude.sln

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,27 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TextrudeInteractive", "Text
1313
EndProject
1414
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{69945C04-7A0A-4643-9B89-C03AFC72D707}"
1515
ProjectSection(SolutionItems) = preProject
16+
doc\buildFromSource.md = doc\buildFromSource.md
1617
doc\buildSystemIntegration.md = doc\buildSystemIntegration.md
1718
doc\builtIns.md = doc\builtIns.md
19+
doc\changeHistory.md = doc\changeHistory.md
1820
doc\changelist.json = doc\changelist.json
21+
doc\cmdPipe.md = doc\cmdPipe.md
1922
dynamicOutput.md = dynamicOutput.md
23+
doc\dynamicOutput.md = doc\dynamicOutput.md
2024
doc\environmentAndDefinitions.md = doc\environmentAndDefinitions.md
25+
doc\exportInvocation.md = doc\exportInvocation.md
26+
doc\fileLinkage.md = doc\fileLinkage.md
27+
doc\format_conversion.md = doc\format_conversion.md
28+
doc\getBinaries.md = doc\getBinaries.md
2129
doc\gettingStarted.md = doc\gettingStarted.md
2230
doc\lib.md = doc\lib.md
2331
doc\multiModel.md = doc\multiModel.md
2432
README.md = README.md
2533
snippets.md = snippets.md
34+
doc\snippets.md = doc\snippets.md
35+
doc\syntaxExtensions.md = doc\syntaxExtensions.md
36+
doc\textrude_convenience.md = doc\textrude_convenience.md
2637
doc\userLibrary.md = doc\userLibrary.md
2738
EndProjectSection
2839
EndProject
@@ -36,6 +47,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "build\Build.csproj
3647
EndProject
3748
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub workflows", "GitHub workflows", "{02A73D75-89E1-4C65-8799-A3A9DBE32A40}"
3849
ProjectSection(SolutionItems) = preProject
50+
.github\workflows\cd.yaml = .github\workflows\cd.yaml
3951
.github\workflows\ci.yaml = .github\workflows\ci.yaml
4052
EndProjectSection
4153
EndProject

Textrude/Properties/PublishProfiles/LinuxX64.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
88
<Platform>Any CPU</Platform>
99
<PublishDir>..\publish\linux</PublishDir>
1010
<PublishProtocol>FileSystem</PublishProtocol>
11-
<TargetFramework>net6.0</TargetFramework>
11+
<TargetFramework>net7.0</TargetFramework>
1212
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
1313
<SelfContained>false</SelfContained>
1414
<PublishSingleFile>True</PublishSingleFile>

Textrude/Properties/PublishProfiles/WinX64.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
88
<Platform>Any CPU</Platform>
99
<PublishDir>..\publish</PublishDir>
1010
<PublishProtocol>FileSystem</PublishProtocol>
11-
<TargetFramework>net6.0</TargetFramework>
11+
<TargetFramework>net7.0</TargetFramework>
1212
<SelfContained>false</SelfContained>
1313
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
1414
<PublishSingleFile>True</PublishSingleFile>

Textrude/Textrude.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Nullable>enable</Nullable>
55
<OutputType>Exe</OutputType>
6-
<TargetFramework>net6.0</TargetFramework>
6+
<TargetFramework>net7.0</TargetFramework>
77
</PropertyGroup>
88

99
<PropertyGroup>

TextrudeInteractive/Properties/PublishProfiles/WinX64.pubxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
88
<Platform>Any CPU</Platform>
99
<PublishDir>..\publish</PublishDir>
1010
<PublishProtocol>FileSystem</PublishProtocol>
11-
<TargetFramework>net6.0-windows</TargetFramework>
11+
<TargetFramework>net7.0-windows</TargetFramework>
1212
<SelfContained>false</SelfContained>
1313
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
1414
<PublishSingleFile>True</PublishSingleFile>

TextrudeInteractive/TextrudeInteractive.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net6.0-windows</TargetFramework>
5+
<TargetFramework>net7.0-windows</TargetFramework>
66
<UseWPF>true</UseWPF>
77
</PropertyGroup>
88

@@ -36,8 +36,8 @@
3636
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3737
</PackageReference>
3838
<PackageReference Include="MaterialDesignExtensions" Version="3.3.0" />
39-
<PackageReference Include="MaterialDesignThemes" Version="4.7.1" />
40-
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1518.46" />
39+
<PackageReference Include="MaterialDesignThemes" Version="4.8.0" />
40+
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1661.34" />
4141
<PackageReference Include="Ookii.Dialogs.Wpf" Version="5.0.1" />
4242
<PackageReference Include="System.Reactive" Version="5.0.0" />
4343
</ItemGroup>

build/Build.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>Exe</OutputType>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net7.0</TargetFramework>
55
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
66
</PropertyGroup>
77
<ItemGroup>
8-
<PackageReference Include="Cake.Frosting" Version="2.3.0" />
9-
<PackageReference Include="Spectre.Console" Version="0.44.0" />
8+
<PackageReference Include="Cake.Frosting" Version="3.0.0" />
9+
<PackageReference Include="Spectre.Console" Version="0.46.0" />
1010
</ItemGroup>
1111
</Project>

build/Program.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.IO;
33
using Build.Tasks;
4+
using Cake.Core;
45
using Cake.Frosting;
56

67
namespace Build;
@@ -22,9 +23,9 @@ public static int Main(string[] args)
2223

2324
public class BuildSetup : FrostingSetup<BuildContext>
2425
{
25-
public override void Setup(BuildContext context)
26+
public override void Setup(BuildContext buildContext,ISetupContext setupContext)
2627
{
27-
context.Describe();
28+
buildContext.Describe();
2829
}
2930
}
3031

doc/changeHistory.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Full change history
22

3+
4+
### 1.8.0 (source/binary)
5+
- Retarget to Net7
6+
- Fix bug where a StackOverflowException could be thrown if textrude.to_csv/to_json/to_yaml was called on recursive object
7+
- Add [snippet](doc/snippets.md) support for script editor (thanks to Olof Wistrand)
8+
39
### v1.7.0 (source/binary)
410
- Chocolatey install is available.
511
- A number of cli [convenience commands](doc/textrude_convenience.md) have been added to make it easier to process data files.
@@ -66,4 +72,4 @@
6672
- Docker image support - thanks to [Martin Hochstrasser](https://github.com/highstreeto)
6773

6874
### v1.1.0
69-
- first public release
75+
- first public release

doc/lib.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ line2
2323
Do not modify by hand - your changes will be lost .
2424
2525
26-
Built: 10:41:36 AM on Tuesday, 17 May 2022
27-
Machine: HP-OFFICE
28-
User: neilm
26+
Built: 04:11:02 PM on Saturday, 25 Mar 2023
27+
Machine: BEAST
28+
User: User
2929
3030
*/
3131
@@ -849,9 +849,9 @@ autogenwarning
849849
Do not modify by hand - your changes will be lost .
850850

851851

852-
Built: 10:41:36 AM on Tuesday, 17 May 2022
853-
Machine: HP-OFFICE
854-
User: neilm
852+
Built: 04:11:02 PM on Saturday, 25 Mar 2023
853+
Machine: BEAST
854+
User: User
855855

856856
*/
857857

0 commit comments

Comments
 (0)