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
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"jetbrains.resharper.globaltools": {
"version": "2026.2.4.1",
"version": "2026.3.0",
"commands": [
"jb"
],
Expand Down
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
tests/MinimalLambda.SourceGenerators.UnitTests/Snapshots/*.verified.cs whitespace=-trailing-space

# Verify snapshots must keep LF line endings on Windows checkouts.
*.verified.* text eol=lf working-tree-encoding=UTF-8
18 changes: 15 additions & 3 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
name: build / build
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 25

steps:
- uses: actions/checkout@v7
Expand All @@ -45,8 +45,8 @@ jobs:
- name: Build
run: dotnet build MinimalLambda.sln --no-restore --configuration Release /p:TreatWarningsAsErrors=true

- name: Validate AOT compatibility
run: task build:aot-check
- name: Validate stable and preview packages
run: bash scripts/dry-run-release-manifests.sh

- name: Run coverage
timeout-minutes: 10
Expand All @@ -56,6 +56,18 @@ jobs:
--coverage-output-format cobertura --no-progress --no-ansi
--max-parallel-test-modules 1 -p:TestTfmsInParallel=false

- name: Validate packed consumers
run: task build:package-compat

- name: Test Runtime Async on .NET 11
run: >-
dotnet test MinimalLambda.sln --configuration Release
-p:MinimalLambdaRuntimeAsync=true --no-progress --no-ansi
--max-parallel-test-modules 1 -p:TestTfmsInParallel=false

- name: Validate AOT compatibility
run: task build:aot-check

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v7
with:
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/publish-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,31 @@ jobs:
permissions:
contents: write
pull-requests: write
uses: LayeredCraft/devops-templates/.github/workflows/publish-preview.yml@v11.2
uses: LayeredCraft/devops-templates/.github/workflows/publish-preview.yml@7aeca949aec9dd3c7cf4802b8b8497dc1832e16f # retain symbol artifacts
with:
solution: MinimalLambda.sln
dotnetVersion: 11.0.x
prereleaseIdentifier: preview
hasTests: false
buildConfiguration: Release

push:
validate-artifacts:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v4
with:
name: nuget-packages
path: release-artifacts
- name: Validate downloaded packages and symbols
env:
PREVIEW_RUN_NUMBER: ${{ github.run_number }}
run: python3 scripts/validate-release-artifacts.py --lane core-preview --preview-run-number "$PREVIEW_RUN_NUMBER" --artifacts release-artifacts

push:
needs: validate-artifacts
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,30 @@ jobs:
build:
permissions:
contents: write
uses: LayeredCraft/devops-templates/.github/workflows/publish-release.yml@v11.2
uses: LayeredCraft/devops-templates/.github/workflows/publish-release.yml@7aeca949aec9dd3c7cf4802b8b8497dc1832e16f # retain symbol artifacts
with:
solution: MinimalLambda.sln
dotnetVersion: 11.0.x
hasTests: false
buildConfiguration: Release

push:
validate-artifacts:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v4
with:
name: nuget-packages
path: release-artifacts
- name: Validate downloaded packages and symbols
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: python3 scripts/validate-release-artifacts.py --lane core --tag "$RELEASE_TAG" --artifacts release-artifacts

push:
needs: validate-artifacts
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,7 @@ nunit-*.xml
*.db
.beads-credential-key
__pycache__/

# Machine-specific mise overrides
mise.local.toml
mise.local.lock
85 changes: 64 additions & 21 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,35 +48,74 @@ respectful and constructive in all interactions.

## Development Setup

### Prerequisites
### Setup with mise

- **.NET SDK 10.0+**
- **Node.js** (for commitlint & husky - local commit validation)
- **Task** (optional, for running automated tasks) - see [Taskfile.yml](/Taskfile.yml)
- **Git** with configured `user.name` and `user.email`
Use mise to set up a local developer workstation or an AI agent's remote development environment.
It installs the project tools and restores development dependencies from one configuration.

### Building the Project
Install [mise](https://mise.jdx.dev/getting-started.html), version 2026.11.8 or later, and Git.
Configure Git's `user.name` and `user.email`, then run from the repository root:

```bash
# Install Node dependencies (commitlint & husky for commit validation)
npm install
mise trust
mise install
mise run setup
```

# Set up git commit hooks (commit-msg validation)
task local:setup-git-hooks
Review `mise.toml` before trusting it. The configuration installs the build SDK from `global.json`,
.NET 8/9/10 SDKs for the test runtimes, Node.js, Python, uv, and Task. SDKs share one .NET root so
all test frameworks are available to the .NET 11 host. Tool installation runs sequentially to
avoid concurrent SDK installers writing the same files. Resolved tool versions are recorded in
`mise.lock` for Linux and macOS on x64/arm64, and Windows on x64.

# Restore dependencies
dotnet restore
The setup task installs Node dependencies and Husky commit hooks with `npm ci`, restores NuGet
packages and local .NET tools, and restores documentation dependencies from `uv.lock` using the
mise-selected Python. `UV_PYTHON` keeps uv on that interpreter even if an existing environment
uses another Python version. Run setup again after dependency changes.

# Build the solution
dotnet build
For remote agents and other non-interactive shells, use `mise exec --` for development commands
without shell activation. CI continues to use the existing GitHub Actions and LayeredCraft DevOps
workflows.

# Run tests
dotnet test
Existing Taskfiles remain the build, test, and formatting commands:

# Clean packages (if needed)
dotnet clean
```bash
mise exec -- dotnet build --configuration Release
mise exec -- task test:all
mise exec -- task format
mise exec -- task local:docs:build
```

[Activate mise in your shell](https://mise.jdx.dev/shell-setup.html) to use these commands
without the `mise exec --` prefix. Native AOT publishing still requires the platform's C/C++ build
tools, such as Xcode Command Line Tools on macOS or the compiler/linker prerequisites on Linux.

To refresh locked tool versions after reviewing available updates:

```bash
mise lock --bump --platform linux-x64,linux-arm64,macos-x64,macos-arm64,windows-x64
```

Keep the build SDK version in `global.json`; `mise.toml` reads it directly. Commit `mise.lock`
with tool changes. Put machine-specific overrides in the ignored `mise.local.toml`.

### Manual setup

Without mise, install the stable .NET 11 SDK, .NET 8/9/10 SDKs or their required runtimes, Node.js 24,
Python 3.13, uv, Task, and Git. Then run:

```bash
npm ci
dotnet restore MinimalLambda.sln
dotnet tool restore
uv sync --frozen --python python
dotnet build --configuration Release
task test:all
```

The SDK includes both .NET and ASP.NET Core runtimes. When installing only runtimes, install both
families for the older target frameworks. Exact SDK and tool versions are listed in `mise.lock`.

## Code Formatting

Code formatting is automated using **CleanupCode** and **CSharpier**, ensuring consistent style
Expand Down Expand Up @@ -349,13 +388,17 @@ This project supports multiple .NET versions:

- **.NET 8.0** (supported)
- **.NET 9.0** (supported)
- **.NET 10.0 ** (primary target)
- **.NET 10.0** (supported)
- **.NET 11.0** (primary target)

Build the repository with the stable .NET 11 SDK, version 11.0.100 or later, and C# 15.
`task build:aot-check` validates Native AOT publishing on .NET 10 and .NET 11.

Test your changes against all supported frameworks:

```bash
dotnet build -f net8.0
dotnet build -f net9.0
dotnet build --configuration Release
task test:all
```

## Central Package Management
Expand Down
7 changes: 3 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net11.0' And '$(MinimalLambdaRuntimeAsync)' == 'true'">
<Features>$(Features);runtime-async=on</Features>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -34,8 +37,4 @@
<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net11.0'">
<!-- NU5104: preview TFM intentionally pulls preview dependencies -->
<NoWarn>$(NoWarn);NU5104</NoWarn>
</PropertyGroup>
</Project>
8 changes: 4 additions & 4 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>
<PropertyGroup Condition="$(TargetFrameworks.Contains('net11.0'))">
<!-- NU5104: net11.0 dependencies are prerelease while .NET 11 is in preview. -->
<NoWarn>$(NoWarn);NU5104</NoWarn>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net11.0'">
<!-- Feature switches must invalidate incremental compilation when Runtime Async changes. -->
<CoreCompileCache Include="$(Features)" />
</ItemGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<!-- Shared build workflows run plain dotnet build; package creation happens in publish workflows with dotnet pack. -->
Expand Down
Loading
Loading