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

15185 Коммитов

Автор SHA1 Сообщение Дата
Dustin Campbell 5072db43b5 Clean up pooled objects in CodeRenderingContext 2024-08-19 15:37:40 -07:00
Dustin Campbell 90f90ef875 Switch RazorCSharpDocument.Diagnostics to an ImmutableArray 2024-08-19 15:37:40 -07:00
Dustin Campbell ff63a4e603 Use pooled ImmutableArray builder for CodeRenderingContext diagnostics 2024-08-19 15:37:39 -07:00
Dustin Campbell c755804389 Swap RazorCSharpDocument.Create methods for constructors 2024-08-19 15:37:39 -07:00
Dustin Campbell 89204d4acf Clean up callers of RazorCSharpDocument.Create(...) 2024-08-19 15:37:39 -07:00
Dustin Campbell d00b1ffab8 Switch CodeRenderingContext.LinePragmas to an ImmutableArray 2024-08-19 15:37:39 -07:00
Dustin Campbell 25acc07be2 Merge RazorCSharpDocument and DefaultRazorCSharpDocument 2024-08-19 15:37:38 -07:00
Dustin Campbell 7ba41799a5 Pool ancestor stack in CodeRenderingContext 2024-08-19 15:37:38 -07:00
Dustin Campbell 635695fefb Pool line pragmas in CodeRenderingContext 2024-08-19 15:37:38 -07:00
Dustin Campbell 86e05ee42c Pool scope stack in CodeRenderingContext 2024-08-19 15:37:38 -07:00
Dustin Campbell 0e1774a4ee Clean up CodeRenderingContext a bit 2024-08-19 15:37:38 -07:00
Dustin Campbell 80d1ed36ee Merge CodeRenderingContext and DefaultCodeRenderingContext 2024-08-19 15:37:38 -07:00
David Wengier da79940a3a
Don't add already known documents to the misc files project (#10753)
Noticed in the logs that we were double-compiling files, and it was
causing issues in my "self versioned documents" branch. Separated out of
that to make it easier to review.

RCA is because we now share a project manager across VS and LSP server,
so we get real project information much sooner than before, which beats
file watchers etc.
2024-08-19 09:53:10 +10:00
David Wengier f1c3a700f3 PR feedback 2024-08-19 08:49:20 +10:00
David Wengier bc0b702171
Cohosting endpoints that don't call Roslyn, nor have any Razor logic (#10740)
Fixes https://github.com/dotnet/razor/issues/10694 plus some other ones
I snuck in there.

