Граф коммитов

15814 Коммитов

Автор SHA1 Сообщение Дата
Dustin Campbell 9e66c0ccd5 Make rootNamespace non-nullable 2024-10-16 13:34:52 -07:00
Dustin Campbell 473b6d40fb Remove unused local 2024-10-16 12:29:21 -07:00
Dustin Campbell 3357d6cb62 Update parameter to ref readonly 2024-10-16 12:23:46 -07:00
Dustin Campbell 76d210c9c4 Update serialized JSON test files 2024-10-15 17:25:06 -07:00
Dustin Campbell e89fbfdaf8 Tweak version check in MessagePack
We should check the version before verifying the array header.
2024-10-15 17:17:27 -07:00
Dustin Campbell c3a7f90e60 Increment SerializationFormat version numbers 2024-10-15 17:08:29 -07:00
Dustin Campbell 7bf4ca7991 Use HostProject in RazorProjectService 2024-10-15 17:07:51 -07:00
Dustin Campbell 78b6175133 Remame RazorProjectInfo.ProjectKey to Key 2024-10-15 16:39:53 -07:00
Dustin Campbell 196ff158af Use HostProject within RazorProjectInfo 2024-10-15 16:33:49 -07:00
Dustin Campbell b6b95ac29e Add JSON and MessagePack serialization for HostProject 2024-10-15 16:01:09 -07:00
Dustin Campbell b1bfaadde7 Move HostProject to MS.ANC.Razor.ProjectEngineHost 2024-10-15 15:27:02 -07:00
Dustin Campbell 871dac6eac Clean up RazorProjectService.TestAccessor 2024-10-15 15:22:43 -07:00
Dustin Campbell 0b85574932 Remove DocumentSnapshotHandle 2024-10-15 15:22:42 -07:00
Dustin Campbell 67168aae32 Replace DocumentSnapshotHandle with HostDocument
It turns out that DocumentSnapshotHandle and HostDocument are essentially identical, so we can unify on HostDocument.
2024-10-15 15:22:27 -07:00
Dustin Campbell f123af04f8 Add JSON and MessagePack serialization for HostDocument 2024-10-15 14:06:23 -07:00
Dustin Campbell 82a6d1403f Move HostDocument to MS.ANC.Razor.ProjectEngineHost 2024-10-15 13:31:03 -07:00
Dustin Campbell 3218628c72 Remove HostDocumentComparer
HostDocument is a record and now it correctly implements equality
2024-10-15 13:28:05 -07:00
dotnet bot 8cbd8c3329
Merge release/dev17.12 to main (#11024)
This is an automatically generated pull request from release/dev17.12
into main.


Once all conflicts are resolved and all the tests pass, you are free to
merge the pull request. 🐯

## Troubleshooting conflicts

### Identify authors of changes which introduced merge conflicts
Scroll to the bottom, then for each file containing conflicts copy its
path into the following searches:
- https://github.com/dotnet/razor/find/release/dev17.12
- https://github.com/dotnet/razor/find/main

Usually the most recent change to a file between the two branches is
considered to have introduced the conflicts, but sometimes it will be
necessary to look for the conflicting lines and check the blame in each
branch. Generally the author whose change introduced the conflicts
should pull down this PR, fix the conflicts locally, then push up a
commit resolving the conflicts.

### Resolve merge conflicts using your local repo
Sometimes merge conflicts may be present on GitHub but merging locally
will work without conflicts. This is due to differences between the
merge algorithm used in local git versus the one used by GitHub.
``` bash
git fetch --all
git checkout -t upstream/merges/release/dev17.12-to-main
git reset --hard upstream/main
git merge upstream/release/dev17.12
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.12-to-main --force
```
2024-10-15 10:21:15 -07:00
David Wengier 63142a8c4c
[main] Update dependencies from dotnet/source-build-reference-packages (#10973)
This pull request updates the following dependencies

[marker]: <> (Begin:011df26a-fbd1-45b0-94b9-08db3601dcca)
## From https://github.com/dotnet/source-build-reference-packages
- **Subscription**: 011df26a-fbd1-45b0-94b9-08db3601dcca
- **Build**: 20241011.4
- **Date Produced**: October 11, 2024 11:32:45 PM UTC
- **Commit**: 76c417253f5b3890997a3ef4b0613c2eab73d156
- **Branch**: refs/heads/main

[DependencyUpdate]: <> (Begin)

- **Updates**:
-
**Microsoft.SourceBuild.Intermediate.source-build-reference-packages**:
[from 10.0.0-alpha.1.24507.1 to 10.0.0-alpha.1.24511.4][3]

[3]:
fd609e3b42...76c417253f

[DependencyUpdate]: <> (End)


[marker]: <> (End:011df26a-fbd1-45b0-94b9-08db3601dcca)
2024-10-15 22:37:39 +11:00
dotnet bot 72dcb91ff5
Merge release/dev17.11 to release/dev17.12 (#11013)
This is an automatically generated pull request from release/dev17.11
into release/dev17.12.


Once all conflicts are resolved and all the tests pass, you are free to
merge the pull request. 🐯

## Troubleshooting conflicts

### Identify authors of changes which introduced merge conflicts
Scroll to the bottom, then for each file containing conflicts copy its
path into the following searches:
- https://github.com/dotnet/razor/find/release/dev17.11
- https://github.com/dotnet/razor/find/release/dev17.12

Usually the most recent change to a file between the two branches is
considered to have introduced the conflicts, but sometimes it will be
necessary to look for the conflicting lines and check the blame in each
branch. Generally the author whose change introduced the conflicts
should pull down this PR, fix the conflicts locally, then push up a
commit resolving the conflicts.

### Resolve merge conflicts using your local repo
Sometimes merge conflicts may be present on GitHub but merging locally
will work without conflicts. This is due to differences between the
merge algorithm used in local git versus the one used by GitHub.
``` bash
git fetch --all
git checkout -t upstream/merges/release/dev17.11-to-release/dev17.12
git reset --hard upstream/release/dev17.12
git merge upstream/release/dev17.11
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.11-to-release/dev17.12 --force
```
2024-10-15 04:15:23 -07:00
David Wengier 962df19d38
Merge branch 'main' into darc-main-cdae6d5a-7e36-461f-9b1e-b6d7ba86a287 2024-10-15 22:09:15 +11:00
dotnet bot 0dbc79d59b
Merge release/dev17.12 to main (#11014)
This is an automatically generated pull request from release/dev17.12
into main.


Once all conflicts are resolved and all the tests pass, you are free to
merge the pull request. 🐯

## Troubleshooting conflicts

### Identify authors of changes which introduced merge conflicts
Scroll to the bottom, then for each file containing conflicts copy its
path into the following searches:
- https://github.com/dotnet/razor/find/release/dev17.12
- https://github.com/dotnet/razor/find/main

Usually the most recent change to a file between the two branches is
considered to have introduced the conflicts, but sometimes it will be
necessary to look for the conflicting lines and check the blame in each
branch. Generally the author whose change introduced the conflicts
should pull down this PR, fix the conflicts locally, then push up a
commit resolving the conflicts.

### Resolve merge conflicts using your local repo
Sometimes merge conflicts may be present on GitHub but merging locally
will work without conflicts. This is due to differences between the
merge algorithm used in local git versus the one used by GitHub.
``` bash
git fetch --all
git checkout -t upstream/merges/release/dev17.12-to-main
git reset --hard upstream/main
git merge upstream/release/dev17.12
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.12-to-main --force
```
2024-10-15 03:42:35 -07:00
David Wengier 435b52a45f Merge remote-tracking branch 'upstream/release/dev17.12' into merges/release/dev17.12-to-main
# Conflicts:
#	eng/Versions.props
2024-10-15 21:18:55 +11:00
David Wengier 9471d2dca7 Merge remote-tracking branch 'upstream/release/dev17.11' into merges/release/dev17.11-to-release/dev17.12
# Conflicts:
#	eng/Version.Details.xml
#	eng/Versions.props
#	global.json
2024-10-15 21:13:14 +11:00
Dustin Campbell 6cb1fca51a
IDocumentSnapshot finally gets ValueTasks and CancellationTokens (#11002)
This pull request builds on my last one
(https://github.com/dotnet/razor/pull/10995), continuing to make
improvements to `IDocumentSnapshot`. The key change is that all of the
`Task`-returning methods on `IDocumentSnapshot` now return `ValueTask`
and take `CancellationTokens`. I've touched a lot of code to thread
`CancellationTokens` everywhere, but it's mostly very mechanical.

There is almost certainly another pull request coming at some point
after this one. Next on my list is to tackle the dreaded
`ComputedStateTracker`. I've long suspected that most the complexity in
that class can just be deleted, and I intend to dig into that soon.
2024-10-14 16:37:54 -07:00
dotnet-maestro[bot] cd497e45d4 Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20241011.4
Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 10.0.0-alpha.1.24507.1 -> To Version 10.0.0-alpha.1.24511.4
2024-10-14 12:40:40 +00:00
Jan Jones 8c4254387d
Remove source-only package (#11006) 2024-10-14 11:22:18 +02:00
Jan Jones faba442747
Fix potentially ambiguous System.Object in _Imports.razor (#10999)
* Add a test

* Fix potentially ambiguous System.Object in _Imports.razor

* Update baselines
2024-10-14 09:56:24 +02:00
Jan Jones ecb4434870
Avoid referencing a test assembly in compilation (#11005)
Related to https://github.com/dotnet/razor/issues/10343.
2024-10-14 09:55:56 +02:00
Ankita Khera 80cd097bd0
[main] Update dependencies from dotnet/arcade (#11009)
This pull request updates the following dependencies

[marker]: <> (Begin:2907dbca-fa2e-42bc-f7dd-08dc0c5b4e6d)
## From https://github.com/dotnet/arcade
- **Subscription**: 2907dbca-fa2e-42bc-f7dd-08dc0c5b4e6d
- **Build**: 20241009.3
- **Date Produced**: October 9, 2024 10:05:57 PM UTC
- **Commit**: 05c72bb3c9b38138276a8029017f2ef905dcc7fa
- **Branch**: refs/heads/release/9.0

[DependencyUpdate]: <> (Begin)

- **Updates**:
- **Microsoft.SourceBuild.Intermediate.arcade**: [from
9.0.0-beta.24466.2 to 9.0.0-beta.24509.3][1]
- **Microsoft.DotNet.Arcade.Sdk**: [from 9.0.0-beta.24466.2 to
9.0.0-beta.24509.3][1]

[1]: 04b9022eba...05c72bb3c9

[DependencyUpdate]: <> (End)

- **Updates to .NET SDKs:**
  - Updates sdk.version to 9.0.100-rc.2.24474.11
  - Updates tools.dotnet to 9.0.100-rc.2.24474.11

[marker]: <> (End:2907dbca-fa2e-42bc-f7dd-08dc0c5b4e6d)
2024-10-11 15:40:49 -07:00
Ankita Khera cbd9730b71
[release/dev17.12] Update dependencies from dotnet/arcade (#11001)
This pull request updates the following dependencies

[marker]: <> (Begin:761d0bec-2526-451d-fdf9-08dcc6cdae74)
## From https://github.com/dotnet/arcade
- **Subscription**: 761d0bec-2526-451d-fdf9-08dcc6cdae74
- **Build**: 20241009.3
- **Date Produced**: October 9, 2024 10:05:57 PM UTC
- **Commit**: 05c72bb3c9b38138276a8029017f2ef905dcc7fa
- **Branch**: refs/heads/release/9.0

[DependencyUpdate]: <> (Begin)

- **Updates**:
- **Microsoft.SourceBuild.Intermediate.arcade**: [from
9.0.0-beta.24466.2 to 9.0.0-beta.24509.3][1]
- **Microsoft.DotNet.Arcade.Sdk**: [from 9.0.0-beta.24466.2 to
9.0.0-beta.24509.3][1]

[1]: 04b9022eba...05c72bb3c9

[DependencyUpdate]: <> (End)

- **Updates to .NET SDKs:**
  - Updates sdk.version to 9.0.100-rc.2.24474.11
  - Updates tools.dotnet to 9.0.100-rc.2.24474.11

[marker]: <> (End:761d0bec-2526-451d-fdf9-08dcc6cdae74)
2024-10-11 14:56:39 -07:00
dotnet-maestro[bot] bd901052a1 Update dependencies from https://github.com/dotnet/arcade build 20241009.3
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 9.0.0-beta.24466.2 -> To Version 9.0.0-beta.24509.3
2024-10-11 21:53:48 +00:00
Dustin Campbell ae867ab3e5 Now that GetTextAsync is cancellable, remove throw on cancel requested 2024-10-11 14:29:47 -07:00
Dustin Campbell 8020768864 Move and rename GetCSharpSyntaxTree extension method
This moves GetCSharpSyntaxTree from RazorCodeDocumentExtensions to be a static method on DocumentSnapshot. This should help keep it from being called in co-hosting scenarios.
2024-10-11 14:26:26 -07:00
Ankita Khera 5d7617757a
[release/dev17.11] Update dependencies from dotnet/arcade (#10928)
This pull request updates the following dependencies

[marker]: <> (Begin:aa7f5ce7-ed24-46a1-195c-08dc952fc8a2)
## From https://github.com/dotnet/arcade
- **Subscription**: aa7f5ce7-ed24-46a1-195c-08dc952fc8a2
- **Build**: 20241008.1
- **Date Produced**: October 8, 2024 6:38:56 PM UTC
- **Commit**: e5b13e054339e41d422212a0ecaf24fec20cb5a1
- **Branch**: refs/heads/release/8.0

[DependencyUpdate]: <> (Begin)

- **Updates**:
- **Microsoft.SourceBuild.Intermediate.arcade**: [from
8.0.0-beta.24504.2 to 8.0.0-beta.24508.1][3]
- **Microsoft.DotNet.Arcade.Sdk**: [from 8.0.0-beta.24504.2 to
8.0.0-beta.24508.1][3]

[3]: 103916ccdb...e5b13e0543

[DependencyUpdate]: <> (End)

- **Updates to .NET SDKs:**
  - Updates sdk.version to 8.0.110
  - Updates tools.dotnet to 8.0.110

[marker]: <> (End:aa7f5ce7-ed24-46a1-195c-08dc952fc8a2)
2024-10-11 14:04:34 -07:00
Andrew Hall 7ec108eb94
Fix nullability to match specification (#11003)
Using SumType doesn't directly allow CLaSP to correctly do a null check via is null. This fixes it so that places that allow null use Nullable<T> or specificy that the non-value type can be null. Fixes devdiv.visualstudio.com/DevDiv/_workitems/edit/2136054
2024-10-11 19:57:26 +00:00
David Wengier 8007969d15
Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2557880 (#10997) 2024-10-11 15:55:54 +11:00
Dustin Campbell e2abf82a99 Pass CancellationToken to GetGeneratedOutputAsync
This commit is ginormous because I needed to thread cancellation tokens around everywhere.
2024-10-10 17:21:48 -07:00
Dustin Campbell 85d588c537 Switch IDocumentSnapshot.GetGenerateOutputAsync to ValueTask 2024-10-10 17:21:48 -07:00
Dustin Campbell 6dcfda5b73 Switch GetCSharpSyntaxTreeAsync to ValueTask and cache its result 2024-10-10 17:21:48 -07:00
Dustin Campbell b537b48872 Fix up some unit tests 2024-10-10 17:21:47 -07:00
Dustin Campbell 5adac610b5 Pass a CancellationToken to GetTextAsync and GetTextVersionAsync 2024-10-10 17:21:47 -07:00
Dustin Campbell 0cca69b3b6 Switch IDocumentSnapshot.GetTextAsync to ValueTask 2024-10-10 17:21:47 -07:00
Dustin Campbell 0fe0b44954 Switch IDocumentSnapshot.GetTextVersionAsync to ValueTask 2024-10-10 17:21:46 -07:00
Dustin Campbell 6c4bfda1bc Use TextLoader and TextAndVersion in DocumentState 2024-10-10 17:21:46 -07:00
Dustin Campbell dca70b6f8d
Clean up DocumentSnapshot and ProjectSnapshot (#10995)
This is some code I had locally and decided it would be good to check
in. There should be no observable change. This essentially removes some
unneeded bits, hides internal state, tights assumptions, simplifies
code, and cleans up test infrastructure. The commit history should be
explanatory.
2024-10-10 17:20:04 -07:00
dotnet bot 105cb1bfc5 Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2557678 2024-10-10 15:03:09 -07:00
Fred Silberberg 4c78255fb7
Unpin Roslyn Versions (#10994)
* Unpin Roslyn Versions

Now that we have the analyzer work done in VS, we should be able to unpin the versions of the roslyn compiler that we depend on in razor.

* Remove VersionOverrides
2024-10-10 14:45:20 -07:00
Dustin Campbell 078ea0fc21 Apply code review feedback to ImportDocumentSnapshot 2024-10-10 12:43:42 -07:00
dotnet-maestro[bot] 6cc3fd7569 Update dependencies from https://github.com/dotnet/arcade build 20241009.3
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 9.0.0-beta.24466.2 -> To Version 9.0.0-beta.24509.3
2024-10-10 17:42:47 +00:00