Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"fallout.globaltool": {
"version": "10.4.0",
"commands": [
"fallout"
]
}
}
}
17 changes: 12 additions & 5 deletions .nuke/build.schema.json → .fallout/build.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"Quiet"
]
},
"NukeBuild": {
"FalloutBuild": {
"properties": {
"Continue": {
"type": "boolean",
Expand Down Expand Up @@ -105,6 +105,13 @@
"Verbosity": {
"description": "Logging verbosity during build execution. Default is 'Normal'",
"$ref": "#/definitions/Verbosity"
},
"BuildProjectFile": {
"type": [
"null",
"string"
],
"description": "Path to the build project (.csproj) relative to the repository root. Defaults to 'build/_build.csproj' when unset. Read by the Fallout global tool's in-tool runner."
}
}
}
Expand All @@ -118,15 +125,15 @@
},
"Configuration": {
"type": "string",
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)",
"enum": [
"Debug",
"Release"
]
],
"description": "Configuration to build - Default is 'Debug' (local) or 'Release' (server)"
},
"NuGetApiKey": {
"type": "string",
"default": "Secrets must be entered via 'nuke :secrets [profile]'"
"default": "Secrets must be entered via 'fallout :secrets [profile]'"
},
"NuGetSource": {
"type": "string"
Expand Down Expand Up @@ -157,7 +164,7 @@
}
},
{
"$ref": "#/definitions/NukeBuild"
"$ref": "#/definitions/FalloutBuild"
}
]
}
5 changes: 5 additions & 0 deletions .fallout/parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "./build.schema.json",
"Solution": "Spring.Net.sln",
"BuildProjectFile": "build-support/build/_build.csproj"
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ _ReSharper*/

#Project files
[Bb]uild/
!/build-support/build/
s3-credentials.ps1
TIBCO.EMS.*

Expand Down Expand Up @@ -88,5 +89,5 @@ project.lock.json

BenchmarkDotNet.Artifacts*
/artifacts
/.nuke/temp
/.fallout/temp
node_modules
4 changes: 0 additions & 4 deletions .nuke/parameters.json

This file was deleted.

8 changes: 4 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Spring.NET is a port and extension of the Java Spring Framework for .NET: IoC co

## Build and test commands

Build orchestration is NUKE (`build-support/nuke-build`). Root-level bootstrap scripts install the pinned .NET SDK if missing (`global.json`: 10.0.100, rollForward latestMinor).
Build orchestration is Fallout (`build-support/build`), the maintained successor to NUKE. Root-level bootstrap scripts install the pinned .NET SDK if missing (`global.json`: 10.0.100, rollForward latestMinor), then run the build through the `fallout` local tool (`dotnet tool restore` + `dotnet fallout`).