This is my therapy because of how annoying Roslyn is to do diagnostics 😛
2024-08-16 15:05:45 +10:00
David Wengier e34dc5482e Don't add already known documents to the misc files project 2024-08-16 14:03:36 +10:00
Dustin Campbell 2612be82ca
Introduce/expand several extension methods for ImmutableArray<T>, IReadOnlyList<T>, and IEnumerable<T> (#10726)
This pull request is completely within shared code, but none of it is
exercised by anything but tests. I've extracted them from another branch
containing a much larger compiler change to avoid muddying that change.
2024-08-15 11:57:13 -07:00
Jan Jones db5a78f968
Fix parser debug helpers (#10741)
* Fix parser debug display

* Remove unused method

* Mark property private
2024-08-15 16:53:50 +00:00
David Wengier ac4b407d2d Add cohost endpoints for the things that don't call Roslyn at all 2024-08-15 18:16:20 +10:00
David Wengier 16164684c7 Remove shared service since there is no sharing happening 2024-08-15 18:16:07 +10:00
David Wengier 0fc71bec98 Cleanup 2024-08-15 18:15:12 +10:00
dotnet bot 29658c14e9
Merge release/dev17.12 to main (#10734)
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-08-13 21:58:28 -07:00
David Wengier ee177e59a3 Merge remote-tracking branch 'upstream/release/dev17.12' into merges/release/dev17.12-to-main
# Conflicts:
#	src/Razor/test/Microsoft.VisualStudio.Razor.IntegrationTests/Microsoft.VisualStudio.Razor.IntegrationTests.csproj
2024-08-14 14:31:01 +10:00
Dustin Campbell 7508c52c91 A bit of clean up 2024-08-13 16:12:22 -07:00
Dustin Campbell 0e33edc196 Remove unnecessary type alias 2024-08-13 16:03:07 -07:00
Dustin Campbell 795149fef1 Use Unsafe() extensions to implement ToImmutableOrdered* extensions 2024-08-13 16:00:32 -07:00
Dustin Campbell bdcd5cdf77 Add immutable array builder DrainToImmutableOrdered variant extensions 2024-08-13 15:46:30 -07:00
Dustin Campbell 761e2c6f14 Remove invalid comment 2024-08-13 15:26:18 -07:00
Dustin Campbell 17cbe2e7ee Use stable sort for the OrderAsArray extensions
Because the sort performed by Enumerable.Order(...) and Enumerable.OrderBy(...) is stable, we need to do the same in the OrderAsArray* extension methods. This requires a pretty substantial change to compare indices in addition to values.
2024-08-13 15:23:40 -07:00
dotnet bot 77e74bd705
Merge release/dev17.12 to main (#10732)
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-08-13 14:26:43 -07:00
dotnet bot 595485210b
Merge release/dev17.11 to release/dev17.12 (#10731)
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-08-13 14:16:21 -07:00
David Wengier a01016a112
Cohosting Rename (#10721)
Part of https://github.com/dotnet/razor/issues/9519
Fixes https://github.com/dotnet/razor/issues/10688

Tried not to go on too many side quests with this one, but I guess
review commit-at-a-time if you want to double check :)
2024-08-14 07:07:57 +10:00
Fredric Silberberg 80c19df1a2
Merge remote-tracking branch 'upstream/release/dev17.11' into merges/release/dev17.11-to-release/dev17.12
* upstream/release/dev17.11:
  Upgrade System.Security.Cryptography.Xml to avoid CG alerts.
  Update System.Formats.Asn1 to address CG alert.
  Manually reference Microsoft.IO.Redist 6.0.1 where needed to fix CG alerts.
  Upgrade testing analyzers to address CG alert.
  Update version of system.security.cryptography.xml in use in 17.10 (#10525)
2024-08-13 11:47:09 -07:00
dotnet bot 7542d94d3c
Merge release/dev17.11 to main (#10727)
This is an automatically generated pull request from release/dev17.11
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.11
- 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.11-to-main
git reset --hard upstream/main
git merge upstream/release/dev17.11
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.11-to-main --force
```
2024-08-13 10:29:08 -07:00
Jared Parsons 7db021d574 more 2024-08-13 10:02:02 -07:00
Jared Parsons 194ef8cf81 Fix CG issue with MS.IO.Redist 2024-08-13 09:38:25 -07:00
Dustin Campbell b64bf6c5f4 Simplify CompareHelper<T>
This change removes two bool state fields from CompareHelper<T> and simplifies its conditional logic.
2024-08-13 09:01:36 -07:00
Dustin Campbell 335c77534a Don't copy IEnumerable elements twice 2024-08-13 08:38:03 -07:00
David Wengier 2dca8f9f2f Merge remote-tracking branch 'upstream/release/dev17.11' into merges/release/dev17.11-to-main 2024-08-13 21:57:05 +10:00
dotnet bot ff768a661c
Merge release/dev17.10 to release/dev17.11 (#10711)
This is an automatically generated pull request from release/dev17.10
into release/dev17.11.


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.10
- https://github.com/dotnet/razor/find/release/dev17.11

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.10-to-release/dev17.11
git reset --hard upstream/release/dev17.11
git merge upstream/release/dev17.10
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.10-to-release/dev17.11 --force
```
2024-08-12 21:34:49 -07:00
Fredric Silberberg 82ddac1c6c
Merge remote-tracking branch 'upstream/release/dev17.10' into merges/release/dev17.10-to-release/dev17.11
* upstream/release/dev17.10:
  Upgrade System.Security.Cryptography.Xml to avoid CG alerts.
  Update System.Formats.Asn1 to address CG alert.
  Manually reference Microsoft.IO.Redist 6.0.1 where needed to fix CG alerts.
  Upgrade testing analyzers to address CG alert.
2024-08-12 15:05:38 -07:00
Dustin Campbell 2464e6eace Add ImmutableArray<T>.Builder ToImmutableOrdered extension methods 2024-08-12 15:03:48 -07:00
Dustin Campbell 4eb9cb76aa Add tests to call OrderByArray methods through IEnumerable and IReadOnlyList 2024-08-12 14:15:25 -07:00
Dustin Campbell 72be23494e Add IEnumerable<T> OrderAsArray extension methods 2024-08-12 14:06:14 -07:00
Dustin Campbell a3c13752ee Add IReadOnlyList<T> OrderAsArray extension methods 2024-08-12 12:25:45 -07:00
Dustin Campbell 4c0c2795de Un-nest ComparerHelper<T> and DescendingComparer<T> 2024-08-12 11:45:40 -07:00
Dustin Campbell 45e64fbcba Add ImmutableArray<T>.Unsafe() extension with in-place order methods 2024-08-12 11:40:44 -07:00
Dustin Campbell 027dd045a1 Add XML doc comments to ImmutableArray Order extensions 2024-08-12 10:52:39 -07:00
Dustin Campbell aedbb64730 Add CopyTo(Span<T>) extension methods to Utilities.Shared 2024-08-12 10:44:02 -07:00
Dustin Campbell 3920563359
Remove ItemCollection from TagHelperDescriptorProviderContext (#10720)
Every `TagHelperDescriptorProviderContext` creates an `ItemCollection`
to hold onto, at most, two objects: a `Compilation` and a target
`ISymbol`. This is enormously wasteful because an `ItemCollection`
internally creates a `ConcurrentDictionary<object, object>`. So, I've
changed `TagHelperDescriptorProviderContext` to just hold onto a
compilation and a target symbol and avoid the `ItemCollection`
altogether.

I recommend reviewing commit-by-commit.

Also, I bumped into a long standing compiler bug in
`EventHandlerTagHelperDescriptorProvider` that was recently filed by a
customer: https://github.com/dotnet/razor/issues/10497. I opted to stay
on target and not fix this issue, but I made it painfully obvious where
the fix would go. 😄
2024-08-12 07:49:40 -07:00