Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4c1036a
Import events a referenced package declares instead of leaving them d…
woksin Jul 28, 2026
2a23238
Leave source a build wrote out of where a slice is written
woksin Jul 28, 2026
fd22de8
Read a separator in a name as the word boundary it is
woksin Jul 28, 2026
be8440b
Mark personal data under the name the value is referenced by
woksin Jul 28, 2026
a3321ca
Read a commented out import as the import a component does not make
woksin Jul 28, 2026
e2f1f25
Leave what the host fills in out of what a query asks a caller for
woksin Jul 28, 2026
748dc37
Reserve SP0029 so nothing is ever declared with it
woksin Jul 28, 2026
f30c1b6
Compose a name before stripping what an identifier cannot hold
woksin Jul 28, 2026
da2b571
Specify that a value which may be absent stays that way in the document
woksin Jul 28, 2026
c5e1a57
Resolve the options of an emission in one place
woksin Jul 28, 2026
5d75a6c
Hold the document of a real application to the compiler in CI
woksin Jul 28, 2026
7b88843
Report source that did not compile for what survived it
woksin Jul 28, 2026
7a3d893
Read the document back when what was recovered still stands
woksin Jul 28, 2026
2a7edb4
Say what a compilation the generator is handed has to hold
woksin Jul 28, 2026
2b052e5
Take a validation message from the constant a lambda names
woksin Jul 28, 2026
0c2f94d
Compare a property against another property the rule names
woksin Jul 28, 2026
dce68b5
Declare a concept a record carries however far down it is carried
woksin Jul 28, 2026
d3be9af
Report a query a screen reads through that another slice declares
woksin Jul 28, 2026
48354e8
Follow a component one hop into the view model beside it
woksin Jul 28, 2026
a8422af
Name the language issue four diagnostics wait on
woksin Jul 28, 2026
0569cb8
Separate collecting concepts from resolving a type
woksin Jul 28, 2026
d03f8b6
Resolve the root of one project apart from the paths built from it
woksin Jul 28, 2026
e3b2d19
Read a body through the project it was written in
woksin Jul 28, 2026
c7c77f7
Generate one document from the projects an application is written as
woksin Jul 28, 2026
003cebb
Specify what the projects of an application describe together
woksin Jul 28, 2026
641b4e9
Hold the document of a whole solution to the compiler in the harness
woksin Jul 28, 2026
2f5a704
Merge branch 'feat/screenplay-phase2' into feat/screenplay-multiproject
woksin Jul 28, 2026
b8e65b5
Say what a scenario a slice is specified by holds
woksin Jul 28, 2026
41e68a8
Recover the scenarios a slice is specified by from its own source
woksin Jul 28, 2026
9d3eceb
Write the scenarios a slice is specified by into the document
woksin Jul 28, 2026
8845b4c
Specify the scenarios a slice is specified by, end to end
woksin Jul 28, 2026
44a2c65
Merge feat/screenplay-multiproject into feat/screenplay-specifications
woksin Jul 29, 2026
649fdfe
Recover the key a validation message is looked up in a resource by
woksin Jul 29, 2026
efc5d42
Specify the messages an application takes from a resource
woksin Jul 29, 2026
6694fef
Say what the generator does now rather than what it did
woksin Jul 29, 2026
8dd39b1
Carry the shapes the end to end check exists to catch
woksin Jul 29, 2026
b8d927f
Pass over the identity a scenario makes rather than reporting it
woksin Jul 29, 2026
4fa4ed5
Read a solution as the projects that could hold part of the application
woksin Jul 29, 2026
b357138
Merge remote-tracking branch 'origin/feat/screenplay-strings' into fe…
woksin Jul 29, 2026
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
4 changes: 3 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ dotnet_diagnostic.IDE0055.severity = none
# prefere brace indentation when creating objects etc
csharp_indent_braces = false

