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

16268 Коммитов

Автор SHA1 Сообщение Дата
David Wengier f3aaba93ee
Revert changes to how projects are updated (#11225)
Reverts https://github.com/dotnet/razor/pull/11213 and
https://github.com/dotnet/razor/pull/11191

Fixes https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2302189
2024-11-19 08:58:08 +11:00
David Wengier 4acbb15f67 Revert "Update ProjectWorkspaceState and HostProject at the same time"
This reverts commit ab46826b25.
2024-11-19 08:18:56 +11:00
David Wengier 0aafa0be8b Revert "Remove unused enum, and replace with a bool"
This reverts commit 827d18b89a.
2024-11-19 08:18:52 +11:00
David Wengier 192acd8e34 Revert "PR feedback"
This reverts commit b36e8925b0.
2024-11-19 08:18:48 +11:00
David Wengier 6b7d3a067a Revert "Don't overbuild when only project workspace state has changed"
This reverts commit 274092965e.
2024-11-19 08:18:33 +11:00
David Wengier 1f91495737 Revert "PR Feedback"
This reverts commit 39e8d1f90e.
2024-11-19 08:18:19 +11:00
David Wengier 85d74a439c
[main] Update dependencies from dotnet/source-build-reference-packages (#11224)
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**: 20241111.2
- **Date Produced**: November 11, 2024 3:57:35 PM UTC
- **Commit**: 92a51d1379daa1fa7892a9d06840ba833fcd6298
- **Branch**: refs/heads/main

[DependencyUpdate]: <> (Begin)

- **Updates**:
-
**Microsoft.SourceBuild.Intermediate.source-build-reference-packages**:
[from 10.0.0-alpha.1.24558.1 to 10.0.0-alpha.1.24561.2][1]

[1]:
1ebd9ce245...92a51d1379

[DependencyUpdate]: <> (End)


[marker]: <> (End:011df26a-fbd1-45b0-94b9-08db3601dcca)
2024-11-19 08:11:14 +11:00
Chris Sienkiewicz 07c8b9e96a
[Fuse] bind-Value:attribute support (#11214)
* Emit a dummy line of code for design time bind properties
* Update baselines
* Unskip integration tests
2024-11-18 10:58:43 -08:00
dotnet-maestro[bot] 59efa0f522 Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20241111.2
Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 10.0.0-alpha.1.24558.1 -> To Version 10.0.0-alpha.1.24561.2
2024-11-18 13:56:59 +00:00
Fred Silberberg 4d7ed74cf4
Handle skipped trivia in the C# tokenizer (#11207)
* Handle skipped trivia in the C# tokenizer

Reaction to https://github.com/dotnet/roslyn/pull/75724. Will need to update to a version of Roslyn with this change to be able to test.

* Account for included newline

* Update versions

* Report an error when encountering a `#` in skipped tokens, new tests/update baselines

* More baselines

* Add test example
2024-11-16 08:35:12 -08:00
dotnet bot 1676deca77
Merge release/dev17.13 to main (#11221)
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-15 16:55:04 +01:00
dotnet bot f556e9a86d
Merge release/dev17.12 to release/dev17.13 (#11219)
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-15 16:31:49 +01:00
dotnet bot 88f8675df4
Merge release/dev17.11 to release/dev17.12 (#11218)
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-11-15 16:09:24 +01:00
dotnet bot b4ba32397a
Merge release/dev17.10 to release/dev17.11 (#11217)
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-11-15 15:13:26 +01:00
Jan Jones f3da60fecd
Merge branch 'release/dev17.10' into release/dev17.11 2024-11-15 14:03:22 +01:00
Jan Jones aa2c76f75e
[release/dev17.10] Update dependencies from dotnet/arcade (#11097)
This pull request updates the following dependencies

[marker]: <> (Begin:0022737c-8efd-4919-ecf2-08dc3decc073)
## From https://github.com/dotnet/arcade
- **Subscription**: 0022737c-8efd-4919-ecf2-08dc3decc073
- **Build**: 20241112.12
- **Date Produced**: November 12, 2024 10:31:44 PM UTC
- **Commit**: 42652ca52cd5f9f637fef2b3ab6148805e3c5168
- **Branch**: refs/heads/release/8.0

[DependencyUpdate]: <> (Begin)

- **Updates**:
- **Microsoft.SourceBuild.Intermediate.arcade**: [from
8.0.0-beta.24516.1 to 8.0.0-beta.24562.12][2]
- **Microsoft.DotNet.Arcade.Sdk**: [from 8.0.0-beta.24516.1 to
8.0.0-beta.24562.12][2]

[2]: f7fb1fec01...42652ca52c

[DependencyUpdate]: <> (End)


[marker]: <> (End:0022737c-8efd-4919-ecf2-08dc3decc073)
2024-11-15 13:41:29 +01:00
Jan Jones 2add41b0c0
Skip deploying in official builds 2024-11-15 11:31:14 +01:00
Jan Jones 17ee8612b2
Add schedule 2024-11-15 10:51:57 +01:00
dotnet-maestro[bot] e85c2f885e
Update dependencies from https://github.com/dotnet/arcade build 20241112.13 (#11211)
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 9.0.0-beta.24516.2 -> To Version 9.0.0-beta.24562.13

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2024-11-15 08:52:36 +01:00
David Wengier 991f32755a
Fine tuning of what types of project update affect what state (#11213)
Follow up to https://github.com/dotnet/razor/pull/11191 which caused RPS
regressions.

There were some edge-y things I papered over in that PR, assuming they
were unnecessary over-complications, but given the RPS regression I had
a closer look, and they could have caused re-compilation of closed
documents when only tag helpers changed, which would be new behaviour.
Not _entirely_ convinced the re-compilation is all unnecessary (if a
document used a Tag Helper that has only just been discovered, then its
code gen would legitimately change) but it's hard to justify when I
can't point to any tooling for the closed files that would actually
benefit from the extra work.

The key thing is not changing `DocumentCollectionVersion` when only
`ProjectWorkspaceState` changes. Not re-calculating import documents was
just a little extra amuse-bouche, and not caching the computed state
tracker is pure paranoia.
2024-11-15 10:41:07 +11:00
David Wengier 39e8d1f90e PR Feedback 2024-11-15 09:58:07 +11:00
dotnet-maestro[bot] bd7c45b7f8 Update dependencies from https://github.com/dotnet/arcade build 20241112.12
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24516.1 -> To Version 8.0.0-beta.24562.12
2024-11-14 14:24:59 +00:00
David Wengier 274092965e Don't overbuild when only project workspace state has changed 2024-11-14 14:12:17 +11:00
Dustin Campbell ade9db7be3
Remove GetTagHelpersSynchronously extension method (#11205)
Fixes #9878

It turns out that this extension method isn't necessary. It's only used
by the legacy editor, which can just access
`IProjectSnaphshot.ProjectWorkspaceState.TagHelpers`. That property is
always implemented by any project snapshot that the legacy editor
encounters, namely `ProjectSnapshot` or `EphemeralProjectSnapshot`.
2024-11-13 13:25:58 -08:00
Dustin Campbell 2396bf6efe
Move named pipe support (#11206)
Since the named pipe support is intended to only be used by RZLS, this
change moves the support types into `MS.ANC.Razor.LanguageServer` and
organizes them in a `MS.ANC.Razor.LanguageServer.Hosting.NamedPipes`
namespace. In addition, I've moved a couple of `IServiceCollection`
extension methods into the `MS.ANC.Razor.LanguageServer.Hosting`
namespace to avoid opening up internals visible to access to the entire
`MS.ANC.Razor.LanguageServer.Extension` namespace, even if it's just to
RZLS. The goal of having `RestrictedInternalsVisibleTo` for the
`MS.ANC.Razor.LanguageServer.Hosting` namespace is to control the
exposed surface area of the language server. If something is needed by
VS or RZLS, strongly consider whether it should just be added to the
`Hosting` namespace to avoid unintentionally dependencies that might
need to be detangled later.

Note: Once this is merged, I'll submit a PR to update the code pointer
comment at
eb38986a52/src/razor/src/razorLanguageServerClient.ts (L228).
2024-11-13 13:25:34 -08:00
Dustin Campbell 684588e691 Use appropriate exception type
This switches an incorrect usage of NotImplementedException to InvalidOperationException
2024-11-13 09:35:35 -08:00
Dustin Campbell 3eccdaa2c3 Moved named pipe hosting files into Hosting.NamedPipes namespace 2024-11-13 09:32:31 -08:00
Dustin Campbell cf97c32978 Remove MS.ANC.Razor.LS.Extensions from RestrictedInternalsVisibleTo
This change moves the necessary extension methods to the MS.ANC.Razor.LanguageServer.Hosting namespace to avoid needing to expose a larger namespace outside of the language server. RestrictedInternalsVisibleTo is a tool for controlling the implicit surface area of the language server, and we should add to that surface area judiciously.
2024-11-13 09:29:11 -08:00
Dustin Campbell 3d97b072e6 Move RazorNamedPipeConnectParams to MS.ANC.Razor.LanguageServer
Since this is only used within the language server for named pipe support, it can live in the language server rather than Razor.Workspaces.
2024-11-13 09:15:27 -08:00
Dustin Campbell 9ad46c44ac Switch LogInformation to LogError
I noticed a logging message that seemed to indicate an error rather than an informational message.
2024-11-13 09:04:07 -08:00
Dustin Campbell bf0fc30007 Move INamedPipeProjectInfoDriver to LanguageServier.Hosting namespace
Since INamesPipeProjectInfoDriver is a contract between MS.ANC.Razor.LanguageServer and RZLS, it doesn't need to live in Razor.Workspaces. Instead, it should live in the language server's Hosting namespace.
2024-11-13 09:02:37 -08:00
Dustin Campbell bda584dd50 Remove GetTagHelpersSynchronously extension method
It turns out that this extension method isn't necessary. It's only used by the legacy editor, which can just access `IProjectSnaphshot.ProjectWorkspaceState.TagHelpers`. That property is always implemented by any project snapshot that the legacy editor encounters, namely `ProjectSnapshot` or `EphemeralProjectSnapshot`.
2024-11-13 08:31:15 -08:00
Andrew Hall 2479b5e55f
Fix request duration logging (#11198)
When first introduced there was an error in assumption of how histogram telemetry worked. This fixes this by correctly reporting a unique histogram even per lsp method name rather than the first one that comes in (which, as it turns out, was always initialize)

Also cleaned up the wording so it was a little easier to understand.
2024-11-12 23:32:43 +00:00
Bill Wagner f2fc3e4f73
Only one format works for dates. (#11202)
The separator must be a `/`
2024-11-12 19:37:40 +00:00
David Wengier d68c917f25
Yes, learn uses the US date format. (#11201) 2024-11-13 06:00:45 +11:00
Bill Wagner 0c355e5717 Yes, learn uses the US date format. 2024-11-12 13:32:00 -05:00
Bill Wagner a9f72d54bd
Add metadata (#11199)
* Add metadata

Add the required learn metadata to publish these articles on learn.

See dotnet/AspNetCore.Docs#34063

* add the date.
2024-11-12 10:20:58 -08:00
Andrew Hall 1f24912e44
Add mapped edits helper (#11146)
Razor side of implementing IRazorMappingService.

Adds a RazorEditorHelper that specifically is designed to handle complex edits in csharp files that are generated by razor. Handles adding, removing, renaming, and a mix of both for usings. The rest of edits are put exactly where they map to.
2024-11-11 21:03:23 -08:00
David Wengier 95f862d12e
Update ProjectWorkspaceState and HostProject at the same time (#11191)
Preparation for ongoing work to hook up the Roslyn tokenizer and
https://github.com/dotnet/razor/issues/11182 I suppose.

There were three places that `UpdateProjectWorkspaceState` was called:

1. In `RazorProjectService`, just before calling
`UpdateProjectConfiguration`
2. In `ProjectWorkspaceStateGenerator`, where we will need to add a call
to `UpdateProjectConfiguration` in future, to wire up the tokenizer
3. In our LiveShare bits, in response to events from the above.

Previous attempts to plumb through more things for `RazorConfiguration`
resulted in RPS failures, that appeared to be simply more compilations
of closed files. This makes sense because we were adding another update,
which would have triggered another set of `ProjectChanged` events. I
thought it would make more sense to combine these two updates together,
so no matter which part of the project was being updated, there could be
a single `ProjectChanged` notification. This is that.
2024-11-12 13:43:48 +11:00
David Wengier f3aa64757d
Add feature flag to turn on the new Roslyn tokenizer (#11185)
This makes the feature work in VS and VS Code (with corresponding VS
Code change to pass the right flag, coming once this is merged)

VS Code PR: https://github.com/dotnet/vscode-csharp/pull/7748

/cc @danroth27, @leslierichardson95, @333fred, @chsienki and anyone else
who wants, for wording:
VS Code:

https://github.com/dotnet/vscode-csharp/pull/7748/files#diff-9b29d8b47a74097a04da353b72a8632d485d658282457b97b4caf26575a42dd0R131
VS:

https://github.com/dotnet/razor/pull/11185/files#diff-18b9b146f4d27a6a5b6248ece31b30570d84c2a409b25bf5b660de86e608fa4cR80
2024-11-12 11:16:10 +11:00
David Wengier 4b7e93d6f4 PR feedback 2024-11-12 10:29:55 +11:00
David Wengier b36e8925b0 PR feedback 2024-11-12 10:24:50 +11:00
Alex Gavrilov aeebb01d00
Move completion resolve code to common layer (#11156)
* Move completion resolve code to common layer

* Undo move of IProjectSnapshotManagerExtensions and MiscFilesHostProject per PR feedback

* Undo unnecessary changes in tests

* Refactor the code to remove usage of IProjectSnapshotManager
2024-11-11 14:37:48 -08:00
David Wengier 8a2c71f196
Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2579832 (#11197) 2024-11-12 09:25:00 +11:00
dotnet bot 0d2b37e672 Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2579832 2024-11-11 22:04:21 +01:00
dotnet bot efafc82d5c Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2579832 2024-11-11 22:03:09 +01:00
David Wengier 22980a43b8
[main] Update dependencies from dotnet/source-build-reference-packages (#11193)
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**: 20241108.1
- **Date Produced**: November 8, 2024 2:38:25 PM UTC
- **Commit**: 1ebd9ce245112164207d961c0d2faea741c7c489
- **Branch**: refs/heads/main

[DependencyUpdate]: <> (Begin)

- **Updates**:
-
**Microsoft.SourceBuild.Intermediate.source-build-reference-packages**:
[from 10.0.0-alpha.1.24530.1 to 10.0.0-alpha.1.24558.1][1]

[1]:
136e43e45e...1ebd9ce245

[DependencyUpdate]: <> (End)


[marker]: <> (End:011df26a-fbd1-45b0-94b9-08db3601dcca)
2024-11-12 07:49:49 +11:00
dotnet-maestro[bot] 6a35742bda Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20241108.1
Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 10.0.0-alpha.1.24530.1 -> To Version 10.0.0-alpha.1.24558.1
2024-11-11 13:42:23 +00:00
David Wengier 827d18b89a Remove unused enum, and replace with a bool
(and clean up a teeny tiny bit)
2024-11-11 13:59:00 +11:00
David Wengier ab46826b25 Update ProjectWorkspaceState and HostProject at the same time 2024-11-11 13:27:10 +11:00