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

13931 Коммитов

Автор SHA1 Сообщение Дата
Andrew Hall (METAL) 0e6b9bbdfe Fix comment 2024-03-23 15:51:44 -07:00
Andrew Hall (METAL) 13c90ccb2f Add an in memory logger 2024-03-23 15:50:16 -07:00
dotnet-maestro[bot] 940f2d5d6c Update dependencies from https://github.com/dotnet/arcade build
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24165.4 -> To Version 8.0.0-beta.24170.6
2024-03-23 12:53:58 +00:00
David Wengier 7a445a4daf
Simple logging in OOP to TraceSource (#10145) 2024-03-23 08:36:51 +11:00
David Wengier 5ed11054f9
Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2411980 (#10151) 2024-03-23 08:36:38 +11:00
dotnet bot a4f6f9032a Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2411980 2024-03-22 09:11:07 -07:00
dotnet bot 13244d3c4c Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2411980 2024-03-22 09:10:01 -07:00
Dustin Campbell d4a6aaafa0
Use PooledArrayBuilder<SyntaxToken> throughout parsers and tokenizer (#10095)
@ToddGrun shared a couple PerfView stacks with me where the Razor
compiler was allocating `List<SyntaxToken>` instances in the tokenizer.
To remove those allocation, this change replaces `List<SyntaxToken>s`
throughout the parsers and tokenizer, and uses
`PooledArrayBuilder<SyntaxToken>` instead. In addition, I removed a
couple of `Concat` calls and replaced them with pooled `StringBuilders`.
2024-03-22 08:53:34 -07:00
dotnet-maestro[bot] 539ece931f Update dependencies from https://github.com/dotnet/arcade build
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24165.4 -> To Version 8.0.0-beta.24170.6
2024-03-22 12:57:05 +00:00
David Wengier 66658cab3e
Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2411462 (#10146) 2024-03-22 17:40:03 +11:00
dotnet bot ea513c2065 Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2411462 2024-03-21 20:53:10 -07:00
David Wengier 6fde0b6989 Simple logging to TraceSource for now 2024-03-22 14:42:52 +11:00
David Wengier ddf7916e58
Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2411407 (#10141)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2024-03-22 14:35:49 +11:00
Dustin Campbell 7cbc0b6cdc
Stop exporting MS.CA.Razor.Workspaces as MEF component (#10142)
Part of #10127

Now that all `[Export]`s have been removed from Workspaces, we can stop
registering it for VS MEF.
2024-03-21 18:29:23 -07:00
David Wengier c7731db611
Fix typo in settings (#10143)
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1995012

From reading the docs on a few things, it seems the use of the attribute
is still in flux, and the team will notify partners when we should
migrate, so going to leave that for now.
2024-03-22 12:28:29 +11:00
David Wengier da1f213170 Fix typo in settings 2024-03-22 11:34:54 +11:00
Dustin Campbell d1313728f4 Stop exporting MS.CA.Razor.Workspaces as MEF component 2024-03-21 17:03:21 -07:00
dotnet bot d41541f8fb Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2411265 2024-03-21 16:56:06 -07:00
dotnet bot b2b50b1f6c Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2411265 2024-03-21 16:55:01 -07:00
Dustin Campbell 08189eb9ea
Fix hot path string allocations from ProjectKey (#10138)
@toddgrun pointed me to a fair amount of string allocation due
`ProjectKey.From(Project)` being called repeatedly on a hot path. To
address this, I've added `ProjectKey.Matches(Project)`, which simply
compares the current key's `Id` with the project's intermediate output
path. This uses a new
`FilePathNormalizer.AreDirectoryPathsEquivalent(...)` helper to avoid
allocating a new string.


![image](https://github.com/dotnet/razor/assets/116161/0efd9ffd-0405-4b03-b2d1-f8b2ac9d0c6e)
2024-03-21 16:38:40 -07:00
Dustin Campbell cec11f4848 Add comment and assert 2024-03-21 15:54:29 -07:00
Dustin Campbell 5bed9c6638 Update Roslyn.Diagnostic.Analyzers and update a couple more parameters to ref readonly 2024-03-21 12:44:49 -07:00
Dustin Campbell 56d8abb381 Fix hot path string allocations from ProjectKey
@toddgrun pointed me to a fair amount of string allocation due `ProjectKey.From(Project)` being called repeatedly on a hot path. To address this, I've added `ProjectKey.Matches(Project)`, which simply compares the current key's `Id` with the project's intermediate output path. This uses a new `FilePathNormalizer.AreDirectoryPathsEquivalent(...)` helper to avoid allocating a new string.
2024-03-21 10:14:29 -07:00
dotnet bot f7afe2cf26
Merge release/dev17.10 to main (#10137)
This is an automatically generated pull request from release/dev17.10
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.10
- 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.10-to-main
git reset --hard upstream/main
git merge upstream/release/dev17.10
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.10-to-main --force
```
2024-03-21 03:10:36 -07:00
Jan Jones 25f43e3dda
Merge branch 'release/dev17.10' into main 2024-03-21 10:47:47 +01:00
dotnet bot dc7e582282
Merge release/dev17.9 to release/dev17.10 (#10136)
This is an automatically generated pull request from release/dev17.9
into release/dev17.10.


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

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.9-to-release/dev17.10
git reset --hard upstream/release/dev17.10
git merge upstream/release/dev17.9
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.9-to-release/dev17.10 --force
```
2024-03-21 02:43:21 -07:00
Jan Jones eaf86f99cc
Merge branch 'release/dev17.9' into release/dev17.10 2024-03-21 10:20:05 +01:00
Jan Jones 5e1807d315
[release/dev17.9] Update dependencies from dotnet/arcade (#10113)
This pull request updates the following dependencies

[marker]: <> (Begin:c4beac37-eae4-4f6a-0368-08dc3deb80bb)
## From https://github.com/dotnet/arcade
- **Subscription**: c4beac37-eae4-4f6a-0368-08dc3deb80bb
- **Build**: 
- **Date Produced**: March 15, 2024 4:24:02 PM UTC
- **Commit**: f311667e0587f19c3fa9553a909975662107a351
- **Branch**: refs/heads/release/8.0

[DependencyUpdate]: <> (Begin)

- **Updates**:
- **Microsoft.DotNet.Arcade.Sdk**: [from 8.0.0-beta.24161.7 to
8.0.0-beta.24165.4][5]

[5]: cd10e5d374...f311667e05

[DependencyUpdate]: <> (End)


[marker]: <> (End:c4beac37-eae4-4f6a-0368-08dc3deb80bb)
2024-03-21 09:47:44 +01:00
Jan Jones 5024fbef30
[release/dev17.10] Update dependencies from dotnet/arcade (#10114)
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**: 
- **Date Produced**: March 15, 2024 4:24:02 PM UTC
- **Commit**: f311667e0587f19c3fa9553a909975662107a351
- **Branch**: refs/heads/release/8.0

[DependencyUpdate]: <> (Begin)

- **Updates**:
- **Microsoft.SourceBuild.Intermediate.arcade**: [from
8.0.0-beta.24161.7 to 8.0.0-beta.24165.4][5]
- **Microsoft.DotNet.Arcade.Sdk**: [from 8.0.0-beta.24161.7 to
8.0.0-beta.24165.4][5]

[5]: cd10e5d374...f311667e05

[DependencyUpdate]: <> (End)


[marker]: <> (End:0022737c-8efd-4919-ecf2-08dc3decc073)
2024-03-21 09:47:36 +01:00
David Wengier 2c9d4783e9
Update EOL versions (#10135)
### Summary of the changes

-

Fixes:
2024-03-21 16:48:45 +11:00
David Wengier d6853d2886
Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2409975 (#10134)
This is the pull request automatically created by the OneLocBuild task
in the build process to check-in localized files generated based upon
translation source files (.lcl files) handed-back from the downstream
localization pipeline. If there are issues in translations, visit
https://aka.ms/icxLocBug and log bugs for fixes. The OneLocBuild wiki is
https://aka.ms/onelocbuild and the localization process in general is
documented at https://aka.ms/AllAboutLoc.
2024-03-21 10:09:34 +11:00
Rich Lander 1c4e1135b0
Update EOL versions 2024-03-20 16:04:05 -07:00
David Wengier 6bdc5c5d1f
Stop MEF exporting `FilePathService` from the Workspaces layer (#10118)
One of the items in https://github.com/dotnet/razor/issues/10103

Part of https://github.com/dotnet/razor/issues/9519
2024-03-21 09:51:24 +11:00
dotnet bot 3b6038ea9e Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2409975 2024-03-20 15:32:50 -07:00
David Wengier cc63f8e44b Merge remote-tracking branch 'upstream/main' into dev/dawengie/FilePathService 2024-03-21 09:12:17 +11:00
David Wengier 3c2dca577c
Cohosting: Add semantic tokens support, via Roslyn OOP (#10097)
Part of https://github.com/dotnet/razor/issues/9519

This PR feels like the last month of my life, with most of that time
simply fighting ServiceHub.

This adds a new endpoint for the cohosting server to support semantic
tokens. It's the first endpoint in the server. (Almost) the only thing
it does is immediately call our to the OOP process to do the actual
work. Logic is mainly provided by the same service that the existing
semantic tokens endpoint uses, but for a small piece of functionality
that is plugged in, via MEF, to call Roslyn via a new C# API
(https://github.com/dotnet/roslyn/pull/72495) instead of via LSP.
Currently the syntax tree is computed on the fly in OOP, and the
document Roslyn is asked about is the one that the LSP server creates
via IDynamicFile. In future this will change to get the real source
generated document, and data from the source generator for the tree etc.

Reviewing commit-at-a-time is probably best. There are still a bunch of
TODOs, some hard-coded bits, and some hacky bits, but I wanted to ensure
this was actually reviewable and not too big.

Worth nothing this won't build until the Roslyn PR mentioned above is
merged, and a new package is available to update to.
2024-03-21 09:11:39 +11:00
David Wengier a220f73498 Update version details.xml too 2024-03-21 08:19:30 +11:00
David Wengier 2e9eaa0fb5 Bump Roslyn to a real version 2024-03-21 07:42:58 +11:00
David Wengier e57c20cea1 Merge remote-tracking branch 'upstream/main' into CohostSemanticTokensOOP 2024-03-21 07:41:19 +11:00
David Wengier 1d74c0734f
Add proper OOP initialization for language server concepts (#10119)
One of the items in https://github.com/dotnet/razor/issues/10103

Part of https://github.com/dotnet/razor/issues/9519
2024-03-21 07:40:22 +11:00
David Wengier 89d540c535
Merge branch 'dev/dawengie/FilePathService' into dev/dawengie/OOPLSPInitialization 2024-03-21 07:40:14 +11:00
David Wengier 8375765134
Remove unnecessary parameter (#10120)
Turns out the code path is the same for OOP, whether precise ranges is
on or not :)

One of the items in https://github.com/dotnet/razor/issues/10103

Part of https://github.com/dotnet/razor/issues/9519
2024-03-21 07:39:38 +11:00
David Wengier a716831a27
Bring telemetry back for semantic tokens in cohosting (#10121)
One of the items in https://github.com/dotnet/razor/issues/10103

Part of https://github.com/dotnet/razor/issues/9519

Rather than move telemetry down into the service, I decided to leave it
in the endpoint, and C# specific service, so we can track separate
telemetry from existing LSP, to make it easier to report on. In theory
this is unnecessary because we already would know the status of A/B
flights in the telemetry data, but that doesn't allow for manually
switching the flag. If people feel strongly about not using different
properties, I'm fine to change. Perhaps all of our telemetry should
automatically log cohosting and fuse status as properties?
2024-03-21 07:39:27 +11:00
dotnet-maestro[bot] a69562a12f Update dependencies from https://github.com/dotnet/arcade build
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24161.7 -> To Version 8.0.0-beta.24165.4
2024-03-20 13:00:36 +00:00
dotnet-maestro[bot] 0e9461ec84 Update dependencies from https://github.com/dotnet/arcade build
Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24161.7 -> To Version 8.0.0-beta.24165.4
2024-03-20 12:59:09 +00:00
Andrew Hall eb9363d4f1
Disable latest runtime patch (#10133)
With this setting, the runtime config will require 8.0.1 to be set. This
can cause issues for those without the latest patch installed. Fixes
https://github.com/dotnet/razor/issues/10130

Now the runsettings look like 

```json
{
  "runtimeOptions": {
    "tfm": "net8.0",
    "rollForward": "LatestMajor",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "8.0.0"
    },
    "configProperties": {
      "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
    }
  }
}
```
2024-03-19 16:36:29 -07:00
Andrew Hall (METAL) 662eeb6f3c Disable latest runtime patch 2024-03-19 16:14:00 -07:00
Dustin Campbell 08753fb5de
Remove logging MEF export from Workspaces (#10131)
Part of #10127

`RazorLoggerFactory` is exported as a MEF part. This change removes that
MEF export and exports it from the VS Layer.
2024-03-19 14:05:43 -07:00
Dustin Campbell e405d7d396
Remove MEF exports for completion from Workspaces (#10128)
Part of #10127

There are several completion types exported as MEF parts in service of
the legacy editor. This change removes those MEF exports.
2024-03-19 14:05:27 -07:00
Dustin Campbell bf2acb2f4c Switch a couple of parameters to ref readonly 2024-03-19 11:13:20 -07:00