[{**/*.Specs/**/*.cs,Integration/**/*.cs}]
# A specification is recognized by where it sits as well as by the project it is in, because a slice is specified
# beside the source it specifies - a `when_<behavior>` folder inside the application project, not a project of its own.
[{**/*.Specs/**/*.cs,Integration/**/*.cs,**/when_*/**.cs}]
dotnet_diagnostic.CA1001.severity = none
dotnet_diagnostic.CA1008.severity = none
dotnet_diagnostic.CA1024.severity = none
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/dotnet-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,68 @@ jobs:
- name: Test (${{ matrix.project }})
run: dotnet test ${{ matrix.project }} --no-build --configuration Release --framework net10.0

# Every Screenplay specification builds its compilation from source strings, which is what makes them hermetic -
# and what puts a whole class of defect out of their reach by construction. A compilation built that way has no
# intermediate folder, no source generator output on disk and no referenced package declaring an event, so a
# generator that mis-attributes one of those produces a wrong document that every specification still passes. Two
# shipped that way. This reads a real project through MSBuild and holds the document it generates to the compiler
# the language ships - it has to come back with nothing to say, warnings included.
screenplay-end-to-end:
needs: [dotnet-build]
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}

- name: Setup .Net
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
${{ env.DOTNET8_VERSION }}
${{ env.DOTNET9_VERSION }}
${{ env.DOTNET10_VERSION }}

- name: Cache NuGet packages
uses: actions/cache@v6
with:
path: ~/.nuget/packages
key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', '**/Directory.*.props', '**/Directory.*.targets') }}
restore-keys: |
nuget-${{ runner.os }}-

- name: Download build output
uses: actions/download-artifact@v4
with:
name: build-output

- name: Extract build output
run: tar -xzf build-output.tar.gz

# The build output artifact carries bin folders only, and reading a project through MSBuild needs the assets
# file that restore writes to obj.
- name: Restore the applications to generate from
run: |
dotnet restore TestApps/AspNetCore/AspNetCore.csproj
dotnet restore TestApps/Chronicle/Chronicle.csproj

- name: Generate and read back the document of a real application
run: |
dotnet Source/DotNET/Screenplay.EndToEnd/bin/Release/net10.0/Cratis.Arc.Screenplay.EndToEnd.dll \
TestApps/AspNetCore/AspNetCore.csproj \
"${RUNNER_TEMP}/AspNetCore.play"

# Everything an event sourced application declares - events, the constants a projection sets and the scenarios
# a slice is specified by - lives in the Chronicle application, which is a second application rather than more
# of the first one, so its document is generated and read back on its own.
- name: Generate and read back the document of a real event sourced application
run: |
dotnet Source/DotNET/Screenplay.EndToEnd/bin/Release/net10.0/Cratis.Arc.Screenplay.EndToEnd.dll \
TestApps/Chronicle/Chronicle.csproj \
"${RUNNER_TEMP}/Chronicle.play"

proxy-specs:
needs: [dotnet-build]
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions Arc.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<Project Path="Source\DotNET\OpenApi\OpenApi.csproj" />
<Project Path="Source\DotNET\OpenApi.Specs\OpenApi.Specs.csproj" />
<Project Path="Source\DotNET\Screenplay\Screenplay.csproj" />
<Project Path="Source\DotNET\Screenplay.EndToEnd\Screenplay.EndToEnd.csproj" />
<Project Path="Source\DotNET\Screenplay.Specs\Screenplay.Specs.csproj" />
</Folder>
<Folder Name="/Source/DotNET/Tools/">
Expand Down
6 changes: 6 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.6.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing.XUnit" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.XUnit" Version="1.1.2" />
<!-- Reading a real project into a compilation, for the end to end check on Screenplay generation.
Microsoft.Build.Framework is declared above and is referenced with ExcludeAssets="runtime", so that MSBuild
itself always comes from the SDK that MSBuildLocator registers rather than from an output folder. -->
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="5.6.0" />
<PackageVersion Include="Microsoft.Build.Locator" Version="1.11.2" />
<PackageVersion Include="Microsoft.NET.StringTools" Version="18.8.2" />
<!-- Override vulnerable/incompatible transitive dependencies from analyzer testing packages -->
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="5.6.0" />
<PackageVersion Include="System.Formats.Asn1" Version="10.0.10" />
Expand Down
Loading
Loading