All of the types MS.VS.LanguageServices.Razor elide "LanguageServices"
from their namespaces. So, each type has `Microsoft.VisualStudio.Razor`
its root namespace. These have been kept in sync by pure discipline
until this change.
This change updates the `<RootNamespace>` for
MS.VS.LanguageServices.Razor to not include "LanguageServices". That
way, new files in this project will be created with a root namespace of
`Microsoft.VisualStudio.Razor`. Normally, changing the `<RootNamespace>`
should be a painless process. However, it was blocked due to issues
caused by the MS.ANC.Razor.Serialization.Json shared project's embedded
string resources. I've gone ahead and sorted that so that updating the
`<RootNamespace>` is now possible.
All of the types MS.VS.LanguageServices.Razor elide "LanguageServices" from their namespaces. So, each type has `Microsoft.VisualStudio.Razor` its root namespace. These have been kept in sync by pure discipline until this change.
This change updates the `<RootNamespace>` for MS.VS.LanguageServices.Razor to not include "LanguageServices". That way, new files in this project will be created with a root namespace of `Microsoft.VisualStudio.Razor`. Normally, changing the `<RootNamespace>` should be a painless process. However, it was blocked due to issues caused by the MS.ANC.Razor.Serialization.Json shared project's embedded string resources. I've gone ahead and sorted that so that updating the `<RootNamespace>` is now possible.
I recommend reviewing this commit-by-commit.
I took a look at logging to address an integration test issue where we
should ignore any exceptions that occur during logging because xUnit's
`ITestOutputHelper` is no longer available. Previously, we had swallowed
these exceptions across all unit tests as well. However, in unit tests,
these exceptions can be an early warning sign of other problems.
While addressing integration tests, I ended up taking a more thorough
look at logging and ended up re-implementing the log message formatting
to reduce string allocations. In addition, I cleaned up a fair number of
redundant "no-op" loggers and did an audit of all ILoggerProviders to
determine which ones needed to implement IDisposable.
Having two sln files in the root directory means that `dotnet` CLI commands get confused about what sln to use and need to have it specified. To fix, we just move this solution file into eng, since it's only used for full builds anyways.
Requires https://github.com/dotnet/roslyn/pull/74280, and won't even
compile without it.
Part of https://github.com/dotnet/razor/issues/9519
This brings signature help to Cohosting. It's a pretty simply PR, for a
pretty simple endpoint, as we just delegate, and there is no translation
of delegated info. The interesting part here is that we use
`System.Text.Json` for the remote signature help service, because it
makes more sense to take advantage of the existing Json converters for
the potential complexity of the `SignatureHelp` result type.
We have tests with baselines that have trailing whitespaces. Our `trimTrailingWhitespace` setting means that those will get modified automatically, breaking those tests. To fix that, I implemented a vscode feature to avoid triming inside regex and strings, so let's use that.
This is an automatically generated pull request from release/dev17.11
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.11
- 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.11-to-main
git reset --hard upstream/main
git merge upstream/release/dev17.11
# Fix merge conflicts
git commit
git push upstream merges/release/dev17.11-to-main --force
```
This change adds a new `GetPooledArraySpan(...)` extension method that
returns a pooled array as a `Span<T>` with the expected length. This can
help avoid bugs that can occur if a pooled array's `Length` is
accidental used.
While adding a new ILoggerProvider for integration tests that ignores messages sent after the output is invalid, I noticed a bunch of things to clean up. Importantly, Razor's ILoggerProvider no longer implements IDisposable as the MS.Extensions.Logging version does.