Skip to content

Commit 5b27da4

Browse files
authored
Introduced Pure Resolvers and Resolver Inlining (#3638)
1 parent c59403c commit 5b27da4

File tree

374 files changed

+27401
-2751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

374 files changed

+27401
-2751
lines changed

.build/Build.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
AzurePipelinesImage.UbuntuLatest,
1313
InvokedTargets = new[] { nameof(Sonar) },
1414
PullRequestsAutoCancel = true,
15-
PullRequestsBranchesInclude = new [] { "master" },
16-
AutoGenerate = false)]
15+
PullRequestsBranchesInclude = new[] { "master" },
16+
AutoGenerate = false)]
1717
[GitHubActions(
1818
"sonar-pr-hotchocolate",
1919
GitHubActionsImage.UbuntuLatest,

.config/dotnet-tools.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
"commands": [
1414
"nuke"
1515
]
16+
},
17+
"boost.tool": {
18+
"version": "0.2.2",
19+
"commands": [
20+
"boo"
21+
]
1622
}
1723
}
1824
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,3 +311,4 @@ src/All.sln
311311

312312
# asp .net core
313313
appsettings.user.json
314+
conferences.db

API-Baselines.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# API Baselines
2+
3+
This document contains information regarding API baseline files and how to work with them.
4+
5+
## Files
6+
7+
Each project contains two files tracking the public API surface of this project.
8+
9+
### PublicAPI.Shipped.txt
10+
11+
This file contains APIs that were released in the last major version.
12+
13+
This file should only be modified after a major release by the maintainers and should never be modified otherwise. There is a [script](#scripts) to perform this automatically.
14+
15+
### PublicAPI.Unshipped.txt
16+
17+
This file contains API changes since the last major version.
18+
19+
## Scenarios
20+
21+
There are three types of public API changes that need to be documented.
22+
23+
### New APIs
24+
25+
A new entry needs to be added to the `PublicAPI.Unshipped.txt` file for a new API. For example:
26+
27+
```
28+
#nullable enable
29+
Microsoft.AspNetCore.Builder.NewApplicationBuilder.New() -> Microsoft.AspNetCore.Builder.IApplicationBuilder!
30+
```
31+
32+
Your IDE should warn you about this case and prompt you to add the new API to `PublicAPI.Unshipped.txt`. It will also be displayed as a warning in the build output.
33+
34+
> Note: Currently not every IDE supports Code-Fixes provided by a Roslyn Analyzer. Visual Studio Code for example does not at the moment - Visual Studio 2019 does.
35+
36+
### Removed APIs
37+
38+
A new entry needs to be added to the `PublicAPI.Unshipped.txt` file for a removed API. For example:
39+
40+
```
41+
#nullable enable
42+
*REMOVED*Microsoft.Builder.OldApplicationBuilder.New() -> Microsoft.AspNetCore.Builder.IApplicationBuilder!
43+
```
44+
45+
This change needs to be done by hand. Copy the relevant line from `PublicAPI.Shipped.txt` into `PublicAPI.Unshipped.txt` and place `*REMOVED*` in front of it.
46+
47+
### Updated APIs
48+
49+
Two new entries need to be added to the `PublicAPI.Unshipped.txt` file for an updated API. One to remove the old API and one for the new API. For example:
50+
51+
```
52+
#nullable enable
53+
*REMOVED*Microsoft.AspNetCore.DataProtection.Infrastructure.IApplicationDiscriminator.Discriminator.get -> string!
54+
Microsoft.AspNetCore.DataProtection.Infrastructure.IApplicationDiscriminator.Discriminator.get -> string?
55+
```
56+
57+
The removed case needs to be handled by hand as explained [here](#removed-apis).
58+
59+
## Ignoring projects
60+
61+
Projects ending in `.Tests` or `.Resources` are ignored per default.
62+
63+
If you need to manually ignore a project, include the following in its `.csproj` file:
64+
65+
```xml
66+
<PropertyGroup>
67+
<AddPublicApiAnalyzers>false</AddPublicApiAnalyzers>
68+
</PropertyGroup>
69+
```
70+
71+
## New projects
72+
73+
The two text files mentioned above need to be added to each new project.
74+
75+
There is a template file called `PublicAPI.empty.txt` in the `scripts` directory that can be copied over into a new project.
76+
77+
```sh
78+
cp scripts/PublicAPI.empty.txt src/<new-project-folder>/PublicAPI.Shipped.txt
79+
cp scripts/PublicAPI.empty.txt src/<new-project-folder>/PublicAPI.Unshipped.txt
80+
```
81+
82+
## Scripts
83+
84+
There are three scripts to help you manage the `PublicAPI.*.txt` files. They can be found [here](./scripts).
85+
86+
### mark-api-shipped.ps1
87+
88+
This transfers all changes in the `PublicAPI.Unshipped.txt` to the `PublicAPI.Shipped.txt` files.
89+
90+
It also takes care of removing lines marked with `*REMOVE*` (removals of APIs).
91+
92+
### display-unshipped-api.ps1
93+
94+
This will output the contents of all `PublicAPI.Unshipped.txt` files throughout the project.
95+
96+
### diff-shipped-api.ps1
97+
98+
This shows all changes of `PublicAPI.Shipped.txt` files between git refs. Tags, commit hashes and branch names are supported.
99+
100+
Example:
101+
102+
```sh
103+
diff-shipped-api.ps1 -from 11.0.0 -to 12.0.0
104+
```
File renamed without changes.

COMMUNITY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ Various libraries, packages, etc. that developers can add to their own project a
1818

1919
- [AutoGuru.HotChocolate.PolymorphicIds](https://github.com/autoguru-au/hotchocolate-polymorphic-ids) - Polymorphic Relay IDs for HotChocolate
2020

21+
## Types
22+
23+
- [HotChocolate.Types.NodaTime](https://github.com/shoooe/hotchocolate-nodatime) - Adds support for [NodaTime](https://github.com/nodatime/nodatime) types in Hot Chocolate.
24+
2125
### Validation
2226

2327
- [AppAny.HotChocolate.FluentValidation](https://github.com/appany/AppAny.HotChocolate.FluentValidation) - Input field HotChocolate + FluentValidation integration

CONTRIBUTING.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# How to contribute
2+
3+
One of the easiest ways to contribute is to participate in discussions on GitHub issues. You can also contribute by submitting pull requests with code changes.
4+
5+
## General feedback and discussions?
6+
7+
Start a discussion on the [repository issue tracker](https://github.com/ChilliCream/hotchocolate/issues) or [join us on slack](https://bit.ly/join-chillicream-slack).
8+
9+
## Bugs and feature requests?
10+
11+
Before reporting a new issue, try to find an existing issue if one already exists. If it already exists, upvote (👍) it. Also consider adding a comment with your unique scenarios and requirements related to that issue.
12+
13+
If you can't find one, you can file a new issue by choosing the appropriate template [here](https://github.com/ChilliCream/hotchocolate/issues/new/choose).
14+
15+
## How to submit a pull request
16+
17+
We are always happy to see pull requests from community members both for bug fixes as well as new features.
18+
19+
### Finding an issue to work on
20+
21+
We have marked issues which are good candidates for first-time contributors, in case you are not already set on working on a specific issue.
22+
23+
- ["Good first issue" issues](https://github.com/ChilliCream/hotchocolate/labels/%F0%9F%99%8B%20good%20first%20issue) - we think these are a great for newcomers.
24+
- ["Help wanted" issues](https://github.com/ChilliCream/hotchocolate/labels/%F0%9F%99%8B%20help%20wanted) - these issues are up for grabs.
25+
26+
### Before writing code
27+
28+
Before you spend time writing code, make sure of the following things:
29+
30+
- You have commented on the related issue to let others know you are working on it
31+
- You have laid out your solution on a high level and received approval from the maintainers, if you are tackling a bigger change
32+
33+
After this you can fork our repository to implement your changes. If you are unfamiliar with forking, be sure to read [this guide](https://guides.github.com/activities/forking/) first.
34+
35+
### Before submitting a pull request
36+
37+
Before submitting a pull request containing your changes, make sure that it checks the following requirements:
38+
39+
- You add test coverage following existing patterns within the codebase
40+
- Your code matches the existing syntax conventions within the codebase
41+
- You document any changes to the public API surface ([Learn more](./API-Baselines.md))
42+
- Your pull request is small, focused, and avoids making unrelated changes
43+
44+
If your pull request contains any of the below, it's less likely to be merged.
45+
46+
- Changes that break backward compatibility
47+
- Changes that are only wanted by one person/company
48+
- Changes that add entirely new feature areas without prior agreement
49+
- Changes that are mostly about refactoring existing code or code style
50+
51+
### Submitting a pull request
52+
53+
Follow [this guide](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) to submit your pull request. Be sure to mark it as draft if it is in an early stage.
54+
55+
### During pull request review
56+
57+
Core contributors will review your pull request and provide feedback.
58+
59+
## Code of conduct
60+
61+
See [CODE-OF-CONDUCT.md](./CODE-OF-CONDUCT.md)

CONTRIBUTION.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

scripts/PublicAPI.empty.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#nullable enable

scripts/diff-shipped-api.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[CmdletBinding(PositionalBinding=$false)]
2+
param (
3+
[string]$from,
4+
[string]$to = "main"
5+
)
6+
7+
Set-StrictMode -version 2.0
8+
$ErrorActionPreference = "Stop"
9+
10+
try {
11+
Write-Host "Diffing '$from' to '$to'..."
12+
13+
git --no-pager diff --minimal -U0 --word-diff "$from" "$to" -- "../src/**/PublicAPI.Shipped.txt"
14+
}
15+
catch {
16+
Write-Host $_
17+
Write-Host $_.Exception
18+
exit 1
19+
}

0 commit comments

Comments
 (0)