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

15580 Коммитов

Автор SHA1 Сообщение Дата
David Wengier 8cebb29b87 Remove debug.fails 2024-08-27 14:00:50 +10:00
David Barbet fe31c903d5
Snap for 17.12 P2 (#10793)
merge main into release/dev17.12 to update for 17.12 P2. Main is 17.12
P3.
2024-08-26 18:55:52 -07:00
David Barbet 8ff61a0bf1
Update configs for 17.12p3 snap (#10792)
Draft until snap time.
2024-08-26 17:54:02 -07:00
David Wengier 156f016fff
Fix Formatting and On Enter integration tests (#10788)
Since the end of last week, these tests have been failing. Seems like
something changed on the platform side, perhaps a default value of a
setting. Have started a thread with the editor team to see if we need to
do more.
2024-08-27 07:12:11 +10:00
David Barbet e7db6bcb15
Update configs for 17.12p3 snap 2024-08-26 13:59:43 -07:00
dotnet bot fff39dce74 Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2524412 2024-08-26 10:30:38 -07:00
dotnet bot 038f7fc416 Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2524412 2024-08-26 10:29:28 -07:00
Chris Sienkiewicz aa024eb33f
[FUSE] Provide intellisense for @inject directives (#10771)
* When @Inject is missing the member name, generate a syntactically valid c# identifier so we get intellisense
* Emit an empty section when there is no typename
* Add tests and update baselines
2024-08-26 10:14:26 -07:00
dotnet-maestro[bot] 5ca9964844 Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240821.1
Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 10.0.0-alpha.1.24419.1 -> To Version 10.0.0-alpha.1.24421.1
2024-08-26 12:52:05 +00:00
David Wengier cdcef8e730 Force "Insert Spaces" to be true for Razor documents 2024-08-26 12:59:55 +10:00
David Wengier aeca1e4a27 Don't crash because another team has a bad assumption 2024-08-26 12:59:41 +10:00
dotnet-maestro[bot] 286b3e180f Failed to perform coherency update for one or more dependencies. 2024-08-25 12:03:40 +00:00
dotnet-maestro[bot] e841c0e5ee Update dependencies from https://github.com/dotnet/arcade build 20240823.2
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 9.0.0-beta.24421.7 -> To Version 9.0.0-beta.24423.2
2024-08-24 12:41:50 +00:00
David Barbet b5e50df997
[release/dev17.11] Update dependencies from dotnet/arcade (#10552)
This pull request updates the following dependencies

[marker]: <> (Begin:aa7f5ce7-ed24-46a1-195c-08dc952fc8a2)
## From https://github.com/dotnet/arcade
- **Subscription**: aa7f5ce7-ed24-46a1-195c-08dc952fc8a2
- **Build**: 20240821.4
- **Date Produced**: August 21, 2024 6:41:26 PM UTC
- **Commit**: 4460b755f3c7c89e9660d9580ff79afc4218dd85
- **Branch**: refs/heads/release/8.0

[DependencyUpdate]: <> (Begin)

- **Updates**:
- **Microsoft.SourceBuild.Intermediate.arcade**: [from
8.0.0-beta.24413.2 to 8.0.0-beta.24421.4][44]
- **Microsoft.DotNet.Arcade.Sdk**: [from 8.0.0-beta.24413.2 to
8.0.0-beta.24421.4][44]

[44]: 51321b7e15...4460b755f3

[DependencyUpdate]: <> (End)


[marker]: <> (End:aa7f5ce7-ed24-46a1-195c-08dc952fc8a2)
2024-08-23 10:32:18 -07:00
dotnet-maestro[bot] 79d0c3ca94 Failed to perform coherency update for one or more dependencies. 2024-08-23 12:13:16 +00:00
David Wengier 2157169d4d More PR feedback 2024-08-23 16:24:43 +10:00
David Wengier 3b7942872b Merge remote-tracking branch 'upstream/main' into FormattingLayering 2024-08-23 16:10:44 +10:00
David Wengier 6622a0f979 Missed the readonly bit 2024-08-23 13:53:55 +10:00
David Wengier 587e72a2f2 Simple PR feedback 2024-08-23 13:41:24 +10:00
David Barbet d031cc6ecc
Merge branch 'main' into darc-main-a925341a-a0ef-49f7-bc6e-6525c5d13555 2024-08-22 16:00:20 -07:00
David Wengier 4124ce4370 Remove unused parameter 2024-08-23 07:05:50 +10:00
Dustin Campbell 3423142c7d
Remove ItemCollection from CodeRenderingContext (#10764)
Because of a dare from @333fred, I'm currently on a crusade to remove
`ItemCollection` from the Razor Compiler completely. Previously, I
removed `ItemCollection` from `TagHelperDescriptorProviderContext`
(#10720). This time, I'm removing it from `CodeRenderingContext`.

It turns out that every `CodeRenderingContext` greedily creates an
`ItemCollection`, though there are only ever two things stored there:

1. A string to use for new lines in `CodeWriter`.
2. A string representing "suppress IDs", which is already specified in
`RazorCodeGenerationOptions`.

These two items were really present as a hook that compiler tests could
set. However, it's much easier and less wasteful to elevate both items
to `RazorCodeGenerationOptions` and make tests set the options directly.

I made a few other refactorings as part of this change:

- I merged several abstract base classes with their single default
concrete type:
  - `CodeRenderingContext` and `DefaultCodeRenderingContext`
  - `RazorCSharpDocument` and `DefaultRazorCSharpDocument`,
  - `RazorCodeGenerationOptions` and `DefaultRazorCodeGenerationOptions`
- `RazorCodeGenerationOptionsBuilder` and
`DefaultRazorCodeGenerationOptionsBuilder`.
- Reworked `RazorCodeGenerationOptions` and introduced
`RazorCodeGenerationOptionsFlags` to track its boolean fields.
- Cleaned up `RazorCSharpDocument` and unified its collections on
`ImmutableArray<>` rather than `IReadOnlyList<>`.
- Enabled nullability annotations for several types.
- Used more pooled collections in `CodeRenderingContext`.

Note: I was careful with my commit history, and it should be clean
enough to review commit-by-commit if that's your preference.
2024-08-22 13:53:35 -07:00
dotnet-maestro[bot] 6970dee518 Update dependencies from https://github.com/dotnet/arcade build 20240821.4
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 8.0.0-beta.24413.2 -> To Version 8.0.0-beta.24421.4
2024-08-22 13:05:55 +00:00
dotnet-maestro[bot] ec191f808a Update dependencies from https://github.com/dotnet/arcade build 20240821.7
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 9.0.0-beta.24421.2 -> To Version 9.0.0-beta.24421.7
2024-08-22 12:43:45 +00:00
David Wengier 3b2ba30db1 We can't tell the client which version we're applying edits for, because only we understand our version numbers 2024-08-22 22:18:39 +10:00
David Wengier fa4e8efb54 Remove FormattingResult since it's now useless 2024-08-22 17:02:20 +10:00
David Wengier 5caa48f8e3 Remove Kind property from FormattingResult
This was only used for validation as edits pass through the pipeline, but since we now tightly control the pipeline its unnecessary
2024-08-22 16:44:17 +10:00
David Wengier 45b8495ac8 List -> PooledArrayBuilder 2024-08-22 16:13:45 +10:00
David Wengier ef44f4fe61 Separate out the files in the Html formatter passes.
Doing this separately, and purely mechanically, so make review easier
2024-08-22 15:12:55 +10:00
David Wengier f74150db38 Separate html formatting passes, so we can remove the IsFormatOnType flag 2024-08-22 15:12:12 +10:00
David Wengier 6f1c6ef398 Remove unnecessary base class 2024-08-22 14:43:59 +10:00
David Wengier 4e1211718a Move files to their own folder 2024-08-22 12:31:10 +10:00
David Wengier d6357548f3 Be explicit about formatting passes
Always felt like a huge potential bug farm. eg, if Html ended up not being first we'd have bugs, working out the Order property (which was weirdly backwards?) was a pain, and the entire formatting engine produces horrible results if the ordering changes anyway.
2024-08-22 12:30:40 +10:00
David Wengier 2165fcb0c4 One last minor cleanup 2024-08-22 10:48:10 +10:00
David Wengier 114390078e Formalize Razor formatting options so we can have a single RazorFormattingPass 2024-08-22 09:13:11 +10:00
dotnet-maestro[bot] ceb06132c1 Update dependencies from https://github.com/dotnet/arcade build 20240821.2
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 9.0.0-beta.24420.6 -> To Version 9.0.0-beta.24421.2
2024-08-21 18:17:13 +00:00
dotnet-maestro[bot] 3458abac8b Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20240819.1
Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 10.0.0-alpha.1.24415.3 -> To Version 10.0.0-alpha.1.24419.1
2024-08-21 18:16:42 +00:00
dotnet-maestro[bot] a9eaef6edd Update dependencies from https://github.com/dotnet/arcade build 20240820.6
Microsoft.SourceBuild.Intermediate.arcade , Microsoft.DotNet.Arcade.Sdk
 From Version 9.0.0-beta.24416.2 -> To Version 9.0.0-beta.24420.6
2024-08-21 12:46:59 +00:00
David Wengier ca142becdc Move HtmlFormattingPass down 2024-08-21 22:09:14 +10:00
David Wengier 38868db9c2 Minor cleanup 2024-08-21 21:57:43 +10:00
David Wengier 3f578100fe Get HtmlFormatter from DI 2024-08-21 21:41:37 +10:00
David Wengier e56b85e264 Pass Html edits into the formatting service, so that the service doesn't need LSP client dependencies 2024-08-21 21:26:18 +10:00
David Wengier b477b4a75b Merge remote-tracking branch 'upstream/main' into dev/dawengie/SelfVersionedDocumentSnapshots
# Conflicts:
#	src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/ProjectSystem/DocumentContextExtensions.cs
2024-08-21 20:44:49 +10:00
dotnet bot fc8332fdd7
Merge release/dev17.12 to main (#10774)
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-21 02:32:14 -07:00
dotnet bot d7c7a32b2b
Merge release/dev17.11 to release/dev17.12 (#10767)
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-21 02:01:04 -07:00
David Wengier a7027160ac Be SUPER specific about our APIs, what they accept, and what they return
This probably looks like overkill, but hopefully the next commit will help explain a little about what is going on.
2024-08-21 17:11:28 +10:00
David Wengier e45f09468d Make it more explicit that we only do code action formatting for C# 2024-08-21 16:25:41 +10:00
David Wengier 2c39c207c7 Random bits of cleanup before some bigger moves 2024-08-21 16:01:18 +10:00
David Wengier fba3f1e304 Rename some methods 2024-08-21 14:55:51 +10:00
David Wengier 8984db9496 Combine back into one on type formatting pass 2024-08-21 14:29:29 +10:00