diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 6b7095305..4f487990c 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,10 +3,11 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "8.0.10", + "version": "9.0.0", "commands": [ "dotnet-ef" - ] + ], + "rollForward": false } } -} +} \ No newline at end of file diff --git a/.github/workflows/fw-lite.yaml b/.github/workflows/fw-lite.yaml index 37043dfda..f36d825e6 100644 --- a/.github/workflows/fw-lite.yaml +++ b/.github/workflows/fw-lite.yaml @@ -35,10 +35,14 @@ jobs: submodules: true - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '9.x' - uses: actions/setup-node@v4 with: node-version-file: './frontend/package.json' + + - name: Setup Maui + run: dotnet workload install maui-windows + - name: Set Version id: setVersion shell: bash @@ -86,7 +90,7 @@ jobs: path: frontend/viewer/dist - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '9.x' - name: Dotnet build working-directory: backend/FwLite/LocalWebApp @@ -123,7 +127,7 @@ jobs: path: frontend/viewer/dist - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '9.x' - name: Dotnet build working-directory: backend/FwLite/LocalWebApp @@ -156,7 +160,7 @@ jobs: path: frontend/viewer/dist - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '9.x' - name: Setup Maui run: dotnet workload install maui-windows diff --git a/.github/workflows/integration-test-gha.yaml b/.github/workflows/integration-test-gha.yaml index 98a5dbe86..6a0b58f31 100644 --- a/.github/workflows/integration-test-gha.yaml +++ b/.github/workflows/integration-test-gha.yaml @@ -22,6 +22,9 @@ jobs: - uses: actions/checkout@v4 with: submodules: true + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.x' - name: Install Task uses: arduino/setup-task@v2 with: diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index 49bd0dd2d..dd233b7d2 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -85,7 +85,7 @@ jobs: env: DOTNET_INSTALL_DIR: ${{ inputs.runs-on == 'self-hosted' && '/opt/hostedtoolcache/dotnet' || '' }} #poor man's conditional with: - dotnet-version: '8.x' + dotnet-version: '9.x' - uses: MatteoH2O1999/setup-python@429b7dee8a48c31eb72ce0b420ea938ff51c2f11 # v3.2.1 id: python if: ${{ inputs.runs-on != 'windows-latest' && !env.act && inputs.hg-version == '3' }} diff --git a/.github/workflows/lexbox-api.yaml b/.github/workflows/lexbox-api.yaml index d0774bcd0..135e5ae95 100644 --- a/.github/workflows/lexbox-api.yaml +++ b/.github/workflows/lexbox-api.yaml @@ -49,7 +49,7 @@ jobs: submodules: true - uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.x' + dotnet-version: '9.x' - name: Install Task uses: arduino/setup-task@v2 with: diff --git a/backend/Directory.Build.props b/backend/Directory.Build.props index e70320586..574e961ef 100644 --- a/backend/Directory.Build.props +++ b/backend/Directory.Build.props @@ -9,7 +9,10 @@ $(MSBuildProjectDirectory)/bin/container/ + dev + net9.0 false + enable enable Nullable diff --git a/backend/Dockerfile b/backend/Dockerfile index 4c4630a7f..3a43c094f 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,10 +1,10 @@ # syntax=docker/dockerfile:1 -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build COPY . . # WORKDIR /src diff --git a/backend/FixFwData/FixFwData.csproj b/backend/FixFwData/FixFwData.csproj index 7c217f173..e96561fca 100644 --- a/backend/FixFwData/FixFwData.csproj +++ b/backend/FixFwData/FixFwData.csproj @@ -2,14 +2,17 @@ WinExe - net8.0 - enable - enable + FixFwData + FixFwData + SIL Global + SIL Global + LexBoxApi Testing + Copyright © 2024 SIL Global - - + + diff --git a/backend/FwHeadless/FwHeadless.csproj b/backend/FwHeadless/FwHeadless.csproj index 82dcf0521..9f11a6cc4 100644 --- a/backend/FwHeadless/FwHeadless.csproj +++ b/backend/FwHeadless/FwHeadless.csproj @@ -8,10 +8,11 @@ - + + diff --git a/backend/FwLite/FwDataMiniLcmBridge.Tests/Fixtures/MockFwProjectList.cs b/backend/FwLite/FwDataMiniLcmBridge.Tests/Fixtures/MockFwProjectList.cs index 43e3a65b8..6463670c1 100644 --- a/backend/FwLite/FwDataMiniLcmBridge.Tests/Fixtures/MockFwProjectList.cs +++ b/backend/FwLite/FwDataMiniLcmBridge.Tests/Fixtures/MockFwProjectList.cs @@ -7,7 +7,7 @@ public class MockFwProjectList(IOptions config, MockFwProjec { public override IEnumerable EnumerateProjects() { - return loader.Projects.Keys.Select(k => new FwDataProject(k, config.Value.ProjectsFolder)); + return loader.Projects.Keys.Select(k => new FwDataProject(k, _config.Value.ProjectsFolder)); } public override FwDataProject? GetProject(string name) diff --git a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj index 13c53ae52..3ec451900 100644 --- a/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj +++ b/backend/FwLite/FwDataMiniLcmBridge.Tests/FwDataMiniLcmBridge.Tests.csproj @@ -1,9 +1,6 @@ - net8.0 - enable - enable false true @@ -18,16 +15,16 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + - + - all - runtime; build; native; contentfiles; analyzers; buildtransitive + all + runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/FwLite/FwDataMiniLcmBridge/FieldWorksProjectList.cs b/backend/FwLite/FwDataMiniLcmBridge/FieldWorksProjectList.cs index 47cb91b57..f77bf944c 100644 --- a/backend/FwLite/FwDataMiniLcmBridge/FieldWorksProjectList.cs +++ b/backend/FwLite/FwDataMiniLcmBridge/FieldWorksProjectList.cs @@ -6,15 +6,17 @@ namespace FwDataMiniLcmBridge; public class FieldWorksProjectList(IOptions config) { + protected readonly IOptions _config = config; + public virtual IEnumerable EnumerateProjects() { - if (!Directory.Exists(config.Value.ProjectsFolder)) Directory.CreateDirectory(config.Value.ProjectsFolder); - foreach (var directory in Directory.EnumerateDirectories(config.Value.ProjectsFolder)) + if (!Directory.Exists(_config.Value.ProjectsFolder)) Directory.CreateDirectory(_config.Value.ProjectsFolder); + foreach (var directory in Directory.EnumerateDirectories(_config.Value.ProjectsFolder)) { var projectName = Path.GetFileName(directory); if (string.IsNullOrEmpty(projectName)) continue; if (!File.Exists(Path.Combine(directory, projectName + ".fwdata"))) continue; - yield return new FwDataProject(projectName, config.Value.ProjectsFolder); + yield return new FwDataProject(projectName, _config.Value.ProjectsFolder); } } diff --git a/backend/FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj b/backend/FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj index 5ab11b140..dd6ae3743 100644 --- a/backend/FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj +++ b/backend/FwLite/FwDataMiniLcmBridge/FwDataMiniLcmBridge.csproj @@ -1,25 +1,22 @@  - net8.0 - enable - enable $(ApplicationDisplayVersion) $(ApplicationDisplayVersion) - - - - - - + + + + + + diff --git a/backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj b/backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj index 043dacd5d..71ce7fca5 100644 --- a/backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj +++ b/backend/FwLite/FwLiteDesktop/FwLiteDesktop.csproj @@ -2,7 +2,7 @@ - net8.0-windows10.0.19041.0 + net9.0-windows10.0.19041.0 @@ -80,7 +80,7 @@ - + diff --git a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj index ea6572e46..32e57446e 100644 --- a/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj +++ b/backend/FwLite/FwLiteProjectSync.Tests/FwLiteProjectSync.Tests.csproj @@ -1,10 +1,6 @@ - net8.0 - enable - enable - false true @@ -18,16 +14,16 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - + - all - runtime; build; native; contentfiles; analyzers; buildtransitive + all + runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/backend/FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj b/backend/FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj index 7e4c26e04..c6ffaa655 100644 --- a/backend/FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj +++ b/backend/FwLite/FwLiteProjectSync/FwLiteProjectSync.csproj @@ -1,9 +1,6 @@  - net8.0 - enable - enable $(ApplicationDisplayVersion) $(ApplicationDisplayVersion) @@ -14,8 +11,8 @@ - - + + diff --git a/backend/FwLite/LcmCrdt.Tests/DataModelSnapshotTests.VerifyDbModel.verified.txt b/backend/FwLite/LcmCrdt.Tests/DataModelSnapshotTests.VerifyDbModel.verified.txt index a7b2cc8c5..75ded662f 100644 --- a/backend/FwLite/LcmCrdt.Tests/DataModelSnapshotTests.VerifyDbModel.verified.txt +++ b/backend/FwLite/LcmCrdt.Tests/DataModelSnapshotTests.VerifyDbModel.verified.txt @@ -328,4 +328,4 @@ Relational:ViewName: Relational:ViewSchema: Annotations: - ProductVersion: 8.0.4 \ No newline at end of file + ProductVersion: 9.0.0 \ No newline at end of file diff --git a/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj b/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj index 2b9260c62..740f40f31 100644 --- a/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj +++ b/backend/FwLite/LcmCrdt.Tests/LcmCrdt.Tests.csproj @@ -1,9 +1,6 @@ - net8.0 - enable - enable false true @@ -15,14 +12,14 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + - + - all - runtime; build; native; contentfiles; analyzers; buildtransitive + all + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/backend/FwLite/LcmCrdt.Tests/OpenProjectTests.cs b/backend/FwLite/LcmCrdt.Tests/OpenProjectTests.cs index cdaa72ab0..702431f66 100644 --- a/backend/FwLite/LcmCrdt.Tests/OpenProjectTests.cs +++ b/backend/FwLite/LcmCrdt.Tests/OpenProjectTests.cs @@ -10,6 +10,7 @@ public class OpenProjectTests public async Task OpeningAProjectWorks() { var sqliteConnectionString = "OpeningAProjectWorks.sqlite"; + if (File.Exists(sqliteConnectionString)) File.Delete(sqliteConnectionString); var builder = Host.CreateEmptyApplicationBuilder(null); builder.Services.AddLcmCrdtClient(); using var host = builder.Build(); diff --git a/backend/FwLite/LcmCrdt/LcmCrdt.csproj b/backend/FwLite/LcmCrdt/LcmCrdt.csproj index c2382ec8a..985d055c6 100644 --- a/backend/FwLite/LcmCrdt/LcmCrdt.csproj +++ b/backend/FwLite/LcmCrdt/LcmCrdt.csproj @@ -1,9 +1,6 @@  - net8.0 - enable - enable $(ApplicationDisplayVersion) $(ApplicationDisplayVersion) @@ -14,12 +11,13 @@ - + + - - - + + + diff --git a/backend/FwLite/LocalWebApp/LocalWebApp.csproj b/backend/FwLite/LocalWebApp/LocalWebApp.csproj index 6d03a3e54..301cc5491 100644 --- a/backend/FwLite/LocalWebApp/LocalWebApp.csproj +++ b/backend/FwLite/LocalWebApp/LocalWebApp.csproj @@ -1,9 +1,6 @@ - net8.0 - enable - enable Linux true false @@ -20,9 +17,9 @@ - - - + + + diff --git a/backend/FwLite/LocalWebApp/Routes/HistoryRoutes.cs b/backend/FwLite/LocalWebApp/Routes/HistoryRoutes.cs index 4ea387061..354d0e9ff 100644 --- a/backend/FwLite/LocalWebApp/Routes/HistoryRoutes.cs +++ b/backend/FwLite/LocalWebApp/Routes/HistoryRoutes.cs @@ -7,6 +7,7 @@ using LinqToDB.EntityFrameworkCore; using LocalWebApp.Hubs; using Microsoft.OpenApi.Models; +using MiniLcm.Models; namespace LocalWebApp.Routes; @@ -32,7 +33,7 @@ public static IEndpointConventionBuilder MapHistoryRoutes(this WebApplication ap { //todo requires the timestamp to be exact, otherwise the change made on that timestamp will not be included //consider using a commitId and looking up the timestamp, but then we should be exact to the commit which we aren't right now. - return await dataModel.GetAtTime(new DateTimeOffset(timestamp), entityId); + return await dataModel.GetAtTime(new DateTimeOffset(timestamp), entityId); }); group.MapGet("/{entityId}", (Guid entityId, ICrdtDbContext dbcontext) => diff --git a/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj b/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj index 86bcc41df..ecb6c92fe 100644 --- a/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj +++ b/backend/FwLite/MiniLcm.Tests/MiniLcm.Tests.csproj @@ -1,10 +1,6 @@ - net8.0 - enable - enable - false true @@ -12,9 +8,12 @@ - - - + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/FwLite/MiniLcm/MiniLcm.csproj b/backend/FwLite/MiniLcm/MiniLcm.csproj index 8f4dc0c48..7635880b1 100644 --- a/backend/FwLite/MiniLcm/MiniLcm.csproj +++ b/backend/FwLite/MiniLcm/MiniLcm.csproj @@ -1,16 +1,13 @@  - net8.0 - enable - enable $(ApplicationDisplayVersion) $(ApplicationDisplayVersion) - + diff --git a/backend/LexBoxApi/LexBoxApi.csproj b/backend/LexBoxApi/LexBoxApi.csproj index baffc9fb9..e73660242 100644 --- a/backend/LexBoxApi/LexBoxApi.csproj +++ b/backend/LexBoxApi/LexBoxApi.csproj @@ -1,12 +1,8 @@ - net8.0 - enable - enable Linux true - dev 7392cddf-9b3b-441c-9316-203bb5c4a6bc 1 @@ -27,21 +23,21 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + - - - + + + @@ -53,6 +49,7 @@ + diff --git a/backend/LexBoxApi/dev.Dockerfile b/backend/LexBoxApi/dev.Dockerfile index bbedcbe09..e27c54bd4 100644 --- a/backend/LexBoxApi/dev.Dockerfile +++ b/backend/LexBoxApi/dev.Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1 -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build EXPOSE 80 EXPOSE 443 RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ @@ -9,7 +9,7 @@ RUN mkdir -p /var/www && chown -R www-data:www-data /var/www USER www-data:www-data WORKDIR /src/backend # Copy the main source project files -COPY */*.csproj *.sln ./ +COPY */*.csproj *.sln Directory.Build.props ./ # move them into the proper sub folders, based on the name of the project RUN for file in $(ls *.csproj); do dir=${file%.*}; mkdir -p ${dir}/ && mv -v $file ${dir}/; done # Do the same for csproj files in slightly different hierarchies diff --git a/backend/LexCore/LexCore.csproj b/backend/LexCore/LexCore.csproj index 276363f1a..db0930955 100644 --- a/backend/LexCore/LexCore.csproj +++ b/backend/LexCore/LexCore.csproj @@ -1,14 +1,10 @@ - net8.0 - enable - enable - dev - + diff --git a/backend/LexData/LexData.csproj b/backend/LexData/LexData.csproj index 1ad6d57d9..4b7d7080f 100644 --- a/backend/LexData/LexData.csproj +++ b/backend/LexData/LexData.csproj @@ -1,28 +1,22 @@ - net8.0 - enable - enable - dev - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - + + + + + - + diff --git a/backend/LfClassicData/LfClassicData.csproj b/backend/LfClassicData/LfClassicData.csproj index cbe4974fa..2a35852ac 100644 --- a/backend/LfClassicData/LfClassicData.csproj +++ b/backend/LfClassicData/LfClassicData.csproj @@ -1,15 +1,12 @@  - net8.0 - enable - enable - - + + diff --git a/backend/LfNext/LcmDebugger/LcmDebugger.csproj b/backend/LfNext/LcmDebugger/LcmDebugger.csproj index e47e15988..92e8860a6 100644 --- a/backend/LfNext/LcmDebugger/LcmDebugger.csproj +++ b/backend/LfNext/LcmDebugger/LcmDebugger.csproj @@ -2,9 +2,6 @@ Exe - net8.0 - enable - enable diff --git a/backend/SyncReverseProxy/Dockerfile b/backend/SyncReverseProxy/Dockerfile deleted file mode 100644 index 8c431359b..000000000 --- a/backend/SyncReverseProxy/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base -WORKDIR /app -EXPOSE 80 -EXPOSE 443 - -FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build -WORKDIR /src -COPY ["SyncReverseProxy/SyncReverseProxy.csproj", "SyncReverseProxy/"] -RUN dotnet restore "SyncReverseProxy/SyncReverseProxy.csproj" -COPY . . -WORKDIR "/src/SyncReverseProxy" -RUN dotnet build "SyncReverseProxy.csproj" -c Release -o /app/build - -FROM build AS publish -RUN dotnet publish "SyncReverseProxy.csproj" -c Release -o /app/publish - -FROM base AS final -WORKDIR /app -COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "SyncReverseProxy.dll"] diff --git a/backend/SyncReverseProxy/SyncReverseProxy.csproj b/backend/SyncReverseProxy/SyncReverseProxy.csproj index 0a58ba985..fe72988bf 100644 --- a/backend/SyncReverseProxy/SyncReverseProxy.csproj +++ b/backend/SyncReverseProxy/SyncReverseProxy.csproj @@ -1,27 +1,23 @@ - net8.0 - enable - enable Linux LexSyncReverseProxy - dev - - + + - - + + - - - + + + - + diff --git a/backend/Testing/Testing.csproj b/backend/Testing/Testing.csproj index 04fa2ae8c..cda474609 100644 --- a/backend/Testing/Testing.csproj +++ b/backend/Testing/Testing.csproj @@ -1,10 +1,6 @@ - net8.0 - enable - enable - false $(MSBuildProjectDirectory) @@ -16,7 +12,7 @@ - + @@ -27,22 +23,22 @@ - - + + - - - - + + + + - + - runtime; build; native; contentfiles; analyzers; buildtransitive all + runtime; build; native; contentfiles; analyzers; buildtransitive runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/backend/harmony b/backend/harmony index 33b1aba76..7d0a3efe5 160000 --- a/backend/harmony +++ b/backend/harmony @@ -1 +1 @@ -Subproject commit 33b1aba763633e8fc63f97b1d02332d1e1739c5a +Subproject commit 7d0a3efe5f99a7c92de37309a1a2e3abe4171cf4