Skip to content

Commit a14a5db

Browse files
authored
Merge pull request #20 from EFNext/feat/runtime-abstractions
Add ExpressiveSharp.Abstractions package
2 parents cf65ff1 + 43d1d06 commit a14a5db

13 files changed

Lines changed: 48 additions & 21 deletions

CLAUDE.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,15 @@ CI targets both .NET 8.0 and .NET 10.0 SDKs.
6262
### Project Dependencies
6363

6464
```
65-
ExpressiveSharp (core runtime, net8.0;net10.0)
65+
ExpressiveSharp.Abstractions (attributes + source generator, net8.0;net10.0)
6666
└── no external deps
67+
Provides: [Expressive], [ExpressiveFor], [ExpressiveForConstructor], [PolyfillTarget],
68+
IExpressionTreeTransformer, source generator + code fixers (as analyzers)
69+
70+
ExpressiveSharp (core runtime, net8.0;net10.0)
71+
└── ExpressiveSharp.Abstractions
72+
Provides: ExpressiveResolver, ExpressiveReplacer, expression transformers,
73+
IRewritableQueryable<T>, ExpressionPolyfill, .ExpandExpressives(), .AsExpressive()
6774
6875
ExpressiveSharp.Generator (source generator, netstandard2.0)
6976
└── Microsoft.CodeAnalysis.CSharp 5.0.0

ExpressiveSharp.slnx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<Project Path="src/ExpressiveSharp.EntityFrameworkCore.RelationalExtensions.Abstractions/ExpressiveSharp.EntityFrameworkCore.RelationalExtensions.Abstractions.csproj" />
1414
<Project Path="src/ExpressiveSharp.EntityFrameworkCore.RelationalExtensions/ExpressiveSharp.EntityFrameworkCore.RelationalExtensions.csproj" />
1515
<Project Path="src/ExpressiveSharp.Generator/ExpressiveSharp.Generator.csproj" />
16+
<Project Path="src/ExpressiveSharp.Abstractions/ExpressiveSharp.Abstractions.csproj" />
1617
<Project Path="src/ExpressiveSharp/ExpressiveSharp.csproj" />
1718
</Folder>
1819
<Folder Name="/tests/">

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ WHERE "c"."Email" IS NOT NULL
7979

8080
```bash
8181
dotnet add package ExpressiveSharp
82+
# Lightweight alternative (attributes + source generator only, no runtime services):
83+
# dotnet add package ExpressiveSharp.Abstractions
8284
# Optional: EF Core integration
8385
dotnet add package ExpressiveSharp.EntityFrameworkCore
8486
```

docs/guide/introduction.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Mark computed properties and methods with `[Expressive]` to generate companion e
9292
| | .NET 8.0 | .NET 10.0 |
9393
|---|---|---|
9494
| **ExpressiveSharp** | C# 12 | C# 14 |
95+
| **ExpressiveSharp.Abstractions** | C# 12 | C# 14 |
9596
| **ExpressiveSharp.EntityFrameworkCore** | EF Core 8.x | EF Core 10.x |
9697
| **ExpressiveSharp.EntityFrameworkCore.RelationalExtensions** | EF Core 8.x | EF Core 10.x |
9798

docs/guide/quickstart.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ dotnet add package ExpressiveSharp.EntityFrameworkCore
2121

2222
| Package | Purpose |
2323
|---------|---------|
24-
| `ExpressiveSharp` | Core runtime -- `[Expressive]` attribute, source generator, expression expansion, transformers |
24+
| `ExpressiveSharp` | Core runtime -- expression expansion, transformers, `IRewritableQueryable<T>`, `ExpressionPolyfill` (includes everything from Abstractions) |
25+
| `ExpressiveSharp.Abstractions` | Lightweight -- `[Expressive]` attribute, `[ExpressiveFor]`, `IExpressionTreeTransformer`, source generator only (no runtime services) |
2526
| `ExpressiveSharp.EntityFrameworkCore` | EF Core integration -- `UseExpressives()`, `ExpressiveDbSet<T>`, Include/ThenInclude, async methods, analyzers and code fixes |
2627
| `ExpressiveSharp.EntityFrameworkCore.RelationalExtensions` | SQL window functions -- ROW_NUMBER, RANK, DENSE_RANK, NTILE (experimental) |
2728

docs/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ Computed properties are **inlined into SQL** — no client-side evaluation, no N
150150

151151
| Package | Description |
152152
|---------|-------------|
153-
| [`ExpressiveSharp`](https://www.nuget.org/packages/ExpressiveSharp/) | Core runtime — `[Expressive]` attribute, expression expansion, transformers |
153+
| [`ExpressiveSharp`](https://www.nuget.org/packages/ExpressiveSharp/) | Core runtime — expression expansion, transformers, `IRewritableQueryable<T>`, `ExpressionPolyfill` |
154+
| [`ExpressiveSharp.Abstractions`](https://www.nuget.org/packages/ExpressiveSharp.Abstractions/) | Lightweight — attributes (`[Expressive]`, `[ExpressiveFor]`), `IExpressionTreeTransformer`, source generator only |
154155
| [`ExpressiveSharp.EntityFrameworkCore`](https://www.nuget.org/packages/ExpressiveSharp.EntityFrameworkCore/) | EF Core integration — `UseExpressives()`, `ExpressiveDbSet<T>`, Include/ThenInclude, async methods |
155156
| [`ExpressiveSharp.EntityFrameworkCore.RelationalExtensions`](https://www.nuget.org/packages/ExpressiveSharp.EntityFrameworkCore.RelationalExtensions/) | SQL window functions — ROW_NUMBER, RANK, DENSE_RANK, NTILE (experimental) |
File renamed without changes.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<Description>Attributes, interfaces, and source generator for ExpressiveSharp — use this package when you only need compile-time expression tree generation without the full runtime</Description>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<ProjectReference Include="..\ExpressiveSharp.Generator\ExpressiveSharp.Generator.csproj"
9+
OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
10+
<ProjectReference Include="..\ExpressiveSharp.CodeFixers\ExpressiveSharp.CodeFixers.csproj"
11+
OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
12+
</ItemGroup>
13+
14+
<!-- Pack the source generator and code fixers into analyzers/dotnet/cs/ so NuGet consumers get them -->
15+
<ItemGroup>
16+
<None Include="..\ExpressiveSharp.Generator\bin\$(Configuration)\netstandard2.0\ExpressiveSharp.Generator.dll"
17+
Pack="true" PackagePath="analyzers/dotnet/cs/" Visible="false" />
18+
<None Include="..\ExpressiveSharp.CodeFixers\bin\$(Configuration)\netstandard2.0\ExpressiveSharp.CodeFixers.dll"
19+
Pack="true" PackagePath="analyzers/dotnet/cs/" Visible="false" />
20+
</ItemGroup>
21+
22+
<!-- Pack build props so consumers get interceptor namespace + compiler-visible properties -->
23+
<ItemGroup>
24+
<None Include="..\ExpressiveSharp.Generator\build\ExpressiveSharp.Generator.props"
25+
Pack="true" PackagePath="build/ExpressiveSharp.Abstractions.props" Visible="false" />
26+
<None Include="..\ExpressiveSharp.Generator\build\ExpressiveSharp.Generator.props"
27+
Pack="true" PackagePath="buildTransitive/ExpressiveSharp.Abstractions.props" Visible="false" />
28+
</ItemGroup>
29+
30+
</Project>

src/ExpressiveSharp/IExpressionTreeTransformer.cs renamed to src/ExpressiveSharp.Abstractions/IExpressionTreeTransformer.cs

File renamed without changes.

src/ExpressiveSharp/Mapping/ExpressiveForAttribute.cs renamed to src/ExpressiveSharp.Abstractions/Mapping/ExpressiveForAttribute.cs

File renamed without changes.

0 commit comments

Comments
 (0)