```
./build.cmd # Windows (build.sh on Linux/macOS); default target = Compile
Expand All @@ -34,7 +34,7 @@ dotnet test test/Spring/Spring.Core.Tests/Spring.Core.Tests.csproj -f net8.0 --f

### Integration tests

NUKE's `Test` target excludes `*.Integration.Tests` projects (and `Spring.Web.Conversation.NHibernate5.Tests`) by default; they need external infrastructure and are gated behind flags: `--test-full`, `--test-integration-data`, `--test-integration-nms`, `--test-integration-ms-mq`, `--test-integration-ems`. `Spring.Services.Tests` is always excluded. Several test projects are Windows-only (net462: Web, Mvc5, Velocity, Messaging/MSMQ).
Fallout's `Test` target excludes `*.Integration.Tests` projects (and `Spring.Web.Conversation.NHibernate5.Tests`) by default; they need external infrastructure and are gated behind flags: `--test-full`, `--test-integration-data`, `--test-integration-nms`, `--test-integration-ms-mq`, `--test-integration-ems`. `Spring.Services.Tests` is always excluded. Several test projects are Windows-only (net462: Web, Mvc5, Velocity, Messaging/MSMQ).

- SQL Server-backed tests (`Spring.Data.Integration.Tests`, `Spring.Data.NHibernate5.Integration.Tests`, `Spring.Scheduling.Quartz3.Integration.Tests`): `docker-compose.yml` brings up SQL Server; setup scripts in `build-support/*.sql` and the test projects' `Data/` folders. See README.md "Running tests" for the full recipe.
- TIBCO EMS projects need `TIBCO.EMS.dll` (not in the repo) and are excluded from the solution build; enable with `--build-ems`.
Expand Down Expand Up @@ -71,10 +71,10 @@ Key mechanics (defined in `src/Directory.Build.props` and `test/Directory.Build.

## Legacy areas — do not modify

- NAnt-era build files, superseded by NUKE but still committed: `Spring.build`, `*.include`, `Build-ci.cmd`, `build-release-all.cmd`, `appveyor.yml.old`, most of `build-support/` (exception: `build-support/tools/antlr-2.7.6` is still used by the `Antlr` target).
- NAnt-era build files, superseded by the Fallout build but still committed: `Spring.build`, `*.include`, `Build-ci.cmd`, `build-release-all.cmd`, `appveyor.yml.old`, most of `build-support/` (exception: `build-support/tools/antlr-2.7.6` is still used by the `Antlr` target).
- `dev-support/`, `templates/` — VS 2008-era templates. `lib/` — checked-in legacy third-party DLLs. `doc/` — DocBook sources + vendored toolchain (CI ignores `doc/**`).
- Orphan test folders not in the solution (reference removed projects): `test/Spring/Spring.Web.Mvc.Tests`, `Spring.Messaging.Ems.Tests`, `Spring.Data.NHibernate.Tests`.

## Website

`website/` is a Gatsby 5 + React + TypeScript site (package manager: **yarn**). Local dev: `yarn install && yarn start`. The full build is `./build.sh website` (NUKE target; also builds the DocBook reference docs, which require Java on PATH). Deployed to GitHub Pages by `.github/workflows/website.yml` on pushes to `main`.
`website/` is a Gatsby 5 + React + TypeScript site (package manager: **yarn**). Local dev: `yarn install && yarn start`. The full build is `./build.sh website` (Fallout target; also builds the DocBook reference docs, which require Java on PATH). Deployed to GitHub Pages by `.github/workflows/website.yml` on pushes to `main`.
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<PackageVersion Include="Common.Logging" Version="3.4.1" />
<PackageVersion Include="ConfigureAwaitChecker.Analyzer" Version="5.0.0.1" />
<PackageVersion Include="Experimental.System.Messaging.Signed" Version="1.0.0" />
<PackageVersion Include="Fallout.Common" Version="10.4.0" />
<PackageVersion Include="FakeItEasy" Version="8.3.0" />
<PackageVersion Include="FakeItEasy.Analyzer.CSharp" Version="6.1.1" />
<PackageVersion Include="MSTest.TestAdapter" Version="3.4.3" />
Expand All @@ -25,7 +26,6 @@
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageVersion Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageVersion Include="NHibernate" Version="5.6.0" />
<PackageVersion Include="Nuke.Common" Version="10.0.0" />
<PackageVersion Include="NUnit" Version="3.14.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="5.0.0" />
<PackageVersion Include="NVelocity" Version="1.2.0" />
Expand All @@ -38,6 +38,6 @@
<PackageVersion Include="System.Reflection.Emit" Version="4.7.0" />
<PackageVersion Include="System.Reflection.Emit.Lightweight" Version="4.7.0" />
<PackageVersion Include="System.Resources.Extensions" Version="8.0.0" />
<PackageVersion Include="log4net" Version="3.1.0" />
<PackageVersion Include="log4net" Version="3.3.2" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Spring.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spring.Benchmark", "test\Sp
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{9537C677-ADE5-4503-AFD7-3E0C3B0960EB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build-support\nuke-build\_build.csproj", "{0D135B50-2B59-44C1-941A-32B5EC798C88}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build-support\build\_build.csproj", "{0D135B50-2B59-44C1-941A-32B5EC798C88}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{C0BAC5A1-AC38-4D36-BE28-F5A74BD9FECD}"
ProjectSection(SolutionItems) = preProject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.Tooling;
using Fallout.Common;
using Fallout.Common.IO;
using Fallout.Common.Tooling;

public partial class Build
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Nuke.Common;
using Fallout.Common;

public partial class Build
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Collections.Generic;
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using Fallout.Common;
using Fallout.Common.IO;
using Fallout.Common.Tooling;
using Fallout.Common.Tools.DotNet;
using static Fallout.Common.Tools.DotNet.DotNetTasks;

public partial class Build
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Linq;
using Nuke.Common;
using Nuke.Common.Tools.DotNet;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using Fallout.Common;
using Fallout.Common.Tools.DotNet;
using static Fallout.Common.Tools.DotNet.DotNetTasks;

public partial class Build
{
Expand Down
35 changes: 15 additions & 20 deletions build-support/nuke-build/Build.cs → build-support/build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,25 @@
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using Nuke.Common;
using Nuke.Common.CI;
using Nuke.Common.CI.AppVeyor;
using Nuke.Common.CI.GitHubActions;
using Nuke.Common.Git;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.MSBuild;
using Nuke.Common.Utilities.Collections;
using Fallout.Common;
using Fallout.Common.CI;
using Fallout.Common.CI.AppVeyor;
using Fallout.Common.CI.GitHubActions;
using Fallout.Common.Git;
using Fallout.Common.IO;
using Fallout.Common.Tools.DotNet;
using Fallout.Common.Tools.MSBuild;
using Fallout.Common.Utilities.Collections;
using Fallout.Solutions;
using Serilog;

using static Nuke.Common.Tooling.ProcessTasks;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.Tools.MSBuild.MSBuildTasks;
using static Fallout.Common.Tooling.ProcessTasks;
using static Fallout.Common.Tools.DotNet.DotNetTasks;
using static Fallout.Common.Tools.MSBuild.MSBuildTasks;

[ShutdownDotNetAfterServerBuild]
partial class Build : NukeBuild
partial class Build : FalloutBuild
{
/// Support plugins are available for:
/// - JetBrains ReSharper https://nuke.build/resharper
/// - JetBrains Rider https://nuke.build/rider
/// - Microsoft VisualStudio https://nuke.build/visualstudio
/// - Microsoft VSCode https://nuke.build/vscode
public static int Main() => Execute<Build>(x => x.Compile);

[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
Expand All @@ -47,7 +42,7 @@ partial class Build : NukeBuild
AbsolutePath ExamplesDirectory => RootDirectory / "examples";
AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts";

string TagVersion => GitRepository.Tags.SingleOrDefault(x => x.StartsWith("v"))?[1..];
string TagVersion => GitRepository?.Tags.SingleOrDefault(x => x.StartsWith("v"))?[1..];

bool IsTaggedBuild => !string.IsNullOrWhiteSpace(TagVersion);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.ComponentModel;
using Nuke.Common.Tooling;
using Fallout.Common.Tooling;

[TypeConverter(typeof(TypeConverter<Configuration>))]
public class Configuration : Enumeration
Expand Down
16 changes: 16 additions & 0 deletions build-support/build/_build.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169</NoWarn>
<FalloutRootDirectory>..\..</FalloutRootDirectory>
<FalloutScriptDirectory>..\..</FalloutScriptDirectory>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Fallout.Common" />
</ItemGroup>

</Project>
18 changes: 0 additions & 18 deletions build-support/nuke-build/_build.csproj

This file was deleted.

28 changes: 10 additions & 18 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
# CONFIGURATION
###########################################################################

$BuildProjectFile = "$PSScriptRoot\build-support\nuke-build\_build.csproj"
$TempDirectory = "$PSScriptRoot\\.nuke\temp"
$TempDirectory = Join-Path $PSScriptRoot '.fallout/temp'

$DotNetGlobalFile = "$PSScriptRoot\\global.json"
$DotNetGlobalFile = Join-Path $PSScriptRoot 'global.json'
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
$DotNetChannel = "STS"

$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
$env:DOTNET_NOLOGO = 1
$env:DOTNET_ROLL_FORWARD = "Major"

###########################################################################
# EXECUTION
Expand All @@ -32,43 +32,35 @@ function ExecSafe([scriptblock] $cmd) {
if ($LASTEXITCODE) { exit $LASTEXITCODE }
}

# If dotnet CLI is installed globally and it matches requested version, use for execution
# If dotnet CLI is installed globally, use it; otherwise provision a local copy under .fallout\temp.
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
$(dotnet --version) -and $LASTEXITCODE -eq 0) {
$(dotnet --version) -and $LASTEXITCODE -eq 0) {
$env:DOTNET_EXE = (Get-Command "dotnet").Path
}
else {
# Download install script
$DotNetInstallFile = "$TempDirectory\dotnet-install.ps1"
$DotNetInstallFile = Join-Path $TempDirectory 'dotnet-install.ps1'
New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile)

# If global.json exists, load expected version
if (Test-Path $DotNetGlobalFile) {
$DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
$DotNetVersion = $DotNetGlobal.sdk.version
}
}

# Install by channel or version
$DotNetDirectory = "$TempDirectory\dotnet-win"
$DotNetDirectory = Join-Path $TempDirectory 'dotnet-win'
if (!(Test-Path variable:DotNetVersion)) {
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
} else {
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
}
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
$env:DOTNET_EXE = Join-Path $DotNetDirectory 'dotnet.exe'
$env:PATH = "$DotNetDirectory;$env:PATH"
}

Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)"

if (Test-Path env:NUKE_ENTERPRISE_TOKEN) {
& $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null
& $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null
}

ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }
ExecSafe { & $env:DOTNET_EXE tool restore }
ExecSafe { & $env:DOTNET_EXE fallout $BuildArguments }
Loading