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

16161 Коммитов

Автор SHA1 Сообщение Дата
David Wengier 5683be72a5
[main] Update dependencies from dotnet/source-build-reference-packages (#11104)
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**: 20241021.1
- **Date Produced**: October 21, 2024 5:34:14 PM UTC
- **Commit**: ccd0927e3823fb178c7151594f5d2eaba81bba81
- **Branch**: refs/heads/main

[DependencyUpdate]: <> (Begin)

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

[1]:
4660d88cf9...ccd0927e38

[DependencyUpdate]: <> (End)


[marker]: <> (End:011df26a-fbd1-45b0-94b9-08db3601dcca)
2024-10-29 10:18:42 +11:00
Ankita Khera 7bd4de7f1e
update configs for 17.13p2 snap (#11105) 2024-10-28 16:16:47 -07:00
Dustin Campbell 76cd92a65e
Some random clean up and improvements (#11095)
These are just some tweaks I've had on my machine awhile.

- Introduce `PlatformInformation` class to remove several
`RuntimeInformation.IsOSPlatform(...)`. These checks are fairly
efficient, but each [requires in a string
comparison](6ed953a000/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs (L122-L134))
and it's easy enough to just do those once and remember the result.
- Replace `OSSkipConditionFactAttribute` with
`ConditionalFactAttribute`. This makes it easier to see what conditions
a test will run under. For example, it's much easier to see that a test
will run on Windows if it's marked with `[ConditionalFact(Is.Windows)]`
rather than `[OSSkipConditionFact(["Linux", "OSX"])]`
2024-10-28 15:34:46 -07:00
David Wengier a37ee126f8
Update project configuration from Roslyn info (#11092)
Fixes https://github.com/dotnet/razor/issues/10736 and brings in IDE
support for the new Roslyn tokenizer, which makes this work:


![Image](https://github.com/user-attachments/assets/3f3647d3-5089-4750-96a0-a80c498db97b)
2024-10-29 09:34:01 +11:00
David Wengier efd0d3870a Missed one test 2024-10-29 09:07:17 +11:00
David Wengier 39dccd9625 PR Feedback 2024-10-29 08:47:21 +11:00
dotnet bot 60e72de170 Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2570586 2024-10-28 21:37:33 +01:00
dotnet bot 54c92500cf Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2570586 2024-10-28 21:36:21 +01:00
Phil Allen ad74439384
Reduce the amount of telemetry emitted (#11094)
* Reduce the amount of telemetry emitted

* Accept code review feedback

* Accept code review feedback (2)

* Change TelemetryScope to NonCopyable struct; if the default constructor is used, _reporter is null so no "report" happens on Dispose.  If the _reporter check were removed from Dispose, multiple unittests would fail.

* Undo telemetry-scope-as-struct changes
2024-10-28 13:07:00 -07:00
dotnet-maestro[bot] 479db0350a Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20241021.1
Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 10.0.0-alpha.1.24515.1 -> To Version 10.0.0-alpha.1.24521.1
2024-10-28 12:51:35 +00:00
David Wengier 0ee391d1c4 Rename classes for clarity 2024-10-28 14:48:15 +11:00
David Wengier 1e8e1f1a57 Remove CSharpLanguageVersion from project classes, so it's clear where it comes from 2024-10-28 14:48:15 +11:00
David Wengier 04375f6034 Move CSharpLanguageVersion to RazorConfiguration 2024-10-28 14:48:15 +11:00
David Wengier f6e3f1c275 Just specify defaults once 2024-10-28 14:48:14 +11:00
David Wengier 90c0db6bfc Move UseRoslynTokenizer to RazorConfiguration 2024-10-28 14:48:14 +11:00
David Wengier 12476a8930 Stop piecemeal checking individual properties, and rely on the equals overload of the configuration object 2024-10-28 14:48:13 +11:00
David Wengier 66b94d68dd Misc PR feedback 2024-10-28 13:15:13 +11:00
David Wengier 349b1589e3 Fix updating of SuppressAddComponentParameter 2024-10-28 12:35:37 +11:00
Dustin Campbell febf13d158 Ensure Utilities.Shared.Test has a reference Test.Common 2024-10-25 16:02:02 -07:00
Dustin Campbell ac490b9df0 Replace OSSkipConditionFactAttribute with ConditionalFactAttribute
This change replaces OSSkipConditionFactAttribute a more generally useful ConditionalFactAttribute (and ConditionalTheoryAttribute. This makes it easier to see what conditions a test *should* execute under rather that which conditions it shouldn't.
2024-10-25 16:01:53 -07:00
Dustin Campbell 8b54f13777 Move OSSkipConditionFactAttribute.cs to common test project
This change move OSSkipConditionFactAttribute.cs in every test project and removes file links it in every test project.
2024-10-25 16:01:43 -07:00
Dustin Campbell 56514e99bd Introduce PlatformInformation and unify IsOSPlatform checks 2024-10-25 16:01:35 -07:00
Dustin Campbell 45b65b3eb3
Remove tooling MvcShims (#11088)
Thanks to recent changes made by @jjonescz, this pull request moves lots
of unused and unnecessary code from tooling, getting rid of MvcShims in
the tooling layer.

Due to the number of files change, I _strongly_ recommend reviewing
commit by commit.
2024-10-25 10:09:58 -07:00
David Wengier 51ba92b676 Allow the workspace state generator to also update the project configuration 2024-10-25 15:54:59 +11:00
David Wengier 6702e25e53 Invalidate project engine when UseRoslynTokenizer changes 2024-10-25 15:06:55 +11:00
David Wengier 1e660568b6 Update tests 2024-10-25 15:06:55 +11:00
David Wengier d81dd600c4 Add UseRoslynTokenizer onto ProjectWorkspaceState and plumb through 2024-10-25 15:06:55 +11:00
David Wengier 93d2032685
Cohosted Code Actions Part 1: Make code action resolve work on a document (#11082)
Part of https://github.com/dotnet/razor/issues/10742

The more I keep plugging away at cohosting code actions, the more I
realise the PR is going to be way too big, so this is the first little
bit I've pulled out from it.

It's mostly mechanical, just pulling document up to the Razor resolve
context, from the individual contexts, changing the endpoint, and then
fixing all the plumbing.


(New PR, from the same commit, from a feature branch so I can keep
working)
2024-10-25 12:23:38 +11:00
David Wengier 611af16993 Merge remote-tracking branch 'upstream/main' into dev/dawengie/CodeActionsPartOne 2024-10-25 11:56:00 +11:00
Fred Silberberg c884dbd603
Roslyn Tokenizer (#11086)
This adds the new roslyn-based tokenizer, off by default, which uses
Roslyn, instead of a native tokenizer, to tokenize C# code. This is a
major change and will be enabled by putting
`<Features>use-roslyn-tokenizer</Features>` in the project file.

Closes https://github.com/dotnet/razor/issues/10737
Closes https://github.com/dotnet/razor/issues/10568
Closes https://github.com/dotnet/razor/issues/7084
2024-10-24 17:22:16 -07:00
Dustin Campbell 6c50811fb5 Remove unused testapps 2024-10-24 16:18:04 -07:00
David Wengier d371b1ef79
Cohosted Code Actions Part 2: Re-layout in advance of moving down (#11083)
Part of https://github.com/dotnet/razor/issues/10742

The next round of changes is to introduce the right abstractions so that
the bulk of the code actions code can be moved to the Workspaces layer
successfully.

At least I think I got it all :D

Reviewing commit at a time probably makes sense, but up to you.
2024-10-25 10:15:17 +11:00
David Wengier 56ad7f7fa8
Cohosted Code Actions Part 3: Move files and extract services (#11084)
Part of https://github.com/dotnet/razor/issues/10742

This is the final step before actually doing something cohosting
related: Move things to the Workspaces layer and extract services from
the endpoints.

Definitely more work to do on the services to make them usable for
cohosting, but those diffs will at least be easier to view in isolation.

Commit-at-a-time is presumably a much better experience since so many
files moved, and namespaces changed, which I isolated to separate
commits.
2024-10-25 10:15:01 +11:00
Dustin Campbell 1861c2ea39 Recreate relevant testapps in benchmarks\testapps folder 2024-10-24 16:14:46 -07:00
David Wengier 8ebdce8d42 Rename files to remove Default from the name 2024-10-25 10:14:14 +11:00
David Wengier 52c3c4f05c PR Feedback, and a few sneaky using directives that weren't sorted 2024-10-25 09:59:25 +11:00
Dustin Campbell be4a8621ce Remove tooling MvcShims
The MvcShims defined in tooling are only refernced in the projects located in "src\Razor\test\testapps". However, those projects don't appear to actually ever be built by anything. The source files in the "testapps" projects are used by some of the tooling benchmarks, but that usage doesn't require us to continue building the shims.
2024-10-24 15:14:14 -07:00
Dustin Campbell 466ecf2af5 Delete Microsoft.AspNetCore.Razor.Test.ComponentShim project 2024-10-24 15:14:03 -07:00
Dustin Campbell 931cfe4811 Remove two unneeded project references to ComponentShim 2024-10-24 15:13:50 -07:00
Dustin Campbell 2c5ffc273e Remove reference to ComponentShim from Test.Common.Tooling 2024-10-24 15:13:28 -07:00
Dustin Campbell b046278ead Remove comment that incorrectly referred to ComponentShim 2024-10-24 15:13:16 -07:00
Dustin Campbell e05c372568 Remove unused methods from RazorToolingIntegrationTestBase
These methods were the only thing using types from Microsoft.AspNetCore.Razor.Test.ComponentShim, and they weren't even being used!
2024-10-24 15:12:58 -07:00
Andrew Hall e9199b661a
Add flush method and make it implementation detail on how that happens (#11087)
rzls imports telemetry by creating an ExportProvider with the path to
devkit telemetry if it's installed and enabled. Unfortunately that means
that dispose is being prematurely called when that provider is torn
down. To help with this two things are done:

1. Make a flush method on ITelemetryReporter
2. Make when flush happens an implementation detail on the specific
providers.

In this case, rzls will flush after the language server host exits. In
other cases IDisposable will be used to flush telemetry (VS and OOP)
2024-10-24 14:39:35 -07:00
Andrew Hall f24259cbab Add flush method and make it implementation detail on how that happens 2024-10-24 12:03:33 -07:00
Fred Silberberg 927d6a959b
Merge main to tokenizer branch (#11085)
Trivial conflict resolutions only.
2024-10-24 11:56:54 -07:00
Fredric Silberberg 6169824b2c
Merge remote-tracking branch 'upstream/main' into merge-main
* upstream/main:
  Fix resource string (#11079)
  Update Roslyn.Diagnostics.Analyzers package to latest version
  Update MS.CA.Analyzers package to 3.11.0
  Don't reference MS.CA.BannedApiAnalyzers package directly
  Version Roslyn.Diagnostics.Analzyers package separately
  Update dependencies from https://github.com/dotnet/arcade build 20241016.1
  Update dependencies from https://github.com/dotnet/arcade build 20241016.1
  Update dependencies from https://github.com/dotnet/arcade build 20241016.1
2024-10-24 11:28:41 -07:00
Fred Silberberg c20c1cd6f3
Final lexer changes (#11078)
* Switch the new lexer off-by-default.

* Add a new document for the lexer breaking changes around pragmas.

* Update comment.

* Feedback

Co-authored-by: Jan Jones <jan.jones.cz@gmail.com>

---------

Co-authored-by: Jan Jones <jan.jones.cz@gmail.com>
2024-10-24 10:30:56 -07:00
Dustin Campbell e5aa079f55
Update analyzer package versions (#11076)
I noticed some painful NuGet analyzer package upgrades in PR #11048 and
decided to take a look at the issue. I've made the following changes:

- `Roslyn.Diagnostics.Analyzers` is now versioned separately from
`Microsoft.CodeAnalysis.Analyzers`, as they are in
[`dotnet/roslyn`](08243d3826/eng/Directory.Packages.props (L4)).
- I've removed direct references to `MS.CA.BannedApiAnalyzers` since
that reference should flow from `Roslyn.Diagnostics.Analyzers`.
- I've updated the versions of `Microsoft.CodeAnalysis.Analyzers` and
`Roslyn.Diagnostics.Analyzers`
2024-10-24 10:15:49 -07:00
Chris Sienkiewicz 4f4effb106
Fix resource string (#11079)
* Update resource string
* Update baselines
2024-10-24 10:03:24 -07:00
David Wengier 1476b71fe7 Extract code action resolve to a service 2024-10-24 18:19:45 +11:00