From cceab96c08b7800d70e4263a2045746f60b319e5 Mon Sep 17 00:00:00 2001 From: Pierre Chalamet Date: Fri, 13 Jun 2025 21:22:56 +0200 Subject: [PATCH 01/10] Faster build (#176) Enforce the merkle tree unless retry/force is specified. --- .github/workflows/on-push-branch.yml | 2 +- .github/workflows/on-push-tag.yml | 2 +- .github/workflows/on-release-published.yml | 2 +- Makefile | 4 +- WORKSPACE | 2 +- global.json | 2 +- .../Terrabuild.Common.Tests.fsproj | 2 +- .../packages.lock.json | 66 +++-- .../Terrabuild.Common.fsproj | 4 +- src/Terrabuild.Common/packages.lock.json | 20 +- .../Terrabuild.Configuration.Tests.fsproj | 2 +- .../packages.lock.json | 72 +++-- .../packages.lock.json | 26 +- .../Terrabuild.Expressions.Tests.fsproj | 2 +- .../packages.lock.json | 68 +++-- src/Terrabuild.Expressions/packages.lock.json | 22 +- .../packages.lock.json | 6 +- src/Terrabuild.Extensions/packages.lock.json | 24 +- .../Terrabuild.Lang.Tests.fsproj | 2 +- src/Terrabuild.Lang.Tests/packages.lock.json | 70 +++-- src/Terrabuild.Lang/packages.lock.json | 24 +- .../Terrabuild.PubSub.Tests.fsproj | 2 +- .../packages.lock.json | 68 +++-- src/Terrabuild.PubSub/packages.lock.json | 22 +- .../Terrabuild.Scripting.Tests.fsproj | 2 +- .../packages.lock.json | 68 ++--- .../Terrabuild.Scripting.fsproj | 2 +- src/Terrabuild.Scripting/packages.lock.json | 32 +- src/Terrabuild.Tests/Terrabuild.Tests.fsproj | 2 +- src/Terrabuild.Tests/packages.lock.json | 92 +++--- src/Terrabuild/Core/Build.fs | 277 ++++++++---------- src/Terrabuild/Terrabuild.fsproj | 6 +- src/Terrabuild/packages.lock.json | 58 ++-- tools/DocGen/packages.lock.json | 6 +- 34 files changed, 542 insertions(+), 519 deletions(-) diff --git a/.github/workflows/on-push-branch.yml b/.github/workflows/on-push-branch.yml index 38c5490b..cece856b 100644 --- a/.github/workflows/on-push-branch.yml +++ b/.github/workflows/on-push-branch.yml @@ -23,7 +23,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: 9.0.203 + dotnet-version: 9.0.300 - name: Login to GitHub Container Registry uses: docker/login-action@v3 diff --git a/.github/workflows/on-push-tag.yml b/.github/workflows/on-push-tag.yml index 3ee2854c..9f9a59bd 100644 --- a/.github/workflows/on-push-tag.yml +++ b/.github/workflows/on-push-tag.yml @@ -27,7 +27,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: 9.0.203 + dotnet-version: 9.0.300 - name: Build & Publish run: make publish-all config=Release version=${{ env.BUILD_VERSION }} diff --git a/.github/workflows/on-release-published.yml b/.github/workflows/on-release-published.yml index dc7cc83f..146d32b0 100644 --- a/.github/workflows/on-release-published.yml +++ b/.github/workflows/on-release-published.yml @@ -17,7 +17,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v4 with: - dotnet-version: 9.0.203 + dotnet-version: 9.0.300 - name: Download Github Release artifacts uses: robinraju/release-downloader@v1.11 diff --git a/Makefile b/Makefile index 173dcf48..1a2cecef 100644 --- a/Makefile +++ b/Makefile @@ -73,10 +73,10 @@ docs: dotnet run --project tools/DocGen -- src/Terrabuild.Extensions/bin/$(config)/net9.0/Terrabuild.Extensions.xml ../terrabuild.io/content/docs/extensions self: clean publish - $(terrabuild) run build test dist --configuration $(config) --retry --debug --log --local-only + $(PWD)/.out/dotnet/terrabuild run build test dist --configuration $(config) --debug --log --retry --local-only self-logs: - $(terrabuild) logs build test dist --configuration $(config) --debug --log --local-only + $(PWD)/.out/dotnet/terrabuild logs build test dist --configuration $(config) --debug --log --local-only logs: $(terrabuild) logs build test dist --configuration $(config) --debug --log --local-only diff --git a/WORKSPACE b/WORKSPACE index a4a4488f..fd60fa85 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -26,7 +26,7 @@ target publish { } extension @dotnet { - container = "mcr.microsoft.com/dotnet/sdk:9.0.203" + container = "mcr.microsoft.com/dotnet/sdk:9.0.300" defaults { configuration = local.configuration } diff --git a/global.json b/global.json index 79790f9a..72053644 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,5 @@ { "sdk": { - "version": "9.0.203" + "version": "9.0.300" } } \ No newline at end of file diff --git a/src/Terrabuild.Common.Tests/Terrabuild.Common.Tests.fsproj b/src/Terrabuild.Common.Tests/Terrabuild.Common.Tests.fsproj index 7ccbe885..b4f1ab47 100644 --- a/src/Terrabuild.Common.Tests/Terrabuild.Common.Tests.fsproj +++ b/src/Terrabuild.Common.Tests/Terrabuild.Common.Tests.fsproj @@ -19,7 +19,7 @@ - + diff --git a/src/Terrabuild.Common.Tests/packages.lock.json b/src/Terrabuild.Common.Tests/packages.lock.json index 20f270d8..94d7fe76 100644 --- a/src/Terrabuild.Common.Tests/packages.lock.json +++ b/src/Terrabuild.Common.Tests/packages.lock.json @@ -4,9 +4,9 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "FsUnit": { "type": "Direct", @@ -20,12 +20,12 @@ }, "Microsoft.NET.Test.Sdk": { "type": "Direct", - "requested": "[17.13.0, )", - "resolved": "17.13.0", - "contentHash": "W19wCPizaIC9Zh47w8wWI/yxuqR7/dtABwOrc8r2jX/8mUNxM2vw4fXDh+DJTeogxV+KzKwg5jNNGQVwf3LXyA==", + "requested": "[17.14.1, )", + "resolved": "17.14.1", + "contentHash": "HJKqKOE+vshXra2aEHpi2TlxYX7Z9VFYkr+E5rwEvHC8eIXiyO+K9kNm8vmNom3e2rA56WqxU+/N9NJlLGXsJQ==", "dependencies": { - "Microsoft.CodeCoverage": "17.13.0", - "Microsoft.TestPlatform.TestHost": "17.13.0" + "Microsoft.CodeCoverage": "17.14.1", + "Microsoft.TestPlatform.TestHost": "17.14.1" } }, "NUnit": { @@ -52,11 +52,11 @@ }, "FSharp.SystemTextJson": { "type": "Transitive", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "Microsoft.ApplicationInsights": { @@ -69,13 +69,13 @@ }, "Microsoft.CodeCoverage": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9LIUy0y+DvUmEPtbRDw6Bay3rzwqFV8P4efTrK4CZhQle3M/QwLPjISghfcolmEGAPWxuJi6m98ZEfk4VR4Lfg==" + "resolved": "17.14.1", + "contentHash": "pmTrhfFIoplzFVbhVwUquT+77CbGH+h4/3mBpdmIlYtBi9nAB+kKI6dN3A/nV4DFi3wLLx/BlHIPK+MkbQ6Tpg==" }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "Microsoft.Testing.Extensions.Telemetry": { "type": "Transitive", @@ -121,25 +121,30 @@ }, "Microsoft.TestPlatform.ObjectModel": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "bt0E0Dx+iqW97o4A59RCmUmz/5NarJ7LRL+jXbSHod72ibL5XdNm1Ke+UO5tFhBG4VwHLcSjqq9BUSblGNWamw==", + "resolved": "17.14.1", + "contentHash": "xTP1W6Mi6SWmuxd3a+jj9G9UoC850WGwZUps1Wah9r1ZxgXhdJfj1QqDLJkFjHDCvN42qDL2Ps5KjQYWUU0zcQ==", "dependencies": { - "System.Reflection.Metadata": "1.6.0" + "System.Reflection.Metadata": "8.0.0" } }, "Microsoft.TestPlatform.TestHost": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9GGw08Dc3AXspjekdyTdZ/wYWFlxbgcF0s7BKxzVX+hzAwpifDOdxM+ceVaaJSQOwqt3jtuNlHn3XTpKUS9x9Q==", + "resolved": "17.14.1", + "contentHash": "d78LPzGKkJwsJXAQwsbJJ7LE7D1wB+rAyhHHAaODF+RDSQ0NgMjDFkSA1Djw18VrxO76GlKAjRUhl+H8NL8Z+Q==", "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.13.0", - "Newtonsoft.Json": "13.0.1" + "Microsoft.TestPlatform.ObjectModel": "17.14.1", + "Newtonsoft.Json": "13.0.3" } }, "Newtonsoft.Json": { "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" + "resolved": "13.0.3", + "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==" + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", @@ -148,15 +153,18 @@ }, "System.Reflection.Metadata": { "type": "Transitive", - "resolved": "1.6.0", - "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + "resolved": "8.0.0", + "contentHash": "ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==", + "dependencies": { + "System.Collections.Immutable": "8.0.0" + } }, "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } } diff --git a/src/Terrabuild.Common/Terrabuild.Common.fsproj b/src/Terrabuild.Common/Terrabuild.Common.fsproj index d18fb952..e5464797 100644 --- a/src/Terrabuild.Common/Terrabuild.Common.fsproj +++ b/src/Terrabuild.Common/Terrabuild.Common.fsproj @@ -18,8 +18,8 @@ - - + + diff --git a/src/Terrabuild.Common/packages.lock.json b/src/Terrabuild.Common/packages.lock.json index 9c653257..cb528832 100644 --- a/src/Terrabuild.Common/packages.lock.json +++ b/src/Terrabuild.Common/packages.lock.json @@ -4,25 +4,25 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "FSharp.SystemTextJson": { "type": "Direct", - "requested": "[1.3.13, )", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "requested": "[1.4.36, )", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Direct", - "requested": "[9.0.4, )", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "requested": "[9.0.6, )", + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "System.Text.Json": { "type": "Direct", diff --git a/src/Terrabuild.Configuration.Tests/Terrabuild.Configuration.Tests.fsproj b/src/Terrabuild.Configuration.Tests/Terrabuild.Configuration.Tests.fsproj index fe583556..d9534b83 100644 --- a/src/Terrabuild.Configuration.Tests/Terrabuild.Configuration.Tests.fsproj +++ b/src/Terrabuild.Configuration.Tests/Terrabuild.Configuration.Tests.fsproj @@ -16,7 +16,7 @@ - + diff --git a/src/Terrabuild.Configuration.Tests/packages.lock.json b/src/Terrabuild.Configuration.Tests/packages.lock.json index fc50363a..e2c1f89c 100644 --- a/src/Terrabuild.Configuration.Tests/packages.lock.json +++ b/src/Terrabuild.Configuration.Tests/packages.lock.json @@ -4,9 +4,9 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "FsUnit": { "type": "Direct", @@ -20,12 +20,12 @@ }, "Microsoft.NET.Test.Sdk": { "type": "Direct", - "requested": "[17.13.0, )", - "resolved": "17.13.0", - "contentHash": "W19wCPizaIC9Zh47w8wWI/yxuqR7/dtABwOrc8r2jX/8mUNxM2vw4fXDh+DJTeogxV+KzKwg5jNNGQVwf3LXyA==", + "requested": "[17.14.1, )", + "resolved": "17.14.1", + "contentHash": "HJKqKOE+vshXra2aEHpi2TlxYX7Z9VFYkr+E5rwEvHC8eIXiyO+K9kNm8vmNom3e2rA56WqxU+/N9NJlLGXsJQ==", "dependencies": { - "Microsoft.CodeCoverage": "17.13.0", - "Microsoft.TestPlatform.TestHost": "17.13.0" + "Microsoft.CodeCoverage": "17.14.1", + "Microsoft.TestPlatform.TestHost": "17.14.1" } }, "NUnit": { @@ -52,11 +52,11 @@ }, "FSharp.SystemTextJson": { "type": "Transitive", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "FsLexYacc": { @@ -86,13 +86,13 @@ }, "Microsoft.CodeCoverage": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9LIUy0y+DvUmEPtbRDw6Bay3rzwqFV8P4efTrK4CZhQle3M/QwLPjISghfcolmEGAPWxuJi6m98ZEfk4VR4Lfg==" + "resolved": "17.14.1", + "contentHash": "pmTrhfFIoplzFVbhVwUquT+77CbGH+h4/3mBpdmIlYtBi9nAB+kKI6dN3A/nV4DFi3wLLx/BlHIPK+MkbQ6Tpg==" }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "Microsoft.Testing.Extensions.Telemetry": { "type": "Transitive", @@ -138,25 +138,30 @@ }, "Microsoft.TestPlatform.ObjectModel": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "bt0E0Dx+iqW97o4A59RCmUmz/5NarJ7LRL+jXbSHod72ibL5XdNm1Ke+UO5tFhBG4VwHLcSjqq9BUSblGNWamw==", + "resolved": "17.14.1", + "contentHash": "xTP1W6Mi6SWmuxd3a+jj9G9UoC850WGwZUps1Wah9r1ZxgXhdJfj1QqDLJkFjHDCvN42qDL2Ps5KjQYWUU0zcQ==", "dependencies": { - "System.Reflection.Metadata": "1.6.0" + "System.Reflection.Metadata": "8.0.0" } }, "Microsoft.TestPlatform.TestHost": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9GGw08Dc3AXspjekdyTdZ/wYWFlxbgcF0s7BKxzVX+hzAwpifDOdxM+ceVaaJSQOwqt3jtuNlHn3XTpKUS9x9Q==", + "resolved": "17.14.1", + "contentHash": "d78LPzGKkJwsJXAQwsbJJ7LE7D1wB+rAyhHHAaODF+RDSQ0NgMjDFkSA1Djw18VrxO76GlKAjRUhl+H8NL8Z+Q==", "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.13.0", - "Newtonsoft.Json": "13.0.1" + "Microsoft.TestPlatform.ObjectModel": "17.14.1", + "Newtonsoft.Json": "13.0.3" } }, "Newtonsoft.Json": { "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" + "resolved": "13.0.3", + "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==" + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", @@ -165,22 +170,25 @@ }, "System.Reflection.Metadata": { "type": "Transitive", - "resolved": "1.6.0", - "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + "resolved": "8.0.0", + "contentHash": "ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==", + "dependencies": { + "System.Collections.Immutable": "8.0.0" + } }, "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.configuration": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Expressions": "[1.0.0, )", "Terrabuild.Lang": "[1.0.0, )" @@ -189,7 +197,7 @@ "terrabuild.expressions": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )" } @@ -197,7 +205,7 @@ "terrabuild.lang": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "FsLexYacc": "[11.3.0, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )", diff --git a/src/Terrabuild.Configuration/packages.lock.json b/src/Terrabuild.Configuration/packages.lock.json index 4bda0e5f..f4b07421 100644 --- a/src/Terrabuild.Configuration/packages.lock.json +++ b/src/Terrabuild.Configuration/packages.lock.json @@ -4,9 +4,9 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "System.Text.Json": { "type": "Direct", @@ -16,11 +16,11 @@ }, "FSharp.SystemTextJson": { "type": "Transitive", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "FsLexYacc": { @@ -42,22 +42,22 @@ }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.expressions": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )" } @@ -65,7 +65,7 @@ "terrabuild.lang": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "FsLexYacc": "[11.3.0, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )", diff --git a/src/Terrabuild.Expressions.Tests/Terrabuild.Expressions.Tests.fsproj b/src/Terrabuild.Expressions.Tests/Terrabuild.Expressions.Tests.fsproj index dde46e2f..eaf15f6a 100644 --- a/src/Terrabuild.Expressions.Tests/Terrabuild.Expressions.Tests.fsproj +++ b/src/Terrabuild.Expressions.Tests/Terrabuild.Expressions.Tests.fsproj @@ -16,7 +16,7 @@ - + diff --git a/src/Terrabuild.Expressions.Tests/packages.lock.json b/src/Terrabuild.Expressions.Tests/packages.lock.json index 757d0fd1..61f5c1d4 100644 --- a/src/Terrabuild.Expressions.Tests/packages.lock.json +++ b/src/Terrabuild.Expressions.Tests/packages.lock.json @@ -4,9 +4,9 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "FsUnit": { "type": "Direct", @@ -20,12 +20,12 @@ }, "Microsoft.NET.Test.Sdk": { "type": "Direct", - "requested": "[17.13.0, )", - "resolved": "17.13.0", - "contentHash": "W19wCPizaIC9Zh47w8wWI/yxuqR7/dtABwOrc8r2jX/8mUNxM2vw4fXDh+DJTeogxV+KzKwg5jNNGQVwf3LXyA==", + "requested": "[17.14.1, )", + "resolved": "17.14.1", + "contentHash": "HJKqKOE+vshXra2aEHpi2TlxYX7Z9VFYkr+E5rwEvHC8eIXiyO+K9kNm8vmNom3e2rA56WqxU+/N9NJlLGXsJQ==", "dependencies": { - "Microsoft.CodeCoverage": "17.13.0", - "Microsoft.TestPlatform.TestHost": "17.13.0" + "Microsoft.CodeCoverage": "17.14.1", + "Microsoft.TestPlatform.TestHost": "17.14.1" } }, "NUnit": { @@ -52,11 +52,11 @@ }, "FSharp.SystemTextJson": { "type": "Transitive", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "Microsoft.ApplicationInsights": { @@ -69,13 +69,13 @@ }, "Microsoft.CodeCoverage": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9LIUy0y+DvUmEPtbRDw6Bay3rzwqFV8P4efTrK4CZhQle3M/QwLPjISghfcolmEGAPWxuJi6m98ZEfk4VR4Lfg==" + "resolved": "17.14.1", + "contentHash": "pmTrhfFIoplzFVbhVwUquT+77CbGH+h4/3mBpdmIlYtBi9nAB+kKI6dN3A/nV4DFi3wLLx/BlHIPK+MkbQ6Tpg==" }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "Microsoft.Testing.Extensions.Telemetry": { "type": "Transitive", @@ -121,25 +121,30 @@ }, "Microsoft.TestPlatform.ObjectModel": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "bt0E0Dx+iqW97o4A59RCmUmz/5NarJ7LRL+jXbSHod72ibL5XdNm1Ke+UO5tFhBG4VwHLcSjqq9BUSblGNWamw==", + "resolved": "17.14.1", + "contentHash": "xTP1W6Mi6SWmuxd3a+jj9G9UoC850WGwZUps1Wah9r1ZxgXhdJfj1QqDLJkFjHDCvN42qDL2Ps5KjQYWUU0zcQ==", "dependencies": { - "System.Reflection.Metadata": "1.6.0" + "System.Reflection.Metadata": "8.0.0" } }, "Microsoft.TestPlatform.TestHost": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9GGw08Dc3AXspjekdyTdZ/wYWFlxbgcF0s7BKxzVX+hzAwpifDOdxM+ceVaaJSQOwqt3jtuNlHn3XTpKUS9x9Q==", + "resolved": "17.14.1", + "contentHash": "d78LPzGKkJwsJXAQwsbJJ7LE7D1wB+rAyhHHAaODF+RDSQ0NgMjDFkSA1Djw18VrxO76GlKAjRUhl+H8NL8Z+Q==", "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.13.0", - "Newtonsoft.Json": "13.0.1" + "Microsoft.TestPlatform.ObjectModel": "17.14.1", + "Newtonsoft.Json": "13.0.3" } }, "Newtonsoft.Json": { "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" + "resolved": "13.0.3", + "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==" + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", @@ -148,22 +153,25 @@ }, "System.Reflection.Metadata": { "type": "Transitive", - "resolved": "1.6.0", - "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + "resolved": "8.0.0", + "contentHash": "ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==", + "dependencies": { + "System.Collections.Immutable": "8.0.0" + } }, "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.expressions": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )" } diff --git a/src/Terrabuild.Expressions/packages.lock.json b/src/Terrabuild.Expressions/packages.lock.json index 42e3b907..b0633b49 100644 --- a/src/Terrabuild.Expressions/packages.lock.json +++ b/src/Terrabuild.Expressions/packages.lock.json @@ -4,9 +4,9 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "System.Text.Json": { "type": "Direct", @@ -16,24 +16,24 @@ }, "FSharp.SystemTextJson": { "type": "Transitive", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } } diff --git a/src/Terrabuild.Extensibility/packages.lock.json b/src/Terrabuild.Extensibility/packages.lock.json index e550dd02..0233a2df 100644 --- a/src/Terrabuild.Extensibility/packages.lock.json +++ b/src/Terrabuild.Extensibility/packages.lock.json @@ -4,9 +4,9 @@ ".NETStandard,Version=v2.1": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "System.Text.Json": { "type": "Direct", diff --git a/src/Terrabuild.Extensions/packages.lock.json b/src/Terrabuild.Extensions/packages.lock.json index a53d6184..f84c91f6 100644 --- a/src/Terrabuild.Extensions/packages.lock.json +++ b/src/Terrabuild.Extensions/packages.lock.json @@ -4,9 +4,9 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "System.Text.Json": { "type": "Direct", @@ -16,31 +16,31 @@ }, "FSharp.SystemTextJson": { "type": "Transitive", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.extensibility": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )" } } diff --git a/src/Terrabuild.Lang.Tests/Terrabuild.Lang.Tests.fsproj b/src/Terrabuild.Lang.Tests/Terrabuild.Lang.Tests.fsproj index 54cd5f26..16fa174e 100644 --- a/src/Terrabuild.Lang.Tests/Terrabuild.Lang.Tests.fsproj +++ b/src/Terrabuild.Lang.Tests/Terrabuild.Lang.Tests.fsproj @@ -17,7 +17,7 @@ - + diff --git a/src/Terrabuild.Lang.Tests/packages.lock.json b/src/Terrabuild.Lang.Tests/packages.lock.json index 0b8474f3..2d49f615 100644 --- a/src/Terrabuild.Lang.Tests/packages.lock.json +++ b/src/Terrabuild.Lang.Tests/packages.lock.json @@ -4,9 +4,9 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "FsUnit": { "type": "Direct", @@ -20,12 +20,12 @@ }, "Microsoft.NET.Test.Sdk": { "type": "Direct", - "requested": "[17.13.0, )", - "resolved": "17.13.0", - "contentHash": "W19wCPizaIC9Zh47w8wWI/yxuqR7/dtABwOrc8r2jX/8mUNxM2vw4fXDh+DJTeogxV+KzKwg5jNNGQVwf3LXyA==", + "requested": "[17.14.1, )", + "resolved": "17.14.1", + "contentHash": "HJKqKOE+vshXra2aEHpi2TlxYX7Z9VFYkr+E5rwEvHC8eIXiyO+K9kNm8vmNom3e2rA56WqxU+/N9NJlLGXsJQ==", "dependencies": { - "Microsoft.CodeCoverage": "17.13.0", - "Microsoft.TestPlatform.TestHost": "17.13.0" + "Microsoft.CodeCoverage": "17.14.1", + "Microsoft.TestPlatform.TestHost": "17.14.1" } }, "NUnit": { @@ -52,11 +52,11 @@ }, "FSharp.SystemTextJson": { "type": "Transitive", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "FsLexYacc": { @@ -86,13 +86,13 @@ }, "Microsoft.CodeCoverage": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9LIUy0y+DvUmEPtbRDw6Bay3rzwqFV8P4efTrK4CZhQle3M/QwLPjISghfcolmEGAPWxuJi6m98ZEfk4VR4Lfg==" + "resolved": "17.14.1", + "contentHash": "pmTrhfFIoplzFVbhVwUquT+77CbGH+h4/3mBpdmIlYtBi9nAB+kKI6dN3A/nV4DFi3wLLx/BlHIPK+MkbQ6Tpg==" }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "Microsoft.Testing.Extensions.Telemetry": { "type": "Transitive", @@ -138,25 +138,30 @@ }, "Microsoft.TestPlatform.ObjectModel": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "bt0E0Dx+iqW97o4A59RCmUmz/5NarJ7LRL+jXbSHod72ibL5XdNm1Ke+UO5tFhBG4VwHLcSjqq9BUSblGNWamw==", + "resolved": "17.14.1", + "contentHash": "xTP1W6Mi6SWmuxd3a+jj9G9UoC850WGwZUps1Wah9r1ZxgXhdJfj1QqDLJkFjHDCvN42qDL2Ps5KjQYWUU0zcQ==", "dependencies": { - "System.Reflection.Metadata": "1.6.0" + "System.Reflection.Metadata": "8.0.0" } }, "Microsoft.TestPlatform.TestHost": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9GGw08Dc3AXspjekdyTdZ/wYWFlxbgcF0s7BKxzVX+hzAwpifDOdxM+ceVaaJSQOwqt3jtuNlHn3XTpKUS9x9Q==", + "resolved": "17.14.1", + "contentHash": "d78LPzGKkJwsJXAQwsbJJ7LE7D1wB+rAyhHHAaODF+RDSQ0NgMjDFkSA1Djw18VrxO76GlKAjRUhl+H8NL8Z+Q==", "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.13.0", - "Newtonsoft.Json": "13.0.1" + "Microsoft.TestPlatform.ObjectModel": "17.14.1", + "Newtonsoft.Json": "13.0.3" } }, "Newtonsoft.Json": { "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" + "resolved": "13.0.3", + "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==" + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", @@ -165,22 +170,25 @@ }, "System.Reflection.Metadata": { "type": "Transitive", - "resolved": "1.6.0", - "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + "resolved": "8.0.0", + "contentHash": "ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==", + "dependencies": { + "System.Collections.Immutable": "8.0.0" + } }, "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.expressions": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )" } @@ -188,7 +196,7 @@ "terrabuild.lang": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "FsLexYacc": "[11.3.0, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )", diff --git a/src/Terrabuild.Lang/packages.lock.json b/src/Terrabuild.Lang/packages.lock.json index a39fcd50..fd44aae9 100644 --- a/src/Terrabuild.Lang/packages.lock.json +++ b/src/Terrabuild.Lang/packages.lock.json @@ -4,9 +4,9 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "FsLexYacc": { "type": "Direct", @@ -26,11 +26,11 @@ }, "FSharp.SystemTextJson": { "type": "Transitive", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "FsLexYacc.Runtime": { @@ -43,22 +43,22 @@ }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.expressions": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )" } diff --git a/src/Terrabuild.PubSub.Tests/Terrabuild.PubSub.Tests.fsproj b/src/Terrabuild.PubSub.Tests/Terrabuild.PubSub.Tests.fsproj index cc6ede26..ae0ee719 100644 --- a/src/Terrabuild.PubSub.Tests/Terrabuild.PubSub.Tests.fsproj +++ b/src/Terrabuild.PubSub.Tests/Terrabuild.PubSub.Tests.fsproj @@ -15,7 +15,7 @@ - + diff --git a/src/Terrabuild.PubSub.Tests/packages.lock.json b/src/Terrabuild.PubSub.Tests/packages.lock.json index e915ea18..99e9b0fa 100644 --- a/src/Terrabuild.PubSub.Tests/packages.lock.json +++ b/src/Terrabuild.PubSub.Tests/packages.lock.json @@ -4,9 +4,9 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "FsUnit": { "type": "Direct", @@ -20,12 +20,12 @@ }, "Microsoft.NET.Test.Sdk": { "type": "Direct", - "requested": "[17.13.0, )", - "resolved": "17.13.0", - "contentHash": "W19wCPizaIC9Zh47w8wWI/yxuqR7/dtABwOrc8r2jX/8mUNxM2vw4fXDh+DJTeogxV+KzKwg5jNNGQVwf3LXyA==", + "requested": "[17.14.1, )", + "resolved": "17.14.1", + "contentHash": "HJKqKOE+vshXra2aEHpi2TlxYX7Z9VFYkr+E5rwEvHC8eIXiyO+K9kNm8vmNom3e2rA56WqxU+/N9NJlLGXsJQ==", "dependencies": { - "Microsoft.CodeCoverage": "17.13.0", - "Microsoft.TestPlatform.TestHost": "17.13.0" + "Microsoft.CodeCoverage": "17.14.1", + "Microsoft.TestPlatform.TestHost": "17.14.1" } }, "NUnit": { @@ -52,11 +52,11 @@ }, "FSharp.SystemTextJson": { "type": "Transitive", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "Microsoft.ApplicationInsights": { @@ -69,13 +69,13 @@ }, "Microsoft.CodeCoverage": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9LIUy0y+DvUmEPtbRDw6Bay3rzwqFV8P4efTrK4CZhQle3M/QwLPjISghfcolmEGAPWxuJi6m98ZEfk4VR4Lfg==" + "resolved": "17.14.1", + "contentHash": "pmTrhfFIoplzFVbhVwUquT+77CbGH+h4/3mBpdmIlYtBi9nAB+kKI6dN3A/nV4DFi3wLLx/BlHIPK+MkbQ6Tpg==" }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "Microsoft.Testing.Extensions.Telemetry": { "type": "Transitive", @@ -121,25 +121,30 @@ }, "Microsoft.TestPlatform.ObjectModel": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "bt0E0Dx+iqW97o4A59RCmUmz/5NarJ7LRL+jXbSHod72ibL5XdNm1Ke+UO5tFhBG4VwHLcSjqq9BUSblGNWamw==", + "resolved": "17.14.1", + "contentHash": "xTP1W6Mi6SWmuxd3a+jj9G9UoC850WGwZUps1Wah9r1ZxgXhdJfj1QqDLJkFjHDCvN42qDL2Ps5KjQYWUU0zcQ==", "dependencies": { - "System.Reflection.Metadata": "1.6.0" + "System.Reflection.Metadata": "8.0.0" } }, "Microsoft.TestPlatform.TestHost": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9GGw08Dc3AXspjekdyTdZ/wYWFlxbgcF0s7BKxzVX+hzAwpifDOdxM+ceVaaJSQOwqt3jtuNlHn3XTpKUS9x9Q==", + "resolved": "17.14.1", + "contentHash": "d78LPzGKkJwsJXAQwsbJJ7LE7D1wB+rAyhHHAaODF+RDSQ0NgMjDFkSA1Djw18VrxO76GlKAjRUhl+H8NL8Z+Q==", "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.13.0", - "Newtonsoft.Json": "13.0.1" + "Microsoft.TestPlatform.ObjectModel": "17.14.1", + "Newtonsoft.Json": "13.0.3" } }, "Newtonsoft.Json": { "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" + "resolved": "13.0.3", + "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==" + }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "8.0.0", + "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==" }, "System.Diagnostics.DiagnosticSource": { "type": "Transitive", @@ -148,22 +153,25 @@ }, "System.Reflection.Metadata": { "type": "Transitive", - "resolved": "1.6.0", - "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + "resolved": "8.0.0", + "contentHash": "ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==", + "dependencies": { + "System.Collections.Immutable": "8.0.0" + } }, "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.pubsub": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )" } diff --git a/src/Terrabuild.PubSub/packages.lock.json b/src/Terrabuild.PubSub/packages.lock.json index 42e3b907..b0633b49 100644 --- a/src/Terrabuild.PubSub/packages.lock.json +++ b/src/Terrabuild.PubSub/packages.lock.json @@ -4,9 +4,9 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "System.Text.Json": { "type": "Direct", @@ -16,24 +16,24 @@ }, "FSharp.SystemTextJson": { "type": "Transitive", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } } diff --git a/src/Terrabuild.Scripting.Tests/Terrabuild.Scripting.Tests.fsproj b/src/Terrabuild.Scripting.Tests/Terrabuild.Scripting.Tests.fsproj index 2f3f2b05..03d99cc0 100644 --- a/src/Terrabuild.Scripting.Tests/Terrabuild.Scripting.Tests.fsproj +++ b/src/Terrabuild.Scripting.Tests/Terrabuild.Scripting.Tests.fsproj @@ -16,7 +16,7 @@ - + diff --git a/src/Terrabuild.Scripting.Tests/packages.lock.json b/src/Terrabuild.Scripting.Tests/packages.lock.json index 08a37a2a..09cf7817 100644 --- a/src/Terrabuild.Scripting.Tests/packages.lock.json +++ b/src/Terrabuild.Scripting.Tests/packages.lock.json @@ -4,9 +4,9 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "FsUnit": { "type": "Direct", @@ -20,12 +20,12 @@ }, "Microsoft.NET.Test.Sdk": { "type": "Direct", - "requested": "[17.13.0, )", - "resolved": "17.13.0", - "contentHash": "W19wCPizaIC9Zh47w8wWI/yxuqR7/dtABwOrc8r2jX/8mUNxM2vw4fXDh+DJTeogxV+KzKwg5jNNGQVwf3LXyA==", + "requested": "[17.14.1, )", + "resolved": "17.14.1", + "contentHash": "HJKqKOE+vshXra2aEHpi2TlxYX7Z9VFYkr+E5rwEvHC8eIXiyO+K9kNm8vmNom3e2rA56WqxU+/N9NJlLGXsJQ==", "dependencies": { - "Microsoft.CodeCoverage": "17.13.0", - "Microsoft.TestPlatform.TestHost": "17.13.0" + "Microsoft.CodeCoverage": "17.14.1", + "Microsoft.TestPlatform.TestHost": "17.14.1" } }, "NUnit": { @@ -52,10 +52,10 @@ }, "FSharp.Compiler.Service": { "type": "Transitive", - "resolved": "43.9.202", - "contentHash": "E66wiogMms6201AV4asUsrOrw1yx4HSVwyOzpqhR7rp+tWNZ476o+h7ICrjSVHzaEWUX4vGtjTOked4bVtd5UQ==", + "resolved": "43.9.300", + "contentHash": "yFSAIVNn9HpIVJh1D58GLVGr0ew6s48knf4nWOBt6SYse2DTB+vRPkEXpKmnVqVCwRoXO9Ml4ClaIRdp5Opnew==", "dependencies": { - "FSharp.Core": "[9.0.202]", + "FSharp.Core": "[9.0.300]", "System.Buffers": "4.6.0", "System.Collections.Immutable": "8.0.0", "System.Diagnostics.DiagnosticSource": "8.0.0", @@ -67,11 +67,11 @@ }, "FSharp.SystemTextJson": { "type": "Transitive", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "Microsoft.ApplicationInsights": { @@ -84,13 +84,13 @@ }, "Microsoft.CodeCoverage": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9LIUy0y+DvUmEPtbRDw6Bay3rzwqFV8P4efTrK4CZhQle3M/QwLPjISghfcolmEGAPWxuJi6m98ZEfk4VR4Lfg==" + "resolved": "17.14.1", + "contentHash": "pmTrhfFIoplzFVbhVwUquT+77CbGH+h4/3mBpdmIlYtBi9nAB+kKI6dN3A/nV4DFi3wLLx/BlHIPK+MkbQ6Tpg==" }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "Microsoft.Testing.Extensions.Telemetry": { "type": "Transitive", @@ -136,25 +136,25 @@ }, "Microsoft.TestPlatform.ObjectModel": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "bt0E0Dx+iqW97o4A59RCmUmz/5NarJ7LRL+jXbSHod72ibL5XdNm1Ke+UO5tFhBG4VwHLcSjqq9BUSblGNWamw==", + "resolved": "17.14.1", + "contentHash": "xTP1W6Mi6SWmuxd3a+jj9G9UoC850WGwZUps1Wah9r1ZxgXhdJfj1QqDLJkFjHDCvN42qDL2Ps5KjQYWUU0zcQ==", "dependencies": { - "System.Reflection.Metadata": "1.6.0" + "System.Reflection.Metadata": "8.0.0" } }, "Microsoft.TestPlatform.TestHost": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9GGw08Dc3AXspjekdyTdZ/wYWFlxbgcF0s7BKxzVX+hzAwpifDOdxM+ceVaaJSQOwqt3jtuNlHn3XTpKUS9x9Q==", + "resolved": "17.14.1", + "contentHash": "d78LPzGKkJwsJXAQwsbJJ7LE7D1wB+rAyhHHAaODF+RDSQ0NgMjDFkSA1Djw18VrxO76GlKAjRUhl+H8NL8Z+Q==", "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.13.0", - "Newtonsoft.Json": "13.0.1" + "Microsoft.TestPlatform.ObjectModel": "17.14.1", + "Newtonsoft.Json": "13.0.3" } }, "Newtonsoft.Json": { "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" + "resolved": "13.0.3", + "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==" }, "System.Buffers": { "type": "Transitive", @@ -197,16 +197,16 @@ "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.expressions": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )" } @@ -214,15 +214,15 @@ "terrabuild.extensibility": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.scripting": { "type": "Project", "dependencies": { - "FSharp.Compiler.Service": "[43.9.202, )", - "FSharp.Core": "[9.0.202, )", + "FSharp.Compiler.Service": "[43.9.300, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Expressions": "[1.0.0, )" } diff --git a/src/Terrabuild.Scripting/Terrabuild.Scripting.fsproj b/src/Terrabuild.Scripting/Terrabuild.Scripting.fsproj index 4e48945b..ffe9c9e0 100644 --- a/src/Terrabuild.Scripting/Terrabuild.Scripting.fsproj +++ b/src/Terrabuild.Scripting/Terrabuild.Scripting.fsproj @@ -10,7 +10,7 @@ - + diff --git a/src/Terrabuild.Scripting/packages.lock.json b/src/Terrabuild.Scripting/packages.lock.json index 7145425c..b3760875 100644 --- a/src/Terrabuild.Scripting/packages.lock.json +++ b/src/Terrabuild.Scripting/packages.lock.json @@ -4,11 +4,11 @@ "net9.0": { "FSharp.Compiler.Service": { "type": "Direct", - "requested": "[43.9.202, )", - "resolved": "43.9.202", - "contentHash": "E66wiogMms6201AV4asUsrOrw1yx4HSVwyOzpqhR7rp+tWNZ476o+h7ICrjSVHzaEWUX4vGtjTOked4bVtd5UQ==", + "requested": "[43.9.300, )", + "resolved": "43.9.300", + "contentHash": "yFSAIVNn9HpIVJh1D58GLVGr0ew6s48knf4nWOBt6SYse2DTB+vRPkEXpKmnVqVCwRoXO9Ml4ClaIRdp5Opnew==", "dependencies": { - "FSharp.Core": "[9.0.202]", + "FSharp.Core": "[9.0.300]", "System.Buffers": "4.6.0", "System.Collections.Immutable": "8.0.0", "System.Diagnostics.DiagnosticSource": "8.0.0", @@ -20,9 +20,9 @@ }, "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "System.Text.Json": { "type": "Direct", @@ -32,17 +32,17 @@ }, "FSharp.SystemTextJson": { "type": "Transitive", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "System.Buffers": { "type": "Transitive", @@ -85,16 +85,16 @@ "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.expressions": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )" } diff --git a/src/Terrabuild.Tests/Terrabuild.Tests.fsproj b/src/Terrabuild.Tests/Terrabuild.Tests.fsproj index bb9fef9a..b3b42804 100644 --- a/src/Terrabuild.Tests/Terrabuild.Tests.fsproj +++ b/src/Terrabuild.Tests/Terrabuild.Tests.fsproj @@ -16,7 +16,7 @@ - + diff --git a/src/Terrabuild.Tests/packages.lock.json b/src/Terrabuild.Tests/packages.lock.json index bf886243..f0c03b8a 100644 --- a/src/Terrabuild.Tests/packages.lock.json +++ b/src/Terrabuild.Tests/packages.lock.json @@ -4,9 +4,9 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "FsUnit": { "type": "Direct", @@ -20,12 +20,12 @@ }, "Microsoft.NET.Test.Sdk": { "type": "Direct", - "requested": "[17.13.0, )", - "resolved": "17.13.0", - "contentHash": "W19wCPizaIC9Zh47w8wWI/yxuqR7/dtABwOrc8r2jX/8mUNxM2vw4fXDh+DJTeogxV+KzKwg5jNNGQVwf3LXyA==", + "requested": "[17.14.1, )", + "resolved": "17.14.1", + "contentHash": "HJKqKOE+vshXra2aEHpi2TlxYX7Z9VFYkr+E5rwEvHC8eIXiyO+K9kNm8vmNom3e2rA56WqxU+/N9NJlLGXsJQ==", "dependencies": { - "Microsoft.CodeCoverage": "17.13.0", - "Microsoft.TestPlatform.TestHost": "17.13.0" + "Microsoft.CodeCoverage": "17.14.1", + "Microsoft.TestPlatform.TestHost": "17.14.1" } }, "NUnit": { @@ -76,8 +76,8 @@ }, "Azure.Storage.Blobs": { "type": "Transitive", - "resolved": "12.24.0", - "contentHash": "0SWiMtEYcemn5U69BqVPdqGDwcbl+lsF9L3WFPpqk1Db5g+ytr3L3GmUxMbvvdPNuFwTf03kKtWJpW/qW33T8A==", + "resolved": "12.24.1", + "contentHash": "479Z9ps9yl9XyhU45bbU2CU4e2B23S6FJiSiL9LpfZHU6eNXXD9Jb6rYdwY+qqmm852RhqICXBpX3Sql4DLBew==", "dependencies": { "Azure.Storage.Common": "12.23.0" } @@ -106,10 +106,10 @@ }, "FSharp.Compiler.Service": { "type": "Transitive", - "resolved": "43.9.202", - "contentHash": "E66wiogMms6201AV4asUsrOrw1yx4HSVwyOzpqhR7rp+tWNZ476o+h7ICrjSVHzaEWUX4vGtjTOked4bVtd5UQ==", + "resolved": "43.9.300", + "contentHash": "yFSAIVNn9HpIVJh1D58GLVGr0ew6s48knf4nWOBt6SYse2DTB+vRPkEXpKmnVqVCwRoXO9Ml4ClaIRdp5Opnew==", "dependencies": { - "FSharp.Core": "[9.0.202]", + "FSharp.Core": "[9.0.300]", "System.Buffers": "4.6.0", "System.Collections.Immutable": "8.0.0", "System.Diagnostics.DiagnosticSource": "8.0.0", @@ -204,11 +204,11 @@ }, "FSharp.SystemTextJson": { "type": "Transitive", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "FsLexYacc": { @@ -243,8 +243,8 @@ }, "Microsoft.CodeCoverage": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9LIUy0y+DvUmEPtbRDw6Bay3rzwqFV8P4efTrK4CZhQle3M/QwLPjISghfcolmEGAPWxuJi6m98ZEfk4VR4Lfg==" + "resolved": "17.14.1", + "contentHash": "pmTrhfFIoplzFVbhVwUquT+77CbGH+h4/3mBpdmIlYtBi9nAB+kKI6dN3A/nV4DFi3wLLx/BlHIPK+MkbQ6Tpg==" }, "Microsoft.Extensions.Configuration": { "type": "Transitive", @@ -266,8 +266,8 @@ }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "Microsoft.Extensions.Primitives": { "type": "Transitive", @@ -332,19 +332,19 @@ }, "Microsoft.TestPlatform.ObjectModel": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "bt0E0Dx+iqW97o4A59RCmUmz/5NarJ7LRL+jXbSHod72ibL5XdNm1Ke+UO5tFhBG4VwHLcSjqq9BUSblGNWamw==", + "resolved": "17.14.1", + "contentHash": "xTP1W6Mi6SWmuxd3a+jj9G9UoC850WGwZUps1Wah9r1ZxgXhdJfj1QqDLJkFjHDCvN42qDL2Ps5KjQYWUU0zcQ==", "dependencies": { - "System.Reflection.Metadata": "1.6.0" + "System.Reflection.Metadata": "8.0.0" } }, "Microsoft.TestPlatform.TestHost": { "type": "Transitive", - "resolved": "17.13.0", - "contentHash": "9GGw08Dc3AXspjekdyTdZ/wYWFlxbgcF0s7BKxzVX+hzAwpifDOdxM+ceVaaJSQOwqt3jtuNlHn3XTpKUS9x9Q==", + "resolved": "17.14.1", + "contentHash": "d78LPzGKkJwsJXAQwsbJJ7LE7D1wB+rAyhHHAaODF+RDSQ0NgMjDFkSA1Djw18VrxO76GlKAjRUhl+H8NL8Z+Q==", "dependencies": { - "Microsoft.TestPlatform.ObjectModel": "17.13.0", - "Newtonsoft.Json": "13.0.1" + "Microsoft.TestPlatform.ObjectModel": "17.14.1", + "Newtonsoft.Json": "13.0.3" } }, "Microsoft.Win32.Primitives": { @@ -410,8 +410,8 @@ }, "Newtonsoft.Json": { "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" + "resolved": "13.0.3", + "contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==" }, "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": { "type": "Transitive", @@ -522,8 +522,8 @@ }, "Sentry": { "type": "Transitive", - "resolved": "5.6.0", - "contentHash": "KZbxp1ehMvb/gnh2aGLER7GQKKVM3M8pZz6SxFkZZ4QxS7mXJb+01Iw08nAb6Cz9rLfv3s1BIGorOtMJNujzrA==" + "resolved": "5.10.0", + "contentHash": "YArPx8bL+kU2htpoOI1k2W/n3gbuiA7TLchYIs4AcLbbB2MXmX1+Eo1IIiBf484eqVXRpO0Dm3bvQa4fg+ZhCw==" }, "Serilog": { "type": "Transitive", @@ -1328,12 +1328,12 @@ "type": "Project", "dependencies": { "Argu": "[6.2.5, )", - "Azure.Storage.Blobs": "[12.24.0, )", + "Azure.Storage.Blobs": "[12.24.1, )", "DotNetEnv": "[3.1.1, )", - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "FSharp.Data": "[6.6.0, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Sentry": "[5.6.0, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Sentry": "[5.10.0, )", "Serilog.Sinks.File": "[7.0.0, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )", @@ -1347,16 +1347,16 @@ "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.configuration": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Expressions": "[1.0.0, )", "Terrabuild.Lang": "[1.0.0, )" @@ -1365,7 +1365,7 @@ "terrabuild.expressions": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )" } @@ -1373,14 +1373,14 @@ "terrabuild.extensibility": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.extensions": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )", "Terrabuild.Extensibility": "[1.0.0, )" @@ -1389,7 +1389,7 @@ "terrabuild.lang": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "FsLexYacc": "[11.3.0, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )", @@ -1399,7 +1399,7 @@ "terrabuild.pubsub": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )" } @@ -1407,8 +1407,8 @@ "terrabuild.scripting": { "type": "Project", "dependencies": { - "FSharp.Compiler.Service": "[43.9.202, )", - "FSharp.Core": "[9.0.202, )", + "FSharp.Compiler.Service": "[43.9.300, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Expressions": "[1.0.0, )" } diff --git a/src/Terrabuild/Core/Build.fs b/src/Terrabuild/Core/Build.fs index 84211235..c7921373 100644 --- a/src/Terrabuild/Core/Build.fs +++ b/src/Terrabuild/Core/Build.fs @@ -166,8 +166,9 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I let nodeResults = Concurrent.ConcurrentDictionary() let restorables = Concurrent.ConcurrentDictionary() - let processNode (maxCompletionChildren: DateTime) (node: GraphDef.Node) = - let cacheEntryId = GraphDef.buildCacheKey node + let processNode (node: GraphDef.Node) = + let startedAt = DateTime.UtcNow + notification.NodeBuilding node let projectDirectory = match node.Project with @@ -175,162 +176,144 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I | FS.File projectFile -> projectFile |> FS.parentDirectory |> Option.get | _ -> "." - let buildNode() = - let startedAt = DateTime.UtcNow - - notification.NodeBuilding node - - // restore lazy dependencies - node.Dependencies - |> Seq.iter (fun nodeId -> - match restorables.TryGetValue nodeId with - | true, restorable -> restorable.Restore() - | _ -> ()) - - let beforeFiles = - if node.IsLeaf then IO.Snapshot.Empty - else IO.createSnapshot node.Outputs projectDirectory - - let cacheEntry = cache.GetEntry true cacheEntryId - let lastStatusCode, stepLogs = execCommands node cacheEntry options projectDirectory homeDir tmpDir - - // keep only new or modified files - let afterFiles = IO.createSnapshot node.Outputs projectDirectory - let newFiles = afterFiles - beforeFiles - let outputs = IO.copyFiles cacheEntry.Outputs projectDirectory newFiles - - let successful = lastStatusCode = 0 - let endedAt = DateTime.UtcNow - let summary = { Cache.TargetSummary.Project = node.Project - Cache.TargetSummary.Target = node.Target - Cache.TargetSummary.Operations = [ stepLogs |> List.ofSeq ] - Cache.TargetSummary.Outputs = outputs - Cache.TargetSummary.IsSuccessful = successful - Cache.TargetSummary.StartedAt = startedAt - Cache.TargetSummary.EndedAt = endedAt - Cache.TargetSummary.Duration = endedAt - startedAt - Cache.TargetSummary.Cache = node.Cache } - - notification.NodeUploading node - - // create an archive with new files - Log.Debug("{NodeId}: Building '{Project}/{Target}' with {Hash}", node.Id, node.Project, node.Target, node.TargetHash) - let files = cacheEntry.Complete summary - api |> Option.iter (fun api -> api.AddArtifact node.Project node.Target node.ProjectHash node.TargetHash files successful) - - match lastStatusCode with - | 0 -> TaskStatus.Success endedAt - | _ -> TaskStatus.Failure (DateTime.UtcNow, $"{node.Id} failed with exit code {lastStatusCode}") - - let restoreNode () = - notification.NodeScheduled node - let cacheEntryId = GraphDef.buildCacheKey node - match cache.TryGetSummaryOnly allowRemoteCache cacheEntryId with - | Some (_, summary) -> - let dependencies = - node.Dependencies - |> Seq.choose (fun nodeId -> - match restorables.TryGetValue nodeId with - | true, restorable -> Some restorable - | _ -> None) - |> List.ofSeq + // restore lazy dependencies + node.Dependencies + |> Seq.iter (fun nodeId -> + match restorables.TryGetValue nodeId with + | true, restorable -> restorable.Restore() + | _ -> ()) - let callback() = - notification.NodeDownloading node - match cache.TryGetSummary allowRemoteCache cacheEntryId with - | Some summary -> - Log.Debug("{NodeId} restoring '{Project}/{Target}' from cache from {Hash}", node.Id, node.Project, node.Target, node.TargetHash) - match summary.Outputs with - | Some outputs -> - let files = IO.enumerateFiles outputs - IO.copyFiles projectDirectory outputs files |> ignore - api |> Option.iter (fun api -> api.UseArtifact node.ProjectHash node.TargetHash) - | _ -> () - notification.NodeCompleted node TaskRequest.Restore true - | _ -> - notification.NodeCompleted node TaskRequest.Restore false - raiseBugError $"Unable to download build output for {cacheEntryId} for node {node.Id}" - - let restorable = Restorable(callback, dependencies) - restorables.TryAdd(node.Id, restorable) |> ignore - if summary.IsSuccessful then TaskStatus.Success summary.EndedAt - else TaskStatus.Failure (summary.EndedAt, $"Restored node {node.Id} with a build in failure state") - | _ -> - TaskStatus.Failure (DateTime.UtcNow, $"Unable to download build output for {cacheEntryId} for node {node.Id}") + let beforeFiles = + if node.IsLeaf then IO.Snapshot.Empty + else IO.createSnapshot node.Outputs projectDirectory - if force then - Log.Debug("{NodeId} must rebuild because force build requested", node.Id) - TaskRequest.Build, buildNode() + let cacheEntryId = GraphDef.buildCacheKey node + let cacheEntry = cache.GetEntry true cacheEntryId + let lastStatusCode, stepLogs = execCommands node cacheEntry options projectDirectory homeDir tmpDir + + // keep only new or modified files + let afterFiles = IO.createSnapshot node.Outputs projectDirectory + let newFiles = afterFiles - beforeFiles + let outputs = IO.copyFiles cacheEntry.Outputs projectDirectory newFiles + + let successful = lastStatusCode = 0 + let endedAt = DateTime.UtcNow + let summary = { Cache.TargetSummary.Project = node.Project + Cache.TargetSummary.Target = node.Target + Cache.TargetSummary.Operations = [ stepLogs |> List.ofSeq ] + Cache.TargetSummary.Outputs = outputs + Cache.TargetSummary.IsSuccessful = successful + Cache.TargetSummary.StartedAt = startedAt + Cache.TargetSummary.EndedAt = endedAt + Cache.TargetSummary.Duration = endedAt - startedAt + Cache.TargetSummary.Cache = node.Cache } + + notification.NodeUploading node + + // create an archive with new files + Log.Debug("{NodeId}: Building '{Project}/{Target}' with {Hash}", node.Id, node.Project, node.Target, node.TargetHash) + let files = cacheEntry.Complete summary + api |> Option.iter (fun api -> api.AddArtifact node.Project node.Target node.ProjectHash node.TargetHash files successful) + + match lastStatusCode with + | 0 -> TaskStatus.Success endedAt + | _ -> TaskStatus.Failure (DateTime.UtcNow, $"{node.Id} failed with exit code {lastStatusCode}") - elif maxCompletionChildren = DateTime.MaxValue then - Log.Debug("{NodeId} must rebuild because child is rebuilding", node.Id) - TaskRequest.Build, buildNode() - elif node.Cache <> Terrabuild.Extensibility.Cacheability.Never then - let cacheEntryId = GraphDef.buildCacheKey node - match cache.TryGetSummaryOnly allowRemoteCache cacheEntryId with - | Some (_, summary) -> - Log.Debug("{NodeId} has existing build summary", node.Id) + let hub = Hub.Create(options.MaxConcurrency) + let rec schedule nodeId = + if nodeResults.TryAdd(nodeId, (TaskRequest.Build, TaskStatus.Pending)) then + let node = graph.Nodes[nodeId] + notification.NodeScheduled node - // task is failed and retry requested - if retry && not summary.IsSuccessful then - Log.Debug("{NodeId} must rebuild because node is failed and retry requested", node.Id) - TaskRequest.Build, buildNode() + let projectDirectory = + match node.Project with + | FS.Directory projectDirectory -> projectDirectory + | FS.File projectFile -> projectFile |> FS.parentDirectory |> Option.get + | _ -> "." - // task is cached + let completionStatus = + if force then None else - Log.Debug("{NodeId} is marked as used", node.Id) - TaskRequest.Restore, restoreNode() + let cacheEntryId = GraphDef.buildCacheKey node + match cache.TryGetSummaryOnly allowRemoteCache cacheEntryId with + | Some (_, summary) -> + if retry && not summary.IsSuccessful then None + else + let dependencies = + node.Dependencies + |> Seq.choose (fun nodeId -> + match restorables.TryGetValue nodeId with + | true, restorable -> Some restorable + | _ -> None) + |> List.ofSeq + + let callback() = + notification.NodeDownloading node + match cache.TryGetSummary allowRemoteCache cacheEntryId with + | Some summary -> + Log.Debug("{NodeId} restoring '{Project}/{Target}' from cache from {Hash}", node.Id, node.Project, node.Target, node.TargetHash) + match summary.Outputs with + | Some outputs -> + let files = IO.enumerateFiles outputs + IO.copyFiles projectDirectory outputs files |> ignore + api |> Option.iter (fun api -> api.UseArtifact node.ProjectHash node.TargetHash) + | _ -> () + notification.NodeCompleted node TaskRequest.Restore true + | _ -> + notification.NodeCompleted node TaskRequest.Restore false + raiseBugError $"Unable to download build output for {cacheEntryId} for node {node.Id}" + + let restorable = Restorable(callback, dependencies) + restorables.TryAdd(node.Id, restorable) |> ignore + if summary.IsSuccessful then TaskStatus.Success summary.EndedAt |> Some + else TaskStatus.Failure (summary.EndedAt, $"Restored node {node.Id} with a build in failure state") |> Some + | _ -> None + + let nodeComputed = hub.GetSignal nodeId + match completionStatus with + | Some completionStatus -> + nodeResults[node.Id] <- (TaskRequest.Restore, completionStatus) + match completionStatus with + | TaskStatus.Success completionDate -> + notification.NodeCompleted node TaskRequest.Restore true + nodeComputed.Value <- completionDate + | TaskStatus.Failure (completionDate, _) -> + notification.NodeCompleted node TaskRequest.Restore false + nodeComputed.Value <- completionDate + | _ -> raiseBugError "Unexpected pending state" | _ -> - Log.Debug("{NodeId} must be build since no summary and required", node.Id) - TaskRequest.Build, buildNode() - else - Log.Debug("{NodeId} is not cacheable", node.Id) - TaskRequest.Build, buildNode() + // await dependencies + let awaitedDependencies = + node.Dependencies + |> Seq.map (fun awaitedProjectId -> + schedule awaitedProjectId + hub.GetSignal awaitedProjectId) + |> List.ofSeq + let onAllSignaled () = + try + let buildRequest, completionStatus = TaskRequest.Build, processNode node + Log.Debug("{NodeId} completed request {Request} with status {Status}", node.Id, buildRequest, completionStatus) + nodeResults[node.Id] <- (buildRequest, completionStatus) - let hub = Hub.Create(options.MaxConcurrency) - let rec schedule nodeId = - if nodeResults.TryAdd(nodeId, (TaskRequest.Build, TaskStatus.Pending)) then - let node = graph.Nodes[nodeId] - let nodeComputed = hub.GetSignal nodeId + match completionStatus with + | TaskStatus.Success completionDate -> + nodeComputed.Value <- completionDate + notification.NodeCompleted node buildRequest true + | _ -> + notification.NodeCompleted node buildRequest false + with + exn -> + Log.Fatal(exn, "{NodeId} unexpected failure while building", node.Id) + + nodeResults[node.Id] <- (TaskRequest.Build, TaskStatus.Failure (DateTime.UtcNow, exn.Message)) + notification.NodeCompleted node TaskRequest.Build false + + reraise() - // await dependencies - let awaitedDependencies = - node.Dependencies - |> Seq.map (fun awaitedProjectId -> - schedule awaitedProjectId - hub.GetSignal awaitedProjectId) - |> List.ofSeq - - let onAllSignaled () = - try - let maxCompletionChildren = - match awaitedDependencies with - | [ ] -> DateTime.MinValue - | _ -> awaitedDependencies |> Seq.maxBy (fun dep -> dep.Value) |> (fun dep -> dep.Value) - - let buildRequest, completionStatus = processNode maxCompletionChildren node - Log.Debug("{NodeId} completed request {Request} with status {Status}", node.Id, buildRequest, completionStatus) - nodeResults[node.Id] <- (buildRequest, completionStatus) - - match completionStatus with - | TaskStatus.Success completionDate -> - nodeComputed.Value <- completionDate - notification.NodeCompleted node buildRequest true - | _ -> - notification.NodeCompleted node buildRequest false - with - exn -> - Log.Fatal(exn, "{NodeId} unexpected failure while building", node.Id) - - nodeResults[node.Id] <- (TaskRequest.Build, TaskStatus.Failure (DateTime.UtcNow, exn.Message)) - notification.NodeCompleted node TaskRequest.Build false - - reraise() - - let awaitedSignals = awaitedDependencies |> List.map (fun entry -> entry :> ISignal) - hub.Subscribe nodeId awaitedSignals onAllSignaled + let awaitedSignals = awaitedDependencies |> List.map (fun entry -> entry :> ISignal) + hub.Subscribe nodeId awaitedSignals onAllSignaled graph.RootNodes |> Seq.iter schedule diff --git a/src/Terrabuild/Terrabuild.fsproj b/src/Terrabuild/Terrabuild.fsproj index 1334fb0b..ba249b18 100644 --- a/src/Terrabuild/Terrabuild.fsproj +++ b/src/Terrabuild/Terrabuild.fsproj @@ -50,11 +50,11 @@ - + - + - + diff --git a/src/Terrabuild/packages.lock.json b/src/Terrabuild/packages.lock.json index fcc1c2e1..577fca33 100644 --- a/src/Terrabuild/packages.lock.json +++ b/src/Terrabuild/packages.lock.json @@ -14,9 +14,9 @@ }, "Azure.Storage.Blobs": { "type": "Direct", - "requested": "[12.24.0, )", - "resolved": "12.24.0", - "contentHash": "0SWiMtEYcemn5U69BqVPdqGDwcbl+lsF9L3WFPpqk1Db5g+ytr3L3GmUxMbvvdPNuFwTf03kKtWJpW/qW33T8A==", + "requested": "[12.24.1, )", + "resolved": "12.24.1", + "contentHash": "479Z9ps9yl9XyhU45bbU2CU4e2B23S6FJiSiL9LpfZHU6eNXXD9Jb6rYdwY+qqmm852RhqICXBpX3Sql4DLBew==", "dependencies": { "Azure.Storage.Common": "12.23.0" } @@ -37,9 +37,9 @@ }, "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "FSharp.Data": { "type": "Direct", @@ -59,19 +59,19 @@ }, "FSharp.SystemTextJson": { "type": "Direct", - "requested": "[1.3.13, )", - "resolved": "1.3.13", - "contentHash": "znp8odpdkVGKVX0AvbhiXdmeMi0KJ+A4AyAQWSkfAEAe4Z4clRE+rVhrLnAGrFD1VEIUX2lsQ4o84ywpWZUSGw==", + "requested": "[1.4.36, )", + "resolved": "1.4.36", + "contentHash": "1xLk0SBF1nedD74B77rcArjD2d+DeZwbNI7BVCAyKwIBERo1VoX8Mf4AtX0OV2L3ZeM/XS1b6BuhXCyoh0KBnw==", "dependencies": { "FSharp.Core": "4.7.0", - "System.Text.Json": "6.0.0" + "System.Text.Json": "6.0.10" } }, "Sentry": { "type": "Direct", - "requested": "[5.6.0, )", - "resolved": "5.6.0", - "contentHash": "KZbxp1ehMvb/gnh2aGLER7GQKKVM3M8pZz6SxFkZZ4QxS7mXJb+01Iw08nAb6Cz9rLfv3s1BIGorOtMJNujzrA==" + "requested": "[5.10.0, )", + "resolved": "5.10.0", + "contentHash": "YArPx8bL+kU2htpoOI1k2W/n3gbuiA7TLchYIs4AcLbbB2MXmX1+Eo1IIiBf484eqVXRpO0Dm3bvQa4fg+ZhCw==" }, "Serilog.Sinks.File": { "type": "Direct", @@ -114,10 +114,10 @@ }, "FSharp.Compiler.Service": { "type": "Transitive", - "resolved": "43.9.202", - "contentHash": "E66wiogMms6201AV4asUsrOrw1yx4HSVwyOzpqhR7rp+tWNZ476o+h7ICrjSVHzaEWUX4vGtjTOked4bVtd5UQ==", + "resolved": "43.9.300", + "contentHash": "yFSAIVNn9HpIVJh1D58GLVGr0ew6s48knf4nWOBt6SYse2DTB+vRPkEXpKmnVqVCwRoXO9Ml4ClaIRdp5Opnew==", "dependencies": { - "FSharp.Core": "[9.0.202]", + "FSharp.Core": "[9.0.300]", "System.Buffers": "4.6.0", "System.Collections.Immutable": "8.0.0", "System.Diagnostics.DiagnosticSource": "8.0.0", @@ -237,8 +237,8 @@ }, "Microsoft.Extensions.FileSystemGlobbing": { "type": "Transitive", - "resolved": "9.0.4", - "contentHash": "05Lh2ItSk4mzTdDWATW9nEcSybwprN8Tz42Fs5B+jwdXUpauktdAQUI1Am4sUQi2C63E5hvQp8gXvfwfg9mQGQ==" + "resolved": "9.0.6", + "contentHash": "1HJCAbwukNEoYbHgHbKHmenU0V/0huw8+i7Qtf5rLUG1E+3kEwRJQxpwD3wbTEagIgPSQisNgJTvmUX9yYVc6g==" }, "Microsoft.Extensions.Primitives": { "type": "Transitive", @@ -1221,16 +1221,16 @@ "terrabuild.common": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", - "FSharp.SystemTextJson": "[1.3.13, )", - "Microsoft.Extensions.FileSystemGlobbing": "[9.0.4, )", + "FSharp.Core": "[9.0.300, )", + "FSharp.SystemTextJson": "[1.4.36, )", + "Microsoft.Extensions.FileSystemGlobbing": "[9.0.6, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.configuration": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Expressions": "[1.0.0, )", "Terrabuild.Lang": "[1.0.0, )" @@ -1239,7 +1239,7 @@ "terrabuild.expressions": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )" } @@ -1247,14 +1247,14 @@ "terrabuild.extensibility": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )" } }, "terrabuild.extensions": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )", "Terrabuild.Extensibility": "[1.0.0, )" @@ -1263,7 +1263,7 @@ "terrabuild.lang": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "FsLexYacc": "[11.3.0, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )", @@ -1273,7 +1273,7 @@ "terrabuild.pubsub": { "type": "Project", "dependencies": { - "FSharp.Core": "[9.0.202, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Common": "[1.0.0, )" } @@ -1281,8 +1281,8 @@ "terrabuild.scripting": { "type": "Project", "dependencies": { - "FSharp.Compiler.Service": "[43.9.202, )", - "FSharp.Core": "[9.0.202, )", + "FSharp.Compiler.Service": "[43.9.300, )", + "FSharp.Core": "[9.0.300, )", "System.Text.Json": "[9.0.0, )", "Terrabuild.Expressions": "[1.0.0, )" } diff --git a/tools/DocGen/packages.lock.json b/tools/DocGen/packages.lock.json index 9fc7cfd0..175c264c 100644 --- a/tools/DocGen/packages.lock.json +++ b/tools/DocGen/packages.lock.json @@ -4,9 +4,9 @@ "net9.0": { "FSharp.Core": { "type": "Direct", - "requested": "[9.0.202, )", - "resolved": "9.0.202", - "contentHash": "p8iGT2PeRL9q0ZIQ3ZhmRMRs4+b5Xaf9SSYKOt/+tDtznMQhHovYWaD1491RvBz8rnxcesAISbrkrjI1/4TUtw==" + "requested": "[9.0.300, )", + "resolved": "9.0.300", + "contentHash": "TVt2J7RCE1KCS2IaONF+p8/KIZ1eHNbW+7qmKF6hGoD4tXl+o07ja1mPtFjMqRa5uHMFaTrGTPn/m945WnDLiQ==" }, "FSharp.Data": { "type": "Direct", From fe5db138e6e57a514a9db62955015652188c0c88 Mon Sep 17 00:00:00 2001 From: Pierre Chalamet Date: Sat, 14 Jun 2025 10:05:49 +0200 Subject: [PATCH 02/10] code cleanup --- .github/workflows/on-push-branch.yml | 2 +- src/Terrabuild/Core/Build.fs | 125 +++++++++++++-------------- 2 files changed, 60 insertions(+), 67 deletions(-) diff --git a/.github/workflows/on-push-branch.yml b/.github/workflows/on-push-branch.yml index cece856b..c7069364 100644 --- a/.github/workflows/on-push-branch.yml +++ b/.github/workflows/on-push-branch.yml @@ -35,7 +35,7 @@ jobs: - name: Build Self run: | echo "# Self Build" >> $GITHUB_STEP_SUMMARY - make self config=Release terrabuild=$PWD/.out/dotnet/terrabuild + make self config=Release - name: Self Integration Tests run: make smoke-tests terrabuild=$PWD/.out/dotnet/terrabuild diff --git a/src/Terrabuild/Core/Build.fs b/src/Terrabuild/Core/Build.fs index c7921373..35a0e2c9 100644 --- a/src/Terrabuild/Core/Build.fs +++ b/src/Terrabuild/Core/Build.fs @@ -58,8 +58,7 @@ let private containerInfos = Concurrent.ConcurrentDictionary() let buildCommands (node: GraphDef.Node) (options: ConfigOptions.Options) projectDirectory homeDir tmpDir = - node.Operations - |> List.map (fun operation -> + node.Operations |> List.map (fun operation -> let metaCommand = operation.MetaCommand match options.ContainerTool, operation.Container with | Some cmd, Some container -> @@ -124,15 +123,16 @@ let execCommands (node: GraphDef.Node) (cacheEntry: Cache.IEntry) (options: Conf cmdLastEndedAt <- DateTime.UtcNow let endedAt = cmdLastEndedAt let duration = endedAt - startedAt - let stepLog = { Cache.OperationSummary.MetaCommand = metaCommand - Cache.OperationSummary.Command = cmd - Cache.OperationSummary.Arguments = args - Cache.OperationSummary.Container = container - Cache.OperationSummary.StartedAt = startedAt - Cache.OperationSummary.EndedAt = endedAt - Cache.OperationSummary.Duration = duration - Cache.OperationSummary.Log = logFile - Cache.OperationSummary.ExitCode = exitCode } + let stepLog = + { Cache.OperationSummary.MetaCommand = metaCommand + Cache.OperationSummary.Command = cmd + Cache.OperationSummary.Arguments = args + Cache.OperationSummary.Container = container + Cache.OperationSummary.StartedAt = startedAt + Cache.OperationSummary.EndedAt = endedAt + Cache.OperationSummary.Duration = duration + Cache.OperationSummary.Log = logFile + Cache.OperationSummary.ExitCode = exitCode } stepLog |> stepLogs.Add lastStatusCode <- exitCode @@ -177,8 +177,7 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I | _ -> "." // restore lazy dependencies - node.Dependencies - |> Seq.iter (fun nodeId -> + node.Dependencies |> Seq.iter (fun nodeId -> match restorables.TryGetValue nodeId with | true, restorable -> restorable.Restore() | _ -> ()) @@ -198,16 +197,17 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I let successful = lastStatusCode = 0 let endedAt = DateTime.UtcNow - let summary = { Cache.TargetSummary.Project = node.Project - Cache.TargetSummary.Target = node.Target - Cache.TargetSummary.Operations = [ stepLogs |> List.ofSeq ] - Cache.TargetSummary.Outputs = outputs - Cache.TargetSummary.IsSuccessful = successful - Cache.TargetSummary.StartedAt = startedAt - Cache.TargetSummary.EndedAt = endedAt - Cache.TargetSummary.Duration = endedAt - startedAt - Cache.TargetSummary.Cache = node.Cache } - + let summary = + { Cache.TargetSummary.Project = node.Project + Cache.TargetSummary.Target = node.Target + Cache.TargetSummary.Operations = [ stepLogs |> List.ofSeq ] + Cache.TargetSummary.Outputs = outputs + Cache.TargetSummary.IsSuccessful = successful + Cache.TargetSummary.StartedAt = startedAt + Cache.TargetSummary.EndedAt = endedAt + Cache.TargetSummary.Duration = endedAt - startedAt + Cache.TargetSummary.Cache = node.Cache } + notification.NodeUploading node // create an archive with new files @@ -241,8 +241,7 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I if retry && not summary.IsSuccessful then None else let dependencies = - node.Dependencies - |> Seq.choose (fun nodeId -> + node.Dependencies |> Seq.choose (fun nodeId -> match restorables.TryGetValue nodeId with | true, restorable -> Some restorable | _ -> None) @@ -273,44 +272,41 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I let nodeComputed = hub.GetSignal nodeId match completionStatus with | Some completionStatus -> + Log.Debug("{NodeId} completed restore request with status {Status}", node.Id, completionStatus) nodeResults[node.Id] <- (TaskRequest.Restore, completionStatus) - match completionStatus with - | TaskStatus.Success completionDate -> - notification.NodeCompleted node TaskRequest.Restore true - nodeComputed.Value <- completionDate - | TaskStatus.Failure (completionDate, _) -> - notification.NodeCompleted node TaskRequest.Restore false - nodeComputed.Value <- completionDate - | _ -> raiseBugError "Unexpected pending state" + let success, completionDate = + match completionStatus with + | TaskStatus.Success completionDate -> true, completionDate + | TaskStatus.Failure (completionDate, _) -> false, completionDate + | _ -> raiseBugError "Unexpected pending state" + notification.NodeCompleted node TaskRequest.Restore success + if success then nodeComputed.Value <- completionDate | _ -> // await dependencies let awaitedDependencies = - node.Dependencies - |> Seq.map (fun awaitedProjectId -> + node.Dependencies |> Seq.map (fun awaitedProjectId -> schedule awaitedProjectId hub.GetSignal awaitedProjectId) |> List.ofSeq let onAllSignaled () = try - let buildRequest, completionStatus = TaskRequest.Build, processNode node - Log.Debug("{NodeId} completed request {Request} with status {Status}", node.Id, buildRequest, completionStatus) - nodeResults[node.Id] <- (buildRequest, completionStatus) - - match completionStatus with - | TaskStatus.Success completionDate -> - nodeComputed.Value <- completionDate - notification.NodeCompleted node buildRequest true - | _ -> - notification.NodeCompleted node buildRequest false + let completionStatus = processNode node + Log.Debug("{NodeId} completed build request with status {Status}", node.Id, completionStatus) + nodeResults[node.Id] <- (TaskRequest.Build, completionStatus) + let success, completionDate = + match completionStatus with + | TaskStatus.Success completionDate -> true, completionDate + | TaskStatus.Failure (completionDate, _) -> false, completionDate + | _ -> raiseBugError "Unexpected pending state" + notification.NodeCompleted node TaskRequest.Build success + if success then nodeComputed.Value <- completionDate with - exn -> - Log.Fatal(exn, "{NodeId} unexpected failure while building", node.Id) - - nodeResults[node.Id] <- (TaskRequest.Build, TaskStatus.Failure (DateTime.UtcNow, exn.Message)) - notification.NodeCompleted node TaskRequest.Build false - - reraise() + | exn -> + Log.Fatal(exn, "{NodeId} failed on build request", node.Id) + nodeResults[node.Id] <- (TaskRequest.Build, TaskStatus.Failure (DateTime.UtcNow, exn.Message)) + notification.NodeCompleted node TaskRequest.Build false + reraise() let awaitedSignals = awaitedDependencies |> List.map (fun entry -> entry :> ISignal) hub.Subscribe nodeId awaitedSignals onAllSignaled @@ -346,19 +342,19 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I |> Map.choose getDependencyStatus let isSuccess = - graph.RootNodes - |> Set.forall (fun nodeId -> + graph.RootNodes |> Set.forall (fun nodeId -> match nodeStatus |> Map.tryFind nodeId with | Some info -> info.Status.IsSuccess | _ -> false) - let buildInfo = { Summary.Commit = headCommit.Sha - Summary.BranchOrTag = branchOrTag - Summary.StartedAt = startedAt - Summary.EndedAt = DateTime.UtcNow - Summary.IsSuccess = isSuccess - Summary.Targets = options.Targets - Summary.Nodes = nodeStatus } + let buildInfo = + { Summary.Commit = headCommit.Sha + Summary.BranchOrTag = branchOrTag + Summary.StartedAt = startedAt + Summary.EndedAt = DateTime.UtcNow + Summary.IsSuccess = isSuccess + Summary.Targets = options.Targets + Summary.Nodes = nodeStatus } notification.BuildCompleted buildInfo api |> Option.iter (fun api -> api.CompleteBuild buildInfo.IsSuccess) @@ -390,13 +386,10 @@ let loadSummary (options: ConfigOptions.Options) (cache: Cache.ICache) (graph: G NodeInfo.TargetHash = node.TargetHash } |> Some | _ -> None - - graph.Nodes - |> Map.choose getDependencyStatus + graph.Nodes |> Map.choose getDependencyStatus let isSuccess = - graph.RootNodes - |> Set.forall (fun nodeId -> + graph.RootNodes |> Set.forall (fun nodeId -> match nodeStatus |> Map.tryFind nodeId with | Some info -> info.Status.IsSuccess | _ -> false) From 228283885b6726cd084b33ddab181cdebeae538c Mon Sep 17 00:00:00 2001 From: Pierre Chalamet Date: Sat, 14 Jun 2025 10:20:25 +0200 Subject: [PATCH 03/10] introduce side effect flag --- src/Terrabuild.Extensibility/Extensions.fs | 6 ++++-- src/Terrabuild.Extensions/Cargo.fs | 6 +++--- src/Terrabuild.Extensions/Docker.fs | 6 +++--- src/Terrabuild.Extensions/Dotnet.fs | 23 ++++++++++------------ src/Terrabuild.Extensions/Gradle.fs | 5 ++--- src/Terrabuild.Extensions/Make.fs | 2 +- src/Terrabuild.Extensions/Npm.fs | 10 +++++----- src/Terrabuild.Extensions/OpenApi.fs | 2 +- src/Terrabuild.Extensions/Shell.fs | 2 +- src/Terrabuild.Extensions/Terraform.fs | 11 +++++------ src/Terrabuild.Extensions/Yarn.fs | 10 +++++----- 11 files changed, 40 insertions(+), 43 deletions(-) diff --git a/src/Terrabuild.Extensibility/Extensions.fs b/src/Terrabuild.Extensibility/Extensions.fs index bc8fc56f..248d5bed 100644 --- a/src/Terrabuild.Extensibility/Extensions.fs +++ b/src/Terrabuild.Extensibility/Extensions.fs @@ -50,6 +50,7 @@ type ShellOperations = ShellOperation list type ActionExecutionRequest = { Cache: Cacheability Operations: ShellOperations + SideEffect: bool } @@ -57,6 +58,7 @@ let shellOp cmd args = { ShellOperation.Command = cmd ShellOperation.Arguments = args } -let execRequest cache ops = +let execRequest (cache, ops, sideEffect) = { ActionExecutionRequest.Cache = cache - ActionExecutionRequest.Operations = ops } + ActionExecutionRequest.Operations = ops + ActionExecutionRequest.SideEffect = sideEffect } diff --git a/src/Terrabuild.Extensions/Cargo.fs b/src/Terrabuild.Extensions/Cargo.fs index d04068bf..75fd8b44 100644 --- a/src/Terrabuild.Extensions/Cargo.fs +++ b/src/Terrabuild.Extensions/Cargo.fs @@ -48,7 +48,7 @@ type Cargo() = let arguments = $"{context.Command} {arguments}" let ops = [ shellOp "cargo" arguments ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -61,7 +61,7 @@ type Cargo() = let arguments = arguments |> Option.defaultValue "" let ops = [ shellOp "cargo" $"build --profile {profile} {arguments}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -74,4 +74,4 @@ type Cargo() = let arguments = arguments |> Option.defaultValue "" let ops = [ shellOp "cargo" $"test --profile {profile} {arguments}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) diff --git a/src/Terrabuild.Extensions/Docker.fs b/src/Terrabuild.Extensions/Docker.fs index e6ec7ed3..c1909b67 100644 --- a/src/Terrabuild.Extensions/Docker.fs +++ b/src/Terrabuild.Extensions/Docker.fs @@ -17,7 +17,7 @@ type Docker() = let arguments = $"{context.Command} {arguments}" let ops = [ shellOp "docker" arguments ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -50,7 +50,7 @@ type Docker() = if context.CI then Cacheability.Remote else Cacheability.Local - execRequest cacheability ops + execRequest(cacheability, ops, true) /// @@ -71,4 +71,4 @@ type Docker() = if context.CI then Cacheability.Remote else Cacheability.Local - execRequest cacheability ops + execRequest(cacheability, ops, true) diff --git a/src/Terrabuild.Extensions/Dotnet.fs b/src/Terrabuild.Extensions/Dotnet.fs index 13287821..a5d3ec39 100644 --- a/src/Terrabuild.Extensions/Dotnet.fs +++ b/src/Terrabuild.Extensions/Dotnet.fs @@ -56,9 +56,6 @@ module DotnetHelpers = /// type Dotnet() = - static let buildRequest (context: ActionContext) buildOps = - execRequest Cacheability.Always buildOps - /// /// Provides default values for project. /// @@ -86,7 +83,7 @@ type Dotnet() = let arguments = $"{context.Command} {arguments}" let ops = [ shellOp "dotnet" arguments ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -118,11 +115,11 @@ type Dotnet() = let arguments = arguments |> Option.defaultValue "" - let buildOps = [ + let ops = [ shellOp "dotnet" $"build --no-dependencies --configuration {configuration} {logger} {maxcpucount} {version} {arguments}" ] - buildRequest context buildOps + execRequest(Cacheability.Always, ops, false) /// @@ -136,11 +133,11 @@ type Dotnet() = let version = version |> Option.defaultValue "0.0.0" let arguments = arguments |> Option.defaultValue "" - let buildOps = [ + let ops = [ shellOp "dotnet" $"pack --no-build --configuration {configuration} /p:Version={version} /p:TargetsForTfmSpecificContentInPackage= {arguments}" ] - buildRequest context buildOps + execRequest(Cacheability.Always, ops, false) /// /// Publish a project. @@ -167,11 +164,11 @@ type Dotnet() = | _ -> "" let arguments = arguments |> Option.defaultValue "" - let buildOps = [ + let ops = [ shellOp "dotnet" $"publish --no-dependencies --configuration {configuration} {runtime} {trim} {single} {arguments}" ] - buildRequest context buildOps + execRequest(Cacheability.Always, ops, false) /// /// Restore packages. @@ -182,7 +179,7 @@ type Dotnet() = let arguments = arguments |> Option.defaultValue "" let ops = [ shellOp "dotnet" $"restore {arguments}" ] - execRequest Cacheability.Local ops + execRequest(Cacheability.Local, ops, false) /// @@ -196,8 +193,8 @@ type Dotnet() = let filter = filter |> Option.map (fun filter -> $" --filter \"{filter}\"") |> Option.defaultValue "" let arguments = arguments |> Option.defaultValue "" - let buildOps = [ + let ops = [ shellOp "dotnet" $"test --no-build --configuration {configuration} {filter} {arguments}" ] - buildRequest context buildOps + execRequest(Cacheability.Local, ops, false) diff --git a/src/Terrabuild.Extensions/Gradle.fs b/src/Terrabuild.Extensions/Gradle.fs index 70131dbf..b1dee0a3 100644 --- a/src/Terrabuild.Extensions/Gradle.fs +++ b/src/Terrabuild.Extensions/Gradle.fs @@ -31,7 +31,7 @@ type Gradle() = let arguments = $"{context.Command} {arguments}" let ops = [ shellOp "gradle" arguments ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -42,5 +42,4 @@ type Gradle() = let configuration = configuration |> Option.defaultValue GradleHelpers.defaultConfiguration let ops = [ shellOp "gradlew" $"assemble{configuration}" ] - - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) diff --git a/src/Terrabuild.Extensions/Make.fs b/src/Terrabuild.Extensions/Make.fs index 79156991..f25ef0fa 100644 --- a/src/Terrabuild.Extensions/Make.fs +++ b/src/Terrabuild.Extensions/Make.fs @@ -14,4 +14,4 @@ type Make() = static member __dispatch__ (context: ActionContext) (variables: Map) = let args = variables |> Seq.fold (fun acc kvp -> $"{acc} {kvp.Key}=\"{kvp.Value}\"") $"{context.Command}" let ops = [ shellOp "make" args ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) diff --git a/src/Terrabuild.Extensions/Npm.fs b/src/Terrabuild.Extensions/Npm.fs index a71d881e..a80bb91c 100644 --- a/src/Terrabuild.Extensions/Npm.fs +++ b/src/Terrabuild.Extensions/Npm.fs @@ -36,7 +36,7 @@ type Npm() = let ops = [ shellOp "npm" $"{cmd} {arguments}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -45,7 +45,7 @@ type Npm() = static member install (context: ActionContext) (force: bool option)= let force = if force = Some true then " --force" else "" let ops = [ shellOp "npm" $"ci{force}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -59,7 +59,7 @@ type Npm() = shellOp "npm" "ci" shellOp "npm" $"run build -- {args}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -73,7 +73,7 @@ type Npm() = shellOp "npm" "ci" shellOp "npm" $"run test -- {args}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// /// Run `run` script. @@ -85,4 +85,4 @@ type Npm() = let ops = [ shellOp "npm" $"run {command} -- {args}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) diff --git a/src/Terrabuild.Extensions/OpenApi.fs b/src/Terrabuild.Extensions/OpenApi.fs index f631edd2..870e19eb 100644 --- a/src/Terrabuild.Extensions/OpenApi.fs +++ b/src/Terrabuild.Extensions/OpenApi.fs @@ -17,4 +17,4 @@ type OpenApi() = let ops = [ shellOp "docker-entrypoint.sh" args ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) diff --git a/src/Terrabuild.Extensions/Shell.fs b/src/Terrabuild.Extensions/Shell.fs index 62888cf5..4ef2d27e 100644 --- a/src/Terrabuild.Extensions/Shell.fs +++ b/src/Terrabuild.Extensions/Shell.fs @@ -15,4 +15,4 @@ type Shell() = static member __dispatch__ (context: ActionContext) (arguments: string option) = let arguments = arguments |> Option.defaultValue "" let ops = [ shellOp context.Command arguments ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) diff --git a/src/Terrabuild.Extensions/Terraform.fs b/src/Terrabuild.Extensions/Terraform.fs index 523437b2..97c4d6fc 100644 --- a/src/Terrabuild.Extensions/Terraform.fs +++ b/src/Terrabuild.Extensions/Terraform.fs @@ -35,7 +35,7 @@ type Terraform() = let arguments = $"{context.Command} {arguments}" let ops = [ shellOp "terraform" arguments ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -48,7 +48,7 @@ type Terraform() = | Some config -> $" -backend-config={config}" | _ -> "" let ops = [ shellOp "terraform" $"init -reconfigure{config}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -69,7 +69,7 @@ type Terraform() = shellOp "terraform" "validate" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -96,7 +96,7 @@ type Terraform() = shellOp "terraform" $"plan -out=terrabuild.planfile{vars}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -121,5 +121,4 @@ type Terraform() = shellOp "terraform" "apply -input=false terrabuild.planfile" ] - execRequest Cacheability.Always ops - \ No newline at end of file + execRequest(Cacheability.Always, ops, true) diff --git a/src/Terrabuild.Extensions/Yarn.fs b/src/Terrabuild.Extensions/Yarn.fs index dae27881..e11236b5 100644 --- a/src/Terrabuild.Extensions/Yarn.fs +++ b/src/Terrabuild.Extensions/Yarn.fs @@ -34,7 +34,7 @@ type Yarn() = let ops = [ shellOp "yarn" $"{cmd} -- {arguments}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -48,7 +48,7 @@ type Yarn() = | _ -> "" let ops = [ shellOp "yarn" $"install --frozen-lockfile{ignoreEngines}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -67,7 +67,7 @@ type Yarn() = shellOp "yarn" $"install --frozen-lockfile{ignoreEngines}" shellOp "yarn" $"build -- {args}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// @@ -86,7 +86,7 @@ type Yarn() = shellOp "yarn" $"install --frozen-lockfile{ignoreEngines}" shellOp "yarn" $"test -- {args}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) /// /// Run `run` script. @@ -98,4 +98,4 @@ type Yarn() = let ops = [ shellOp "yarn" $"{command} -- {args}" ] - execRequest Cacheability.Always ops + execRequest(Cacheability.Always, ops, false) From 63d8c5951ffa265bc18fdfd0ad1e581c09f06bf0 Mon Sep 17 00:00:00 2001 From: Pierre Chalamet Date: Sat, 14 Jun 2025 10:26:34 +0200 Subject: [PATCH 04/10] propagate sideeffect flag --- src/Terrabuild/Core/Builder.fs | 10 ++++++---- src/Terrabuild/Core/GraphDef.fs | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Terrabuild/Core/Builder.fs b/src/Terrabuild/Core/Builder.fs index d8df0336..84574825 100644 --- a/src/Terrabuild/Core/Builder.fs +++ b/src/Terrabuild/Core/Builder.fs @@ -61,9 +61,9 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa // barrier nodes are just discarded and dependencies lift level up match projectConfig.Targets |> Map.tryFind targetName with | Some target -> - let cache, ops = + let cache, sideEffect, ops = target.Operations - |> List.fold (fun (cache, ops) operation -> + |> List.fold (fun (cache, sideEffect, ops) operation -> let optContext = { Terrabuild.Extensibility.ActionContext.Debug = options.Debug Terrabuild.Extensibility.ActionContext.CI = options.Run.IsSome @@ -98,8 +98,9 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa ContaineredShellOperation.Arguments = shellOperation.Arguments }) let cache = cache &&& executionRequest.Cache - cache, ops @ newops - ) (Cacheability.Always, []) + let sideEffect = sideEffect && executionRequest.SideEffect + cache, sideEffect, ops @ newops + ) (Cacheability.Always, false, []) let opsCmds = ops @@ -129,6 +130,7 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa Node.ConfigurationTarget = target Node.Operations = ops Node.Cache = cache + Node.SideEffect = sideEffect Node.Dependencies = children Node.Outputs = target.Outputs diff --git a/src/Terrabuild/Core/GraphDef.fs b/src/Terrabuild/Core/GraphDef.fs index 2c4115b8..9b485be0 100644 --- a/src/Terrabuild/Core/GraphDef.fs +++ b/src/Terrabuild/Core/GraphDef.fs @@ -27,6 +27,7 @@ type Node = { TargetHash: string Operations: ContaineredShellOperation list Cache: Terrabuild.Extensibility.Cacheability + SideEffect: bool // tell if a node is leaf (that is no dependencies in same project) IsLeaf: bool From 7a44b16e102b206fa4d4dbc07212c76910350794 Mon Sep 17 00:00:00 2001 From: Pierre Chalamet Date: Sat, 14 Jun 2025 11:45:40 +0200 Subject: [PATCH 05/10] introduced managed attribute on target --- src/Terrabuild.Configuration.Tests/Project.fs | 4 +++ .../TestFiles/Success_PROJECT | 1 + src/Terrabuild.Configuration/AST/Project.fs | 1 + .../Transpiler/Project.fs | 6 ++-- src/Terrabuild.Extensibility/Extensions.fs | 4 +-- src/Terrabuild.Extensions/Cargo.fs | 6 ++-- src/Terrabuild.Extensions/Docker.fs | 12 +++---- src/Terrabuild.Extensions/Dotnet.fs | 12 +++---- src/Terrabuild.Extensions/Gradle.fs | 4 +-- src/Terrabuild.Extensions/Make.fs | 2 +- src/Terrabuild.Extensions/Npm.fs | 14 ++++---- src/Terrabuild.Extensions/OpenApi.fs | 2 +- src/Terrabuild.Extensions/Shell.fs | 2 +- src/Terrabuild.Extensions/Terraform.fs | 24 +++++++------- src/Terrabuild.Extensions/Yarn.fs | 14 ++++---- src/Terrabuild/Core/Build.fs | 32 ++++++++++--------- src/Terrabuild/Core/Builder.fs | 22 ++++++------- src/Terrabuild/Core/Configuration.fs | 6 ++++ src/Terrabuild/Core/GraphDef.fs | 2 +- 19 files changed, 92 insertions(+), 78 deletions(-) diff --git a/src/Terrabuild.Configuration.Tests/Project.fs b/src/Terrabuild.Configuration.Tests/Project.fs index eae0988d..29cdeebe 100644 --- a/src/Terrabuild.Configuration.Tests/Project.fs +++ b/src/Terrabuild.Configuration.Tests/Project.fs @@ -47,12 +47,14 @@ let parseProject() = TargetBlock.Rebuild = None TargetBlock.Outputs = None TargetBlock.Cache = None + TargetBlock.Managed = None TargetBlock.Steps = [ { Extension = "@dotnet"; Command = "build"; Parameters = Map.empty } ] } let targetDist = { TargetBlock.DependsOn = None TargetBlock.Rebuild = None TargetBlock.Outputs = None TargetBlock.Cache = None + TargetBlock.Managed = Expr.False |> Some TargetBlock.Steps = [ { Extension = "@dotnet"; Command = "build"; Parameters = Map.empty } { Extension = "@dotnet"; Command = "publish"; Parameters = Map.empty } ] } let targetDocker = @@ -60,6 +62,7 @@ let parseProject() = TargetBlock.Rebuild = Some (Expr.Bool false) TargetBlock.Outputs = None TargetBlock.Cache = "always" |> Expr.String |> Some + TargetBlock.Managed = None TargetBlock.Steps = [ { Extension = "@shell"; Command = "echo" Parameters = Map [ "arguments", Expr.Function (Function.Trim, [ Expr.Function (Function.Plus, @@ -115,6 +118,7 @@ let parseProject2() = Expr.String ".dll" ])] |> Some TargetBlock.DependsOn = None TargetBlock.Cache = None + TargetBlock.Managed = None TargetBlock.Steps = [ { Extension = "@dotnet"; Command = "build"; Parameters = Map.empty } ] } let locals = diff --git a/src/Terrabuild.Configuration.Tests/TestFiles/Success_PROJECT b/src/Terrabuild.Configuration.Tests/TestFiles/Success_PROJECT index 0c9b1b23..bf922a25 100644 --- a/src/Terrabuild.Configuration.Tests/TestFiles/Success_PROJECT +++ b/src/Terrabuild.Configuration.Tests/TestFiles/Success_PROJECT @@ -37,6 +37,7 @@ target build { } target dist { + managed = false @dotnet build { } @dotnet publish { } } diff --git a/src/Terrabuild.Configuration/AST/Project.fs b/src/Terrabuild.Configuration/AST/Project.fs index 0180bef9..21cd499a 100644 --- a/src/Terrabuild.Configuration/AST/Project.fs +++ b/src/Terrabuild.Configuration/AST/Project.fs @@ -26,6 +26,7 @@ type TargetBlock = Outputs: Expr option DependsOn: Set option Cache: Expr option + Managed: Expr option Steps: Step list } [] diff --git a/src/Terrabuild.Configuration/Transpiler/Project.fs b/src/Terrabuild.Configuration/Transpiler/Project.fs index 41631d37..ee90f2e8 100644 --- a/src/Terrabuild.Configuration/Transpiler/Project.fs +++ b/src/Terrabuild.Configuration/Transpiler/Project.fs @@ -71,7 +71,7 @@ let toProject (block: Block) = let toTarget (block: Block) = block - |> checkAllowedAttributes ["rebuild"; "outputs"; "depends_on"; "cache"] + |> checkAllowedAttributes ["rebuild"; "outputs"; "depends_on"; "cache"; "managed"] |> ignore let rebuild = block |> tryFindAttribute "rebuild" @@ -85,6 +85,7 @@ let toTarget (block: Block) = | String.Regex "^target\.(.*)$" [targetIdentifier] -> targetIdentifier | _ -> raiseInvalidArg $"Invalid target dependency '{dependency}'")) let cache = block |> tryFindAttribute "cache" + let managed = block |> tryFindAttribute "managed" let steps = block.Blocks |> List.map (fun step -> @@ -110,7 +111,8 @@ let toTarget (block: Block) = TargetBlock.Outputs = outputs TargetBlock.DependsOn = dependsOn TargetBlock.Cache = cache - TargetBlock.Steps = steps } + TargetBlock.Steps = steps + TargetBlock.Managed = managed } diff --git a/src/Terrabuild.Extensibility/Extensions.fs b/src/Terrabuild.Extensibility/Extensions.fs index 248d5bed..1253c5bb 100644 --- a/src/Terrabuild.Extensibility/Extensions.fs +++ b/src/Terrabuild.Extensibility/Extensions.fs @@ -54,11 +54,11 @@ type ActionExecutionRequest = { } -let shellOp cmd args = +let shellOp(cmd, args) = { ShellOperation.Command = cmd ShellOperation.Arguments = args } -let execRequest (cache, ops, sideEffect) = +let execRequest(cache, ops, sideEffect) = { ActionExecutionRequest.Cache = cache ActionExecutionRequest.Operations = ops ActionExecutionRequest.SideEffect = sideEffect } diff --git a/src/Terrabuild.Extensions/Cargo.fs b/src/Terrabuild.Extensions/Cargo.fs index 75fd8b44..1dab93be 100644 --- a/src/Terrabuild.Extensions/Cargo.fs +++ b/src/Terrabuild.Extensions/Cargo.fs @@ -47,7 +47,7 @@ type Cargo() = let arguments = arguments |> Option.defaultValue "" let arguments = $"{context.Command} {arguments}" - let ops = [ shellOp "cargo" arguments ] + let ops = [ shellOp("cargo", arguments) ] execRequest(Cacheability.Always, ops, false) @@ -60,7 +60,7 @@ type Cargo() = let profile = profile |> Option.defaultValue "dev" let arguments = arguments |> Option.defaultValue "" - let ops = [ shellOp "cargo" $"build --profile {profile} {arguments}" ] + let ops = [ shellOp("cargo", $"build --profile {profile} {arguments}") ] execRequest(Cacheability.Always, ops, false) @@ -73,5 +73,5 @@ type Cargo() = let profile = profile |> Option.defaultValue "dev" let arguments = arguments |> Option.defaultValue "" - let ops = [ shellOp "cargo" $"test --profile {profile} {arguments}" ] + let ops = [ shellOp("cargo", $"test --profile {profile} {arguments}") ] execRequest(Cacheability.Always, ops, false) diff --git a/src/Terrabuild.Extensions/Docker.fs b/src/Terrabuild.Extensions/Docker.fs index c1909b67..a76b4381 100644 --- a/src/Terrabuild.Extensions/Docker.fs +++ b/src/Terrabuild.Extensions/Docker.fs @@ -16,8 +16,8 @@ type Docker() = let arguments = arguments |> Option.defaultValue "" let arguments = $"{context.Command} {arguments}" - let ops = [ shellOp "docker" arguments ] - execRequest(Cacheability.Always, ops, false) + let ops = [ shellOp("docker", arguments) ] + execRequest(Cacheability.Always, ops, true) /// @@ -42,8 +42,8 @@ type Docker() = let ops = [ let buildArgs = $"build --file {dockerfile} --tag {image}:{context.Hash}{args}{platformArgs} ." - shellOp "docker" buildArgs - if context.CI then shellOp "docker" $"push {image}:{context.Hash}" + shellOp("docker", buildArgs) + if context.CI then shellOp("docker", $"push {image}:{context.Hash}") ] let cacheability = @@ -62,9 +62,9 @@ type Docker() = let ops = [ if context.CI then - shellOp "docker" $"buildx imagetools create -t {image}:{tag} {image}:{context.Hash}" + shellOp("docker", $"buildx imagetools create -t {image}:{tag} {image}:{context.Hash}") else - shellOp "docker" $"tag {image}:{context.Hash} {image}:{tag}" + shellOp("docker", $"tag {image}:{context.Hash} {image}:{tag}") ] let cacheability = diff --git a/src/Terrabuild.Extensions/Dotnet.fs b/src/Terrabuild.Extensions/Dotnet.fs index a5d3ec39..87329587 100644 --- a/src/Terrabuild.Extensions/Dotnet.fs +++ b/src/Terrabuild.Extensions/Dotnet.fs @@ -82,7 +82,7 @@ type Dotnet() = let arguments = arguments |> Option.defaultValue "" let arguments = $"{context.Command} {arguments}" - let ops = [ shellOp "dotnet" arguments ] + let ops = [ shellOp("dotnet", arguments) ] execRequest(Cacheability.Always, ops, false) @@ -116,7 +116,7 @@ type Dotnet() = let arguments = arguments |> Option.defaultValue "" let ops = [ - shellOp "dotnet" $"build --no-dependencies --configuration {configuration} {logger} {maxcpucount} {version} {arguments}" + shellOp("dotnet", $"build --no-dependencies --configuration {configuration} {logger} {maxcpucount} {version} {arguments}") ] execRequest(Cacheability.Always, ops, false) @@ -134,7 +134,7 @@ type Dotnet() = let arguments = arguments |> Option.defaultValue "" let ops = [ - shellOp "dotnet" $"pack --no-build --configuration {configuration} /p:Version={version} /p:TargetsForTfmSpecificContentInPackage= {arguments}" + shellOp("dotnet", $"pack --no-build --configuration {configuration} /p:Version={version} /p:TargetsForTfmSpecificContentInPackage= {arguments}") ] execRequest(Cacheability.Always, ops, false) @@ -165,7 +165,7 @@ type Dotnet() = let arguments = arguments |> Option.defaultValue "" let ops = [ - shellOp "dotnet" $"publish --no-dependencies --configuration {configuration} {runtime} {trim} {single} {arguments}" + shellOp("dotnet", $"publish --no-dependencies --configuration {configuration} {runtime} {trim} {single} {arguments}") ] execRequest(Cacheability.Always, ops, false) @@ -178,7 +178,7 @@ type Dotnet() = static member restore (arguments: string option) = let arguments = arguments |> Option.defaultValue "" - let ops = [ shellOp "dotnet" $"restore {arguments}" ] + let ops = [ shellOp( "dotnet", $"restore {arguments}") ] execRequest(Cacheability.Local, ops, false) @@ -194,7 +194,7 @@ type Dotnet() = let arguments = arguments |> Option.defaultValue "" let ops = [ - shellOp "dotnet" $"test --no-build --configuration {configuration} {filter} {arguments}" + shellOp("dotnet", $"test --no-build --configuration {configuration} {filter} {arguments}") ] execRequest(Cacheability.Local, ops, false) diff --git a/src/Terrabuild.Extensions/Gradle.fs b/src/Terrabuild.Extensions/Gradle.fs index b1dee0a3..c3dafa83 100644 --- a/src/Terrabuild.Extensions/Gradle.fs +++ b/src/Terrabuild.Extensions/Gradle.fs @@ -30,7 +30,7 @@ type Gradle() = let arguments = arguments |> Option.defaultValue "" let arguments = $"{context.Command} {arguments}" - let ops = [ shellOp "gradle" arguments ] + let ops = [ shellOp("gradle", arguments) ] execRequest(Cacheability.Always, ops, false) @@ -41,5 +41,5 @@ type Gradle() = static member build (context: ActionContext) (configuration: string option) = let configuration = configuration |> Option.defaultValue GradleHelpers.defaultConfiguration - let ops = [ shellOp "gradlew" $"assemble{configuration}" ] + let ops = [ shellOp("gradlew", $"assemble{configuration}") ] execRequest(Cacheability.Always, ops, false) diff --git a/src/Terrabuild.Extensions/Make.fs b/src/Terrabuild.Extensions/Make.fs index f25ef0fa..ba2b2da9 100644 --- a/src/Terrabuild.Extensions/Make.fs +++ b/src/Terrabuild.Extensions/Make.fs @@ -13,5 +13,5 @@ type Make() = /// Variables to pass to make target. static member __dispatch__ (context: ActionContext) (variables: Map) = let args = variables |> Seq.fold (fun acc kvp -> $"{acc} {kvp.Key}=\"{kvp.Value}\"") $"{context.Command}" - let ops = [ shellOp "make" args ] + let ops = [ shellOp("make", args) ] execRequest(Cacheability.Always, ops, false) diff --git a/src/Terrabuild.Extensions/Npm.fs b/src/Terrabuild.Extensions/Npm.fs index a80bb91c..3b234d0b 100644 --- a/src/Terrabuild.Extensions/Npm.fs +++ b/src/Terrabuild.Extensions/Npm.fs @@ -34,7 +34,7 @@ type Npm() = let arguments = arguments |> Option.defaultValue "" let ops = [ - shellOp "npm" $"{cmd} {arguments}" + shellOp("npm", $"{cmd} {arguments}") ] execRequest(Cacheability.Always, ops, false) @@ -44,7 +44,7 @@ type Npm() = /// static member install (context: ActionContext) (force: bool option)= let force = if force = Some true then " --force" else "" - let ops = [ shellOp "npm" $"ci{force}" ] + let ops = [ shellOp("npm", $"ci{force}") ] execRequest(Cacheability.Always, ops, false) @@ -56,8 +56,8 @@ type Npm() = let args = arguments |> Option.defaultValue "" let ops = [ - shellOp "npm" "ci" - shellOp "npm" $"run build -- {args}" + shellOp("npm", "ci") + shellOp("npm", $"run build -- {args}") ] execRequest(Cacheability.Always, ops, false) @@ -70,8 +70,8 @@ type Npm() = let args = arguments |> Option.defaultValue "" let ops = [ - shellOp "npm" "ci" - shellOp "npm" $"run test -- {args}" + shellOp("npm", "ci") + shellOp("npm", $"run test -- {args}") ] execRequest(Cacheability.Always, ops, false) @@ -83,6 +83,6 @@ type Npm() = let args = arguments |> Option.defaultValue "" let ops = [ - shellOp "npm" $"run {command} -- {args}" + shellOp("npm", $"run {command} -- {args}") ] execRequest(Cacheability.Always, ops, false) diff --git a/src/Terrabuild.Extensions/OpenApi.fs b/src/Terrabuild.Extensions/OpenApi.fs index 870e19eb..8e3d7427 100644 --- a/src/Terrabuild.Extensions/OpenApi.fs +++ b/src/Terrabuild.Extensions/OpenApi.fs @@ -15,6 +15,6 @@ type OpenApi() = let args = $"generate -i {input} -g {generator} -o {output}" let ops = [ - shellOp "docker-entrypoint.sh" args + shellOp("docker-entrypoint.sh", args) ] execRequest(Cacheability.Always, ops, false) diff --git a/src/Terrabuild.Extensions/Shell.fs b/src/Terrabuild.Extensions/Shell.fs index 4ef2d27e..d3846005 100644 --- a/src/Terrabuild.Extensions/Shell.fs +++ b/src/Terrabuild.Extensions/Shell.fs @@ -14,5 +14,5 @@ type Shell() = /// Arguments to pass to command. static member __dispatch__ (context: ActionContext) (arguments: string option) = let arguments = arguments |> Option.defaultValue "" - let ops = [ shellOp context.Command arguments ] + let ops = [ shellOp(context.Command, arguments) ] execRequest(Cacheability.Always, ops, false) diff --git a/src/Terrabuild.Extensions/Terraform.fs b/src/Terrabuild.Extensions/Terraform.fs index 97c4d6fc..116d1775 100644 --- a/src/Terrabuild.Extensions/Terraform.fs +++ b/src/Terrabuild.Extensions/Terraform.fs @@ -34,8 +34,8 @@ type Terraform() = let arguments = arguments |> Option.defaultValue "" let arguments = $"{context.Command} {arguments}" - let ops = [ shellOp "terraform" arguments ] - execRequest(Cacheability.Always, ops, false) + let ops = [ shellOp("terraform", arguments) ] + execRequest(Cacheability.Always, ops, true) /// @@ -47,7 +47,7 @@ type Terraform() = match config with | Some config -> $" -backend-config={config}" | _ -> "" - let ops = [ shellOp "terraform" $"init -reconfigure{config}" ] + let ops = [ shellOp("terraform", $"init -reconfigure{config}") ] execRequest(Cacheability.Always, ops, false) @@ -61,13 +61,13 @@ type Terraform() = /// Variables for plan (see Terraform [Variables](https://developer.hashicorp.com/terraform/language/values/variables#variables-on-the-command-line)). static member validate (context: ActionContext) (workspace: string option) = let ops = [ - shellOp "terraform" "init" + shellOp("terraform", "init") match workspace with - | Some workspace -> shellOp "terraform" $"workspace select {workspace}" + | Some workspace -> shellOp("terraform", $"workspace select {workspace}") | _ -> () - shellOp "terraform" "validate" + shellOp("terraform", "validate") ] execRequest(Cacheability.Always, ops, false) @@ -88,13 +88,13 @@ type Terraform() = | _ -> "" let ops = [ - shellOp "terraform" $"init -reconfigure{config}" + shellOp("terraform", $"init -reconfigure{config}") match workspace with - | Some workspace -> shellOp "terraform" $"workspace select {workspace}" + | Some workspace -> shellOp("terraform", $"workspace select {workspace}") | _ -> () - shellOp "terraform" $"plan -out=terrabuild.planfile{vars}" + shellOp("terraform", $"plan -out=terrabuild.planfile{vars}") ] execRequest(Cacheability.Always, ops, false) @@ -113,12 +113,12 @@ type Terraform() = | _ -> "" let ops = [ - shellOp "terraform" $"init -reconfigure{config}" + shellOp("terraform", $"init -reconfigure{config}") match workspace with - | Some workspace -> shellOp "terraform" $"workspace select {workspace}" + | Some workspace -> shellOp("terraform", $"workspace select {workspace}") | _ -> () - shellOp "terraform" "apply -input=false terrabuild.planfile" + shellOp("terraform", "apply -input=false terrabuild.planfile") ] execRequest(Cacheability.Always, ops, true) diff --git a/src/Terrabuild.Extensions/Yarn.fs b/src/Terrabuild.Extensions/Yarn.fs index e11236b5..849e6a73 100644 --- a/src/Terrabuild.Extensions/Yarn.fs +++ b/src/Terrabuild.Extensions/Yarn.fs @@ -32,7 +32,7 @@ type Yarn() = let cmd = context.Command let ops = [ - shellOp "yarn" $"{cmd} -- {arguments}" + shellOp("yarn", $"{cmd} -- {arguments}") ] execRequest(Cacheability.Always, ops, false) @@ -47,7 +47,7 @@ type Yarn() = | Some true -> " --ignore-engines" | _ -> "" - let ops = [ shellOp "yarn" $"install --frozen-lockfile{ignoreEngines}" ] + let ops = [ shellOp("yarn", $"install --frozen-lockfile{ignoreEngines}") ] execRequest(Cacheability.Always, ops, false) @@ -64,8 +64,8 @@ type Yarn() = | _ -> "" let ops = [ - shellOp "yarn" $"install --frozen-lockfile{ignoreEngines}" - shellOp "yarn" $"build -- {args}" + shellOp("yarn", $"install --frozen-lockfile{ignoreEngines}") + shellOp("yarn", $"build -- {args}") ] execRequest(Cacheability.Always, ops, false) @@ -83,8 +83,8 @@ type Yarn() = | _ -> "" let ops = [ - shellOp "yarn" $"install --frozen-lockfile{ignoreEngines}" - shellOp "yarn" $"test -- {args}" + shellOp("yarn", $"install --frozen-lockfile{ignoreEngines}") + shellOp("yarn", $"test -- {args}") ] execRequest(Cacheability.Always, ops, false) @@ -96,6 +96,6 @@ type Yarn() = let args = arguments |> Option.defaultValue "" let ops = [ - shellOp "yarn" $"{command} -- {args}" + shellOp("yarn", $"{command} -- {args}") ] execRequest(Cacheability.Always, ops, false) diff --git a/src/Terrabuild/Core/Build.fs b/src/Terrabuild/Core/Build.fs index 35a0e2c9..7bc0fdbc 100644 --- a/src/Terrabuild/Core/Build.fs +++ b/src/Terrabuild/Core/Build.fs @@ -239,7 +239,7 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I match cache.TryGetSummaryOnly allowRemoteCache cacheEntryId with | Some (_, summary) -> if retry && not summary.IsSuccessful then None - else + else let dependencies = node.Dependencies |> Seq.choose (fun nodeId -> match restorables.TryGetValue nodeId with @@ -249,24 +249,26 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I let callback() = notification.NodeDownloading node - match cache.TryGetSummary allowRemoteCache cacheEntryId with - | Some summary -> - Log.Debug("{NodeId} restoring '{Project}/{Target}' from cache from {Hash}", node.Id, node.Project, node.Target, node.TargetHash) - match summary.Outputs with - | Some outputs -> - let files = IO.enumerateFiles outputs - IO.copyFiles projectDirectory outputs files |> ignore - api |> Option.iter (fun api -> api.UseArtifact node.ProjectHash node.TargetHash) - | _ -> () - notification.NodeCompleted node TaskRequest.Restore true - | _ -> - notification.NodeCompleted node TaskRequest.Restore false - raiseBugError $"Unable to download build output for {cacheEntryId} for node {node.Id}" + // only download artifact if it's fully managed + if node.Managed then + match cache.TryGetSummary allowRemoteCache cacheEntryId with + | Some summary -> + Log.Debug("{NodeId} restoring '{Project}/{Target}' from cache from {Hash}", node.Id, node.Project, node.Target, node.TargetHash) + match summary.Outputs with + | Some outputs -> + let files = IO.enumerateFiles outputs + IO.copyFiles projectDirectory outputs files |> ignore + api |> Option.iter (fun api -> api.UseArtifact node.ProjectHash node.TargetHash) + | _ -> () + notification.NodeCompleted node TaskRequest.Restore true + | _ -> + notification.NodeCompleted node TaskRequest.Restore false + raiseBugError $"Unable to download build output for {cacheEntryId} for node {node.Id}" let restorable = Restorable(callback, dependencies) restorables.TryAdd(node.Id, restorable) |> ignore if summary.IsSuccessful then TaskStatus.Success summary.EndedAt |> Some - else TaskStatus.Failure (summary.EndedAt, $"Restored node {node.Id} with a build in failure state") |> Some + else TaskStatus.Failure (summary.EndedAt, $"Restored node {node.Id} with a build in failure state") |> Some | _ -> None let nodeComputed = hub.GetSignal nodeId diff --git a/src/Terrabuild/Core/Builder.fs b/src/Terrabuild/Core/Builder.fs index 84574825..d875c46c 100644 --- a/src/Terrabuild/Core/Builder.fs +++ b/src/Terrabuild/Core/Builder.fs @@ -45,8 +45,7 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa // apply on each dependency let inChildren, outChildren = - dependsOns - |> Set.fold (fun (accInChildren, accOutChildren) dependsOn -> + dependsOns |> Set.fold (fun (accInChildren, accOutChildren) dependsOn -> match dependsOn with | String.Regex "^\^(.+)$" [ parentDependsOn ] -> accInChildren, accOutChildren + projectConfig.Dependencies |> Set.collect (buildTarget parentDependsOn) @@ -62,8 +61,7 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa match projectConfig.Targets |> Map.tryFind targetName with | Some target -> let cache, sideEffect, ops = - target.Operations - |> List.fold (fun (cache, sideEffect, ops) operation -> + target.Operations |> List.fold (fun (cache, sideEffect, ops) operation -> let optContext = { Terrabuild.Extensibility.ActionContext.Debug = options.Debug Terrabuild.Extensibility.ActionContext.CI = options.Run.IsSome @@ -88,8 +86,7 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa | _ -> raiseExternalError $"{hash}: Failed to get shell operation (extension error)" let newops = - executionRequest.Operations - |> List.map (fun shellOperation -> { + executionRequest.Operations |> List.map (fun shellOperation -> { ContaineredShellOperation.Container = operation.Container ContaineredShellOperation.ContainerPlatform = operation.Platform ContaineredShellOperation.ContainerVariables = operation.ContainerVariables @@ -98,7 +95,7 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa ContaineredShellOperation.Arguments = shellOperation.Arguments }) let cache = cache &&& executionRequest.Cache - let sideEffect = sideEffect && executionRequest.SideEffect + let sideEffect = sideEffect || executionRequest.SideEffect cache, sideEffect, ops @ newops ) (Cacheability.Always, false, []) @@ -122,6 +119,8 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa elif options.LocalOnly then Cacheability.Local else target.Cache |> Option.defaultValue cache + let managed = target.Managed |> Option.defaultValue true + let node = { Node.Id = nodeId Node.Label = $"{targetName} {projectConfig.Name}" @@ -130,7 +129,7 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa Node.ConfigurationTarget = target Node.Operations = ops Node.Cache = cache - Node.SideEffect = sideEffect + Node.Managed = managed Node.Dependencies = children Node.Outputs = target.Outputs @@ -154,10 +153,9 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa node2children[nodeId] let rootNodes = - configuration.SelectedProjects - |> Seq.collect (fun dependency -> options.Targets - |> Seq.collect (fun target -> - buildTarget target dependency)) + configuration.SelectedProjects |> Seq.collect (fun dependency -> + options.Targets |> Seq.collect (fun target -> + buildTarget target dependency)) |> Set let endedAt = DateTime.UtcNow diff --git a/src/Terrabuild/Core/Configuration.fs b/src/Terrabuild/Core/Configuration.fs index a2a129c4..0c63b661 100644 --- a/src/Terrabuild/Core/Configuration.fs +++ b/src/Terrabuild/Core/Configuration.fs @@ -31,6 +31,7 @@ type Target = { DependsOn: string set Outputs: string set Cache: Cacheability option + Managed: bool option Operations: TargetOperation list } @@ -549,11 +550,16 @@ let private finalizeProject projectDir evaluationContext (projectDef: LoadedProj | None -> None | _ -> raiseParseError "invalid cache value" + let targetManaged = + target.Managed + |> Option.bind (Eval.asBoolOption << Eval.eval evaluationContext) + let target = { Target.Hash = hash Target.Rebuild = rebuild Target.DependsOn = dependsOn Target.Cache = targetCache + Target.Managed = targetManaged Target.Outputs = outputs Target.Operations = targetOperations } diff --git a/src/Terrabuild/Core/GraphDef.fs b/src/Terrabuild/Core/GraphDef.fs index 9b485be0..6da6ca66 100644 --- a/src/Terrabuild/Core/GraphDef.fs +++ b/src/Terrabuild/Core/GraphDef.fs @@ -27,7 +27,7 @@ type Node = { TargetHash: string Operations: ContaineredShellOperation list Cache: Terrabuild.Extensibility.Cacheability - SideEffect: bool + Managed: bool // tell if a node is leaf (that is no dependencies in same project) IsLeaf: bool From f962fb38b755011920cc7401af9df45800781fb8 Mon Sep 17 00:00:00 2001 From: Pierre Chalamet Date: Sat, 14 Jun 2025 11:56:48 +0200 Subject: [PATCH 06/10] mark node as complete if no download required --- src/Terrabuild/Core/Build.fs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Terrabuild/Core/Build.fs b/src/Terrabuild/Core/Build.fs index 7bc0fdbc..21a21000 100644 --- a/src/Terrabuild/Core/Build.fs +++ b/src/Terrabuild/Core/Build.fs @@ -248,9 +248,8 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I |> List.ofSeq let callback() = - notification.NodeDownloading node - // only download artifact if it's fully managed if node.Managed then + notification.NodeDownloading node match cache.TryGetSummary allowRemoteCache cacheEntryId with | Some summary -> Log.Debug("{NodeId} restoring '{Project}/{Target}' from cache from {Hash}", node.Id, node.Project, node.Target, node.TargetHash) @@ -264,6 +263,8 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I | _ -> notification.NodeCompleted node TaskRequest.Restore false raiseBugError $"Unable to download build output for {cacheEntryId} for node {node.Id}" + else + notification.NodeCompleted node TaskRequest.Restore true let restorable = Restorable(callback, dependencies) restorables.TryAdd(node.Id, restorable) |> ignore From b498966ba3d79fcb2540577952a0e8e1c71ac41e Mon Sep 17 00:00:00 2001 From: Pierre Chalamet Date: Sat, 14 Jun 2025 12:09:00 +0200 Subject: [PATCH 07/10] fix restore status --- src/Terrabuild/Core/Build.fs | 38 ++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/Terrabuild/Core/Build.fs b/src/Terrabuild/Core/Build.fs index 21a21000..3dfc4cdd 100644 --- a/src/Terrabuild/Core/Build.fs +++ b/src/Terrabuild/Core/Build.fs @@ -248,26 +248,26 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I |> List.ofSeq let callback() = - if node.Managed then - notification.NodeDownloading node - match cache.TryGetSummary allowRemoteCache cacheEntryId with - | Some summary -> - Log.Debug("{NodeId} restoring '{Project}/{Target}' from cache from {Hash}", node.Id, node.Project, node.Target, node.TargetHash) - match summary.Outputs with - | Some outputs -> - let files = IO.enumerateFiles outputs - IO.copyFiles projectDirectory outputs files |> ignore - api |> Option.iter (fun api -> api.UseArtifact node.ProjectHash node.TargetHash) - | _ -> () - notification.NodeCompleted node TaskRequest.Restore true - | _ -> - notification.NodeCompleted node TaskRequest.Restore false - raiseBugError $"Unable to download build output for {cacheEntryId} for node {node.Id}" - else + notification.NodeDownloading node + match cache.TryGetSummary allowRemoteCache cacheEntryId with + | Some summary -> + Log.Debug("{NodeId} restoring '{Project}/{Target}' from cache from {Hash}", node.Id, node.Project, node.Target, node.TargetHash) + match summary.Outputs with + | Some outputs -> + let files = IO.enumerateFiles outputs + IO.copyFiles projectDirectory outputs files |> ignore + api |> Option.iter (fun api -> api.UseArtifact node.ProjectHash node.TargetHash) + | _ -> () notification.NodeCompleted node TaskRequest.Restore true - - let restorable = Restorable(callback, dependencies) - restorables.TryAdd(node.Id, restorable) |> ignore + | _ -> + notification.NodeCompleted node TaskRequest.Restore false + raiseBugError $"Unable to download build output for {cacheEntryId} for node {node.Id}" + + if node.Managed then + let restorable = Restorable(callback, dependencies) + restorables.TryAdd(node.Id, restorable) |> ignore + else + notification.NodeCompleted node TaskRequest.Restore true if summary.IsSuccessful then TaskStatus.Success summary.EndedAt |> Some else TaskStatus.Failure (summary.EndedAt, $"Restored node {node.Id} with a build in failure state") |> Some | _ -> None From 7e240d5833f3d5518a52d89da38dde8e0754275b Mon Sep 17 00:00:00 2001 From: Pierre Chalamet Date: Sat, 14 Jun 2025 12:14:03 +0200 Subject: [PATCH 08/10] if target is not managed, no need to keep outputs --- src/Terrabuild/Core/Builder.fs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Terrabuild/Core/Builder.fs b/src/Terrabuild/Core/Builder.fs index d875c46c..0e0c0631 100644 --- a/src/Terrabuild/Core/Builder.fs +++ b/src/Terrabuild/Core/Builder.fs @@ -121,6 +121,10 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa let managed = target.Managed |> Option.defaultValue true + let targetOutput = + if managed then target.Outputs + else Set.empty + let node = { Node.Id = nodeId Node.Label = $"{targetName} {projectConfig.Name}" @@ -132,7 +136,7 @@ let build (options: ConfigOptions.Options) (configuration: Configuration.Workspa Node.Managed = managed Node.Dependencies = children - Node.Outputs = target.Outputs + Node.Outputs = targetOutput Node.ProjectHash = projectConfig.Hash Node.TargetHash = hash From 5745e2228a8d18f22462a94822a39bf01bfedcc0 Mon Sep 17 00:00:00 2001 From: Pierre Chalamet Date: Sat, 14 Jun 2025 12:31:49 +0200 Subject: [PATCH 09/10] add log for restore skip --- src/Terrabuild/Core/Build.fs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Terrabuild/Core/Build.fs b/src/Terrabuild/Core/Build.fs index 3dfc4cdd..e505fd6b 100644 --- a/src/Terrabuild/Core/Build.fs +++ b/src/Terrabuild/Core/Build.fs @@ -251,7 +251,7 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I notification.NodeDownloading node match cache.TryGetSummary allowRemoteCache cacheEntryId with | Some summary -> - Log.Debug("{NodeId} restoring '{Project}/{Target}' from cache from {Hash}", node.Id, node.Project, node.Target, node.TargetHash) + Log.Debug("{NodeId} restoring '{Project}/{Target}' with {Hash}", node.Id, node.Project, node.Target, node.TargetHash) match summary.Outputs with | Some outputs -> let files = IO.enumerateFiles outputs @@ -267,6 +267,7 @@ let run (options: ConfigOptions.Options) (cache: Cache.ICache) (api: Contracts.I let restorable = Restorable(callback, dependencies) restorables.TryAdd(node.Id, restorable) |> ignore else + Log.Debug("{NodeId} skipping restore unmanaged '{Project}/{Target}' with {Hash}", node.Id, node.Project, node.Target, node.TargetHash) notification.NodeCompleted node TaskRequest.Restore true if summary.IsSuccessful then TaskStatus.Success summary.EndedAt |> Some else TaskStatus.Failure (summary.EndedAt, $"Restored node {node.Id} with a build in failure state") |> Some From 1a7938a70439f07618cb0920ce92ea96ca2d7437 Mon Sep 17 00:00:00 2001 From: Pierre Chalamet Date: Sat, 14 Jun 2025 12:42:48 +0200 Subject: [PATCH 10/10] update smoke tests --- .../results/terrabuild-debug.build-graph.json | 7 +++++++ .../results/terrabuild-debug.build-graph.json | 3 +++ tests/simple/results/terrabuild-debug.build-graph.json | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/tests/cluster-layers/results/terrabuild-debug.build-graph.json b/tests/cluster-layers/results/terrabuild-debug.build-graph.json index 0b9e42e0..af102623 100644 --- a/tests/cluster-layers/results/terrabuild-debug.build-graph.json +++ b/tests/cluster-layers/results/terrabuild-debug.build-graph.json @@ -77,6 +77,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "b:build": { @@ -156,6 +157,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "c:build": { @@ -235,6 +237,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "d:build": { @@ -294,6 +297,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "e:build": { @@ -353,6 +357,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "f:build": { @@ -410,6 +415,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "g:build": { @@ -466,6 +472,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true } }, diff --git a/tests/multirefs/results/terrabuild-debug.build-graph.json b/tests/multirefs/results/terrabuild-debug.build-graph.json index d476dfd9..949cd48b 100644 --- a/tests/multirefs/results/terrabuild-debug.build-graph.json +++ b/tests/multirefs/results/terrabuild-debug.build-graph.json @@ -47,6 +47,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "b:build": { @@ -95,6 +96,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "c:build": { @@ -141,6 +143,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true } }, diff --git a/tests/simple/results/terrabuild-debug.build-graph.json b/tests/simple/results/terrabuild-debug.build-graph.json index 0fe253d5..e322f52d 100644 --- a/tests/simple/results/terrabuild-debug.build-graph.json +++ b/tests/simple/results/terrabuild-debug.build-graph.json @@ -84,6 +84,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "libraries/dotnet-lib:build": { @@ -148,6 +149,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "libraries/npm-lib:build": { @@ -205,6 +207,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "libraries/shell-lib:build": { @@ -251,6 +254,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "projects/dotnet-app:build": { @@ -317,6 +321,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "projects/make-app:build": { @@ -396,6 +401,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "projects/npm-app/private-npm-lib:build": { @@ -453,6 +459,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "projects/npm-app:build": { @@ -513,6 +520,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "projects/open-api:build": { @@ -571,6 +579,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true }, "projects/rust-app:build": { @@ -622,6 +631,7 @@ } ], "cache": 0, + "managed": true, "isLeaf": true } },