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

16322 Коммитов

Автор SHA1 Сообщение Дата
David Wengier a235a980ba
[main] Update dependencies from dotnet/source-build-reference-packages (#11265) 2024-12-03 12:03:59 +11:00
dotnet-maestro[bot] f21a466685 Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20241126.2
Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 10.0.0-alpha.1.24571.2 -> To Version 10.0.557602
2024-12-02 13:46:36 +00:00
David Wengier db3fecf853
Support FAR in cohosting (#11238)
Fixes https://github.com/dotnet/razor/issues/11237
Needs https://github.com/dotnet/roslyn/pull/76002 and a version bump

Very simple one, though I was a little cheeky. There is basically no
code that could be shared, except for code that removes `__o` and
`k_BackingField` from the results, but those methods operate on VS LSP
types. Given cohosting largely uses Roslyn LSP types, and will be
exclusively FUSE, and FUSE doesn't have `__o`, I just skipped that bit.
Confirmed in VS that having cohosting and FUSE on makes for nice looking
results with no generated code artifacts.

Side note: I don't think anything will ever have `k_BackingField` in the
results, but there is zero test coverage so who knows! 😁
2024-12-02 08:45:09 +11:00
David Wengier 5f32f2648d
Add a code action to promote a using directive (#11241)
Fixes https://github.com/dotnet/razor/issues/6155

Me: I really like the cohosting code action tests, it must be really
easy to add a new code action now!
Me: Oh really? Well, try it and find out, I dare you!!
Me: <this PR>

(Also me: That wasn't as much fun as I expected. I have thoughts.)
2024-11-28 14:37:24 +11:00
David Wengier 98503449cd Add test for indented usings 2024-11-28 12:57:02 +11:00
David Wengier 0f2d8eeac3 PR Feedback 2024-11-28 11:46:55 +11:00
Andrew Hall e4d1b9e72a
Fix extract component whitespace handling (#11262)
fixes #11261
2024-11-27 15:00:05 -08:00
David Wengier 973553f398 Nullability 2024-11-28 09:20:37 +11:00
Jan Jones 22063f297d
Update config data for 17.13P2 snap of VS (#11257) 2024-11-27 09:44:05 +01:00
David Wengier b1178a7dad Bump Roslyn and handle null location 2024-11-27 18:53:52 +11:00
dotnet bot 6db4477bba
Merge release/dev17.13 to main (#11259)
This is an automatically generated pull request from release/dev17.13
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.13
- 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.13-to-main
git reset --hard upstream/main
git merge upstream/release/dev17.13
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.13-to-main --force
```
2024-11-26 20:08:42 -08:00
dotnet bot 0c93d68c5f
Merge release/dev17.12 to release/dev17.13 (#11258)
This is an automatically generated pull request from release/dev17.12
into release/dev17.13.


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/release/dev17.13

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-release/dev17.13
git reset --hard upstream/release/dev17.13
git merge upstream/release/dev17.12
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.12-to-release/dev17.13 --force
```
2024-11-26 16:11:38 -08:00
David Wengier 39b22b62f8
Editor config tweaks (#11254)
Got sick of seeing messages about namespaces not matching folder names,
so thought I'd suppress it. Then Alex mentioned the formatting rule in
standup, and I thought tests deserve the same treatment.
2024-11-27 10:47:03 +11:00
Phil Allen b5256abf65
[17.12] Add back null check to allow merge editor to load (#11255)
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2302211

This change adds a null check to
ProjectCapabilityResolver.ContainingProjectHasCapability(...) that was
incorrectly removed by 6cd5bd4ba6. Without
this null check, it is impossible to open a merge editor for a razor or
cshtml file. The merge editor has a few editors within it, and some of
them are not included in a project, so they have a null IVsHIerarchy.
2024-11-26 09:56:12 -08:00
Dustin Campbell 285d0dd579 Add back null check to allow merge editor to load
This change adds a null check to ProjectCapabilityResolver.ContainingProjectHasCapability(...) that was incorrectly removed by 6cd5bd4ba6. Without this null check, it is impossible to open a merge editor for a razor or cshtml file. The merge editor has a few editors within it, and some of them are not included in a project, so they have a null IVsHIerarchy.
2024-11-25 15:31:48 -08:00
David Wengier b711851854 Tests should be well formatted too 2024-11-26 09:27:05 +11:00
David Wengier 37874809ac
[main] Update dependencies from dotnet/source-build-reference-packages (#11252) 2024-11-26 07:02:53 +11:00
dotnet bot 08fc08ccbc
Merge release/dev17.13 to main (#11253)
This is an automatically generated pull request from release/dev17.13
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.13
- 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.13-to-main
git reset --hard upstream/main
git merge upstream/release/dev17.13
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.13-to-main --force
```
2024-11-25 12:02:10 -08:00
Phil Allen b7557c0571
Snap 17.13P2 (#11251) 2024-11-25 07:10:08 -08:00
dotnet-maestro[bot] 87270dc7b8 Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20241121.2
Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 10.0.0-alpha.1.24561.2 -> To Version 10.0.0-alpha.1.24571.2
2024-11-25 13:58:26 +00:00
dotnet-maestro[bot] 8b4123ff11
[main] Update dependencies from dotnet/arcade (#11246)
* Update dependencies from https://github.com/dotnet/arcade build 20241122.2

Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 9.0.0-beta.24562.13 -> To Version 9.0.0-beta.24572.2

* Failed to perform coherency update for one or more dependencies.

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2024-11-25 12:38:42 +01:00
Jan Jones 9a20f41999
Update data for snap 17.13P2 (#11242) 2024-11-24 18:02:47 +01:00
David Wengier a5a55ea9e9 Add a code action to promote a using directive 2024-11-22 11:49:57 +11:00
Dustin Campbell eef0189b5f
Clean up JSON serialization and use it in compiler benchmarks (#11229)
The Razor compiler was carrying an old copy of
`TagHelperDescriptorJsonConverter`, though it was only used in
benchmarks. Since it doesn't make sense to have two JSON formats for tag
helpers, this change updates
Microsoft.AspNetCore.Razor.Serialization.JSON so that it can be
referenced by the compiler benchmarks and removes
`TagHelperDescriptorJsonConverter`. With this done, it will be easier to
slim down the `TagHelperDescriptor` API, which I'm planning to do to
speed tag helpers up a bit. (Although, that'll still require updates to
https://github.com/dotnet/sdk/tree/main/src/RazorSdk/Tool.)

I recommend reviewing commit-by-commit.
2024-11-21 15:55:41 -08:00
Dustin Campbell 6bbbf9f1d0 Update GenerateJsonFiles to skip test when ShouldGenerate = false 2024-11-21 15:25:17 -08:00
David Wengier 9af394faaf Forgot to turn off the old handler 🤦‍♂️ 2024-11-22 09:37:32 +11:00
Dustin Campbell aa25541c72
Update src/Shared/Microsoft.AspNetCore.Razor.Serialization.Json/ObjectReaders_ProjectSystem.cs
Co-authored-by: Fred Silberberg <fred@silberberg.xyz>
2024-11-21 10:30:45 -08:00
Alex Gavrilov fa5b57f1c7
Adding a setting to .editorconfig to enforce formatting (#11236)
* Adding a setting to .editorconfig to enforce formatting

* Minor change to ```from```  formatting

* Removing extra spaces and supressions in flags per CR suggestion
2024-11-21 10:24:16 +00:00
David Wengier e347343f19 Support FAR in cohosting 2024-11-21 17:39:36 +11:00
David Wengier 2916c403e6
Fire an ETW event when the background document generator queue is empty (#11233)
I was musing the other day about ETW events possibly being useful in
tracking down the Speedometer regression I was looking in to, and then
along comes https://github.com/dotnet/razor/issues/11232 which is a
great excuse to add some ETW event infrastructure to our lives.

The idea here is that RPS/Speedometer tests can wait for Razor to be
"ready" by looking for this event, rather than `Thread.Sleep`ing.
Anecdotally on my machine, when loading OrchardCore, this event fires
once a couple of minutes after solution load, so seems like a reasonable
candidate.

Once this is in @WardenGnaw will try it out and if it's not good, we'll
pop some more events somewhere.

Will need to follow up with PR(s?) to add this event source name to the
list, but I need to work out where to do that first :)
2024-11-21 13:34:22 +11:00
David Wengier 1b811b380c PR Feedback 2024-11-21 12:04:46 +11:00
David Wengier 4357c314b1 PR Feedback 2024-11-21 09:54:13 +11:00
Andrew Hall 2ce77ad9c9
Handle aliased usings in RazorEditHelper (#11208)
Normalize spacing etc around how using directives are categorized. Allows us to compare using aliases and static usings.
2024-11-20 14:01:45 -08:00
David Wengier 69388cdace Fire an ETW event when the background document generator queue is empty, after doing some work 2024-11-20 16:09:52 +11:00
Andrew Hall 7390745dcd
Allow logging level to be changed in rzls (#11228)
VS Code has a specific LogOutputChannel which allows the user to easily change the logging level on an output window. To support that rzls also needs to allow dynamic logging level changes. This adds an endpoint and a level provider that changes the logging level based on an lsp message coming in.
2024-11-19 17:20:32 -08:00
Dustin Campbell 4bd1b96d22 Add GenerateJsonFiles test class
This is is similar to the GenerateBaselines class. It updates the JSON files in the shared files folder. It is included in MS.ANC.Razor.ProjectEngineHost.Test rather than MS.ANC.Razor.Test.Common.Tooling for a couple of reason:

1. That's where most of the serialization tests live.
2. MS.ANC.Razor.Test.Common.Tooling is not a test project, so while the IDE will discover tests in that project, it won't run them.

Note that this change also updates the JSON because I actually ran the test. The JSON formatting is a bit different, which is where there are modifications.
2024-11-19 13:58:40 -08:00
Dustin Campbell ca5d6899af Move all "shared" test files to "src\Shared\files\" 2024-11-19 13:58:40 -08:00
Dustin Campbell 43f4c54d87 Add GenerateJsonFiles in MS.ANC.Razor.Test.Common.Tooling 2024-11-19 13:58:40 -08:00
Dustin Campbell efdf2cb7b6 Fix unused using warning 2024-11-19 13:58:40 -08:00
Dustin Campbell 502ed92e85 Add GenerateBaselines comment to various project files 2024-11-19 13:58:40 -08:00
Dustin Campbell 75780effa7 Remove unused __RemoveThisBitTo__GENERATE_BASELINES compilation symbol
This doesn't appear to be used anywhere.
2024-11-19 13:58:39 -08:00
David Wengier 58984fe582
Remove redundant mapping code, because GetPositionInfo already does this (#11230)
Noticed while working on FAR in cohosting today.
2024-11-20 07:51:18 +11:00
Jan Jones 7030366596
Publish package artifacts on PR builds (#11223) 2024-11-19 10:54:12 +01:00
David Wengier cc8082768c grrrr 2024-11-19 20:35:25 +11:00
David Wengier 70bb96ebc3 Remove redundant mapping code, because GetPositionInfo already does this 2024-11-19 18:13:14 +11:00
Dustin Campbell 203c640639 Remove TagHelperDescriptorJsonConverter and friends 2024-11-18 17:26:23 -08:00
Dustin Campbell 337381a8cf Don't include TagHelperDescriptorJsonConverter in compiler benchmark 2024-11-18 17:26:23 -08:00
Dustin Campbell 9bbbe46332 Update tooling benchmarks to use new JsonDataConvert APIs 2024-11-18 17:26:23 -08:00
Dustin Campbell 18802f3064 Don't include unused TagHelperDescriptorJsonConverter in compiler tests 2024-11-18 17:26:23 -08:00
Dustin Campbell bc2adb19a8 Don't include TagHelperDescriptorJsonConverter in MS.VS.RazorExtension 2024-11-18 17:26:22 -08:00