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

13105 Коммитов

Автор SHA1 Сообщение Дата
Phil Allen 790c2a142d
Combine the MSN Htmls so we have one 'large' test contents (#9757) 2024-01-09 10:44:24 -08:00
Dustin Campbell 9c3deecf95 Remove a couple of unused string resources from MS.ANC.Razor.Serialization.Json 2024-01-09 09:20:38 -08:00
Dustin Campbell 0f3b3cee1b Fix misspelling of 'Serialization' 2024-01-09 09:14:13 -08:00
Dustin Campbell 99aafa38b3 Add MS.ANC.Razor.Serialization.Json to Razor.Slim.slnf 2024-01-09 09:06:12 -08:00
Dustin Campbell 99caee64cb Remove unused string resources from MS.ANC.Razor.ProjectEngineHost 2024-01-09 09:01:30 -08:00
Dustin Campbell c95fe8c7c5 Revert unintended blank line removal 2024-01-09 08:44:28 -08:00
Dustin Campbell a5d7f99e85 Move JSON serialization into shared project
JSON.NET is no longer used by the majority of Razor product code. The
only components that use NewtonSoft.Json are LiveShare, benchmarks, and
the testing infrastructure. So, I've moved the JSON serialization
support code into a shared project that is linked into the appropriate
places, rather than compiled into `ProjectEngineHost`.
2024-01-08 14:47:42 -08:00
David Wengier dc75ec6b22
Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2347941 (#9791) 2024-01-09 09:17:43 +11:00
dotnet bot 2a7d9afbe0 Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2347941 2024-01-08 20:15:07 +01:00
David Barbet b5050e27d5
Update PublishData.json after VS 17.10 snap (#9790)
### Summary of the changes

-

Fixes:
2024-01-08 11:02:46 -08:00
David Barbet 51efabfdd4
Update PublishData.json 2024-01-08 10:38:24 -08:00
David Wengier 55551d6d91
Merge Cohost feature branch into main (#9786)
Part of https://github.com/dotnet/razor/issues/9519

Now that the initial cohost PR has been merged, we don't need to use the
feature branch any more. That means this PR, which is big, but all of
the code in it has been reviewed, in
https://github.com/dotnet/razor/pull/9761,
https://github.com/dotnet/razor/pull/9766 and
https://github.com/dotnet/razor/pull/9767.
2024-01-05 13:42:17 +11:00
Andrew Hall dbc2fa8671
Update to latest mapcode contract (#9770)
Razor equivalent of dotnet/roslyn#71415

cc @genlu @zkat
2024-01-04 17:05:47 -08:00
Alex Gavrilov 1b58827d9a
Check line position validity (#9776)
* Check line position validity before trying to resolve it as source position

* Fix character position check. We do get requests for position at the very end of the line, e.g. position 0 on an empty line, so we need to have stringly "greater than" for character position check.

* Missed $ in front of string that was meant to be interpolated

* CR feedback, duplicate code removal, correcting unit tests

* Adding Debug.Fail to improve issue visibility

* Update src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Extensions/PositionExtensions.cs

CR feedback

Co-authored-by: David Wengier <david.wengier@microsoft.com>

---------

Co-authored-by: David Wengier <david.wengier@microsoft.com>
2024-01-04 21:33:51 +00:00
David Wengier 1f6d05d73c Merge remote-tracking branch 'upstream/main' into features/cohost 2024-01-04 15:55:18 +11:00
David Wengier 13d3145dc9
Initial cohost server implementation (#9674)
First part of https://github.com/dotnet/razor/issues/9519
Razor side of https://github.com/dotnet/roslyn/pull/70819

This PR consumes the new Cohost server from Roslyn, and when enabled,
moves DocumentColor requests from being handled by our existing Razor
Language Server, to instead be handled by the new server. There is
currently no sharing of project system data or anything like that yet. A
few TODOs for follow ups, ~can't be merged, and indeed won't build,
until a Roslyn package is available etc. but~ it's reviewable while we
keep working, and more important its shippable in its "off" state.

~Ignore the last commit, obviously won't be merged :)~
2024-01-04 15:43:47 +11:00
David Wengier 463f86989b Fix merge 2024-01-04 15:20:49 +11:00
David Wengier 90fe324cd1 Merge remote-tracking branch 'upstream/main' into features/cohost 2024-01-04 15:16:59 +11:00
David Wengier 82356ebac7
Merge branch 'main' into RoslynCohost 2024-01-04 15:09:14 +11:00
Dustin Campbell 376aca3029
Break ProjectState and DocumentState dependency on HostWorkspaceServices (#9704)
While working to rationalize the various MEF and other DI containers in
the code base, I found that there was a dependency within `ProjectState`
and `DocumentState` on Roslyn workspace services. Really, only
`ProjectState` used the Roslyn `HostWorkspaceServices`, and it only used
it for a single service. So, the dependency can be broken by just
passing that service directly into `ProjectState`.

In addition, I've cleaned up some nullability annotations. Here's a
summary of the nullability changes and changes to invariants:

* `ProjectState` is now annotated for nullability. While doing this, I
decide to make it an invariant that `ProjectState` can never hold a null
`ProjectWorkspaceState`. Instead, if not provided a
`ProjectWorkspaceState`, it'll be created with
`ProjectWorkspaceState.Default`.
* `IProjectSnapshot.Configuration` and
`IProjectSnapshot.ProjectWorkspaceState` are now non-nullable.
* `RazorProjectInfo.Configuration` and
`RazorProjectInfo.ProjectWorkspaceState` are now non-nullable.
2024-01-03 17:28:14 -08:00
Dustin Campbell 74118ec90e Avoid making change that would require bumping the RazorProjectInfo serialization version 2024-01-03 16:17:48 -08:00
David Barbet 2b4e0e9ddc
[main] Update dependencies from dotnet/arcade (#9785)
This pull request updates the following dependencies

[marker]: <> (Begin:2907dbca-fa2e-42bc-f7dd-08dc0c5b4e6d)
## From https://github.com/dotnet/arcade
- **Subscription**: 2907dbca-fa2e-42bc-f7dd-08dc0c5b4e6d
- **Build**: 20231220.2
- **Date Produced**: December 20, 2023 12:15:53 PM UTC
- **Commit**: 84129325171e65373edef24019e1171feeb19cbc
- **Branch**: refs/heads/release/8.0

[DependencyUpdate]: <> (Begin)

- **Updates**:
- **Microsoft.DotNet.Arcade.Sdk**: [from 9.0.0-beta.23613.3 to
8.0.0-beta.23620.2][1]

[1]: b6349a217d...8412932517

[DependencyUpdate]: <> (End)


[marker]: <> (End:2907dbca-fa2e-42bc-f7dd-08dc0c5b4e6d)
2024-01-03 16:10:24 -08:00
Dustin Campbell 18efd32686 Stop passing HostWorkspaceServices into ProjectSnapshot 2024-01-03 15:57:08 -08:00
Dustin Campbell 2cc0521ca7 Add static ProjectWorkspaceState.Create methods 2024-01-03 15:57:08 -08:00
Dustin Campbell 56f68245c5 Make IProjectSnapshot.Configuration non-nullable 2024-01-03 15:57:08 -08:00
Dustin Campbell b1697fbca8 Make IProjectSnapshot.ProjectWorkspaceState non-nullable 2024-01-03 15:57:07 -08:00
Dustin Campbell 82db95abfd Add nullability annotations to ProjectState
While adding nullability annotations to ProjectState, I decided to make
the ProjectState.ProjectWorkspaceState property non-nullable. It turns
out that a newly created ProjectState *might* have a null
ProjectWorkspaceState. It did not appear to me that this was useful,
so I added the invariant that a ProjectState will *always* have
a non-null ProjectWorkspaceState. If none is provided when a
ProjectState is created it'll get the ProjectWorkspaceState.Default
instance.
2024-01-03 15:57:07 -08:00
Dustin Campbell 6a9c047fdf Remove unused DocumentState.Services property 2024-01-03 15:57:07 -08:00
David Barbet df525a50ed Revert xliff tasks to .net 8 arcade version compatible with source build 2024-01-03 15:06:37 -08:00
dotnet-maestro[bot] 33b74d7409 Update dependencies from https://github.com/dotnet/arcade build 20231220.2
Microsoft.DotNet.Arcade.Sdk
 From Version 9.0.0-beta.23613.3 -> To Version 8.0.0-beta.23620.2
2024-01-03 22:09:53 +00:00
dotnet bot 151bf01133
Merge release/dev17.9 to main (#9784)
This is an automatically generated pull request from release/dev17.9
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.9
- 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.9-to-main
git reset --hard upstream/main
git merge upstream/release/dev17.9
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.9-to-main --force
```
2024-01-03 22:27:25 +01:00
David Barbet df383360c3
Merge main into 17.9 (#9783)
### Summary of the changes
I'm an idiot and forgot to snap Razor as well yesterday. 
-

Fixes:
2024-01-03 11:12:45 -08:00
David Barbet bb15a3c234
Update configs for 17.10 snap (#9782)
### Summary of the changes
I'm an idiot and forgot to snap Razor as well yesterday. 

-

Fixes:
2024-01-03 11:10:31 -08:00
David Barbet 0092237acc Update configs for 17.10 snap 2024-01-03 10:36:20 -08:00
dotnet bot 8426ca45b1
Merge release/dev17.9 to main (#9781)
This is an automatically generated pull request from release/dev17.9
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.9
- 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.9-to-main
git reset --hard upstream/main
git merge upstream/release/dev17.9
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.9-to-main --force
```
2024-01-03 16:15:37 +01:00
Jared Parsons 9a33d4abef
Merge release/dev17.8 to release/dev17.9 (#9778)
This is an automatically generated pull request from release/dev17.8
into release/dev17.9.


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

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.8-to-release/dev17.9
git reset --hard upstream/release/dev17.9
git merge upstream/release/dev17.8
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.8-to-release/dev17.9 --force
```
2024-01-03 03:38:56 -08:00
David Wengier 82146978d4
Fix typo (#9779)
PR feedback from a merged PR
2024-01-03 13:23:17 +11:00
David Wengier dd99886c21 Typo 2024-01-03 11:48:35 +11:00
David Wengier 773cdb9089 Revert temporary 17.8 servicing changes 2024-01-03 11:10:10 +11:00
David Wengier 647af52d24 Merge remote-tracking branch 'upstream/release/dev17.8' into merges/release/dev17.8-to-release/dev17.9 2024-01-03 11:08:35 +11:00
David Wengier d135dd8d2e
Port #9601 to 17.8: Don't monitor the whole workspace for config files in Visual Studio (#9750)
Cherry picked the commits with no conflicts. Nice to get a straight
forward one.
2024-01-03 10:57:03 +11:00
David Wengier 50911ca83e Merge remote-tracking branch 'upstream/main' into features/cohost 2024-01-02 08:14:50 +11:00
David Wengier fb16802214
[main] Update dependencies from dotnet/source-build-reference-packages (#9775)
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**: 20231227.2
- **Date Produced**: December 27, 2023 10:37:05 AM UTC
- **Commit**: 2a008ae4f42c0db384db5a4864752b2ff52d720b
- **Branch**: refs/heads/main

[DependencyUpdate]: <> (Begin)

- **Updates**:
-
**Microsoft.SourceBuild.Intermediate.source-build-reference-packages**:
[from 9.0.0-alpha.1.23618.2 to 9.0.0-alpha.1.23627.2][1]

[1]:
c49c1f4e46...2a008ae4f4

[DependencyUpdate]: <> (End)


[marker]: <> (End:011df26a-fbd1-45b0-94b9-08db3601dcca)
2024-01-02 07:32:30 +11:00
dotnet-maestro[bot] e216e877b4 Update dependencies from https://github.com/dotnet/source-build-reference-packages build 20231227.2
Microsoft.SourceBuild.Intermediate.source-build-reference-packages
 From Version 9.0.0-alpha.1.23618.2 -> To Version 9.0.0-alpha.1.23627.2
2024-01-01 14:02:39 +00:00
David Wengier 82aa94010f
Move integration tests to .NET 8 (#9774)
Sort of fixes https://github.com/dotnet/razor/issues/9368 (but really i
think its just not necessary)

Integration test run is green:
https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=8856230&view=results
2023-12-30 10:25:04 +11:00
David Wengier 4f8b163b2e Change to a theory to avoid code duplication 2023-12-30 10:07:23 +11:00
David Wengier 4e79b8ea9f Make the whole line a parameter 2023-12-30 10:01:36 +11:00
David Wengier 54c0112748
Localized file check-in by OneLocBuild Task: Build definition ID 262: Build ID 2342399 (#9773) 2023-12-29 16:28:14 +11:00
David Wengier 2c86c1dc1a Expand multi-targeting tests 2023-12-29 15:36:30 +11:00
David Wengier 1e51491cf4 Move integration tests to .NET 8 2023-12-29 15:35:50 +11:00