Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify nint and IntPtr #60913

Merged
merged 15 commits into from
May 18, 2022
Merged

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented Apr 22, 2022

Test plan #60578

Filed #61262 (issue with CorLibrary sometimes being left null)

For reference, the test hook is based off the initial one from DIM (#17927)

Public APIs:

  • from offline discussion, CreateNativeIntegerTypeSymbol returns System.IntPtr/System.UIntPtr (without wrapping) when then runtime feature flag is present
  • IsNativeInteger returns true for System.IntPtr/System.UIntPtr when the runtime feature flag is present. From looking at IDE code, that is the most desirable behavior.

I've reviewed the IDE code using the IsNativeInteger API and concluded that we should keep that public API returning true whenever the type is nint/nuint as doc'ed.

I can't easily add IDE tests yet since we're lacking an appropriate BCL, but did some manual IDE validation with a hard-coded compiler. QuickInfo, UseExplicitType and ExtractMethod are looking good (show nint).
image
image

@jcouv jcouv force-pushed the numeric-intptr branch 2 times, most recently from cc1357e to 435314d Compare April 26, 2022 18:22
@jcouv jcouv force-pushed the numeric-intptr branch 2 times, most recently from eea9e6b to 06d70d4 Compare May 8, 2022 05:41
@jcouv jcouv force-pushed the numeric-intptr branch from 5bc82fe to bb5a4bb Compare May 13, 2022 03:45
/// </summary>
internal virtual bool IsNativeIntegerType => false;
internal virtual bool IsNativeIntegerWrapperType => false;
Copy link
Member Author

@jcouv jcouv May 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 This internal API was just renamed (no change of behavior). The new API below will be renamed to IsNativeInteger after this PR is reviewed, but I wanted to leave distinct names to help with review.


namespace Microsoft.CodeAnalysis.CSharp.UnitTests.Semantics;

public class NumericIntPtrTests : CSharpTestBase
Copy link
Member Author

@jcouv jcouv May 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Sorry for the large chunk of tests. Note that commit 1 sets of baseline for this file using the old NativeIntegerTests, so changes in behavior are more apparent.
I've removed a few tests that didn't seem to add much value in new world. Test additions are at the end of the file.

Conversions(), BinaryOperators() and StandardConversions() are main tests of interest.

@jcouv jcouv marked this pull request as ready for review May 13, 2022 06:10
@jcouv jcouv requested a review from a team as a code owner May 13, 2022 06:10
@jcouv jcouv added this to the 17.3 milestone May 13, 2022
@tannergooding
Copy link
Member

I can't easily add IDE tests yet since we're lacking an appropriate BCL, but did some manual IDE validation with a hard-coded compiler

@jcouv, do you need us to push the runtime feature flag in sooner? We should be able to take the PR to add it nearly anytime.

@cston
Copy link
Member

cston commented May 16, 2022

    };

Indent, these array elements and others below?


In reply to: 1128211701


In reply to: 1128211701


Refers to: src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs:6290 in c3344a1. [](commit_id = c3344a1, deletion_comment = False)

@cston
Copy link
Member

cston commented May 16, 2022

static void Main()

Should these use System.IntPtr rather than nint, for consistency with the tests that follow?


In reply to: 1128214297


Refers to: src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs:7375 in 06df1b7. [](commit_id = 06df1b7, deletion_comment = False)

@jcouv
Copy link
Member Author

jcouv commented May 16, 2022

    };

I took another pass at indentation. Hopefully should be okay now.


In reply to: 1128211701


Refers to: src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs:6290 in c3344a1. [](commit_id = c3344a1, deletion_comment = False)

@cston
Copy link
Member

cston commented May 16, 2022

    public void NativeIntegerAttributeFromMetadata()

What are we testing in this case? (It looks like we won't emit a NativeIntegerAttribute because the compilations are compiled with the feature enabled.)


In reply to: 1128220752


Refers to: src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs:9895 in 06df1b7. [](commit_id = 06df1b7, deletion_comment = False)

@cston
Copy link
Member

cston commented May 16, 2022

}

Please include a nested type.


In reply to: 1128221461


Refers to: src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs:10154 in 06df1b7. [](commit_id = 06df1b7, deletion_comment = False)

@jcouv
Copy link
Member Author

jcouv commented May 16, 2022

static void Main()

Given that we have tests that establish that nint and System.IntPtr are literally the same symbol, I don't think we need to have all the flavors of the permutations for the tests


In reply to: 1128214297


Refers to: src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs:7375 in 06df1b7. [](commit_id = 06df1b7, deletion_comment = False)

@jcouv
Copy link
Member Author

jcouv commented May 16, 2022

    public void NativeIntegerAttributeFromMetadata()

Fixed. The first compilation should emit the attributes


In reply to: 1128220752


Refers to: src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs:9895 in 06df1b7. [](commit_id = 06df1b7, deletion_comment = False)

{
// CorLibrary should never be null, but that invariant is broken in some cases for MissingAssemblySymbol.
// Tracked by https://github.com/dotnet/roslyn/issues/61262
return CorLibrary?.RuntimeSupportsNumericIntPtr == true;
Copy link
Contributor

@AlekseyTs AlekseyTs May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RuntimeSupportsNumericIntPtr

Could this access and the one below go into an infinite loop when the current assembly is the CorLibrary? #Resolved

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. If CorLibrary is available, then we'll call MetadataOrSourceAssemblySymbol.RuntimeSupportsNumericIntPtr. If it's missing then we'll call MissingCorLibrarySymbol.RuntimeSupportsNumericIntPtr.

FWIW, I followed the same test hook pattern from DIM: #17927

@@ -581,8 +582,8 @@ public static bool TryGetElementTypesWithAnnotationsIfTupleType(this TypeSymbol
case SpecialType.System_UInt32:
case SpecialType.System_Int64:
case SpecialType.System_UInt64:
case SpecialType.System_IntPtr when type.IsNativeIntegerType:
case SpecialType.System_UIntPtr when type.IsNativeIntegerType:
case SpecialType.System_IntPtr when type.IsNativeIntegerOrNumericIntPtrOrNullableThereof():
Copy link
Contributor

@AlekseyTs AlekseyTs May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IsNativeIntegerOrNumericIntPtrOrNullableThereof

Why use nullable helper here? #Resolved

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary. I'll simplify

@@ -1151,7 +1152,7 @@ public static bool ContainsDynamic(this TypeSymbol type)

internal static bool ContainsNativeInteger(this TypeSymbol type)
Copy link
Contributor

@AlekseyTs AlekseyTs May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ContainsNativeInteger

Perhaps helpers like this one should be renamed too in order to avoid confusion? #Resolved

@AlekseyTs
Copy link
Contributor

Done with review pass (commit 10), tests are not looked at.

@jcouv
Copy link
Member Author

jcouv commented May 17, 2022

@RikkiGibson for second review. Thanks

Copy link
Contributor

@RikkiGibson RikkiGibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have looked at everything except NumericIntPtrTests. Will review that shortly. Didn't find any significant issues.

@@ -479,7 +479,7 @@ private NamedTypeSymbol GetDeclaredBaseType(bool skipTransformsIfNecessary)

var moduleSymbol = ContainingPEModule;
TypeSymbol decodedType = DynamicTypeDecoder.TransformType(baseType, 0, _handle, moduleSymbol);
decodedType = NativeIntegerTypeDecoder.TransformType(decodedType, _handle, moduleSymbol);
decodedType = NativeIntegerTypeDecoder.TransformType(decodedType, _handle, moduleSymbol, this);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused by this. Are we using the current type as the containing type of the base type?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, base type would make more sense

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, base type would make more sense

Should it be the containing type perhaps null, instead? In short, do we need to protect against a cycle when transforming a nested type?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chuck corrected both of us. It should be the containing type ;-)

@@ -25,8 +25,9 @@ internal sealed class NativeIntegerTypeSymbol : WrappedNamedTypeSymbol
internal NativeIntegerTypeSymbol(NamedTypeSymbol underlyingType) : base(underlyingType, tupleData: null)
{
Debug.Assert(underlyingType.TupleData is null);
Debug.Assert(!underlyingType.IsNativeIntegerType);
Debug.Assert(!underlyingType.IsNativeIntegerTypeOrNumericIntPtr);
Copy link
Contributor

@RikkiGibson RikkiGibson May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider adjusting the name or doc comment on the NativeIntegerTypeSymbol to indicate this type is only used when the numeric IntPtr feature is not available. #Resolved

// Note: we use skipUsesIsNullable and skipExtraValidation so that nobody pulls
// on the compilation or its references before we set the RuntimeSupportsNumericIntPtr flag.
var comp = CreateCompilationCore(source, references, options, parseOptions, assemblyName, sourceFileName, skipUsesIsNullable: true, experimentalFeature: null, skipExtraValidation: true);
comp.Assembly.RuntimeSupportsNumericIntPtr = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mentioned DIMs used a similar solution here for testing. I wondered why we didn't just declare the RuntimeFeature type ourselves with the members present that indicate the feature is supported? Do you know?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RuntimeFeature is not just a well-known type, it's a special type. So it must be in corlib along with object. That makes it hard to inject into a compilation.

@@ -13,6 +13,8 @@

namespace Microsoft.CodeAnalysis.CSharp.Symbols
{
// Note: this wrapper is only used on platforms where System.IntPtr isn't considered
Copy link
Member

@cston cston May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// Note: this wrapper

Consider changing to /// <remarks>This wrapper ....

@jcouv jcouv merged commit 1814273 into dotnet:features/numeric-intptr May 18, 2022
@jcouv jcouv deleted the numeric-intptr branch May 18, 2022 04:01
Cosifne added a commit that referenced this pull request Jun 1, 2022
* Avoid caching RelativeIndentationData.effectiveBaseToken

* Relax assertion in SyntheticBoundNodeFactory.Convert (#61287)

* Add missing node state transition

It's valid for an input to be modified causing a downstream input to be removed (for example a syntax tree can change what is in it, leading to the downstream node not generating something). 

//cc @jkoritzinsky in case I'm missing something obvious.

* Simplify logic, more tests, rework tests

* Fix several LSP completion kind mappings (#61243)

* Fix several LSP completion kind mappings

* Extension method

* Fix issue where we were getting a raw-string in a skipped token, causing a crash

* Add test

* Add an UWP OptProf test for IDE

* Disable smart copy/paste when line-copy is involved.

* Update src/EditorFeatures/CSharp/StringCopyPaste/StringCopyPasteCommandHandler.cs

* Add additional sanity check

* Fix

* Add pointer for `AnalysisLevel` to warning waves doc (#61196)

* Remove parameter null-checking from the Language Feature Status list (#61302)

* Switch to GetRequiredService

* Simpler approach

* [EE] Implement IDkmClrFullNameProvider2 in Roslyn's ResultProvider Formatter. (#60522)

* Implement IDkmClrFullNameProvider2 in Roslyn's ResultProvider Formatter.

Issue:
- Debugger added IDkmClrFullNameProvider2 API with https://devdiv.visualstudio.com/DevDiv/_git/Concord/pullrequest/301518
- It is currently temporarily implement in Concord, needs to be implemented in Roslyn so implementation can be removed from Concord.

Changes:
1. Formatter:
- Implement IDkmClrFullNameProvider2. It has 2 methods, one to format local names and the other given field metadata.
- Currently only implemented for C#. I'm not that familiar with VB and the GeneratedNames stuff in VB needs some splitting and moving around to get working.

2. Unit tests:
- Add unit tests for the common cases of hoisted locals, synthesized locals, etc.

3. Versions.props:
Update MicrosoftVSSDKVSDConfigToolVersion to a newer version which recognizes IDkmClrFullNameProvider2.

* PR feedback - fix casing of MetadataImport

* PR feedback - move GetOriginalLocalVariableName, GetOriginalFieldName back to CSharpFormatter

Co-authored-by: Ramkumar Ramesh <ramram@microsoft.com>

* PR feedback

* Fix and/or completion after parenthesized pattern

* [LSP] Disable GoToDef/GoToImpl integration tests  (#61190)

* Added syntax context flag

* Keywords c#

* Keep leadin trivia inside Main method if it is more likely to be a statement comment rather than a file header when converting to 'Program.Main' style program

* Symbols

* Snippets C#

* Remove set accessor of new SyntaxContext property

* Remove PROTOTYPE comments (#61322)

* Added assertions, comments, and refactored for clarity

* Change VB language version Roslyn.sln uses to "latest" (#61313)

To allow us to use the latest VB features, such as setting init-only properties.

* PR feedback

* Remove document options provider (#61228)

* Remove IDocumentOptionsProvider

* Fold DocumentSpecificOptionSet into DocumentOptionSet

* Use an explicit option to control frozen-partial semantics in inheritance margin

* Break into separate methods

* Fix null ref (#61342)

* Simplify internal types search

* Removed unintentional WorkItem's

* Make static

* PR feedback

* [LSP] Support LSP services associated with LSP server instances (with lifetimes that match). (#61266)

* Add support for exporting services that are created for each server
instance.

* Use the correct span to rename after invoking extract-method manually.

* Move Spellcheck capabilities to be activated in all scenarios (#61366)

* move spellcheck capability to always activated server

* Rename type

* rename fields

* [LSP] Add JSON semantic token classifications (#61231)

* Make async

* Test fallout

* Unify nint and IntPtr (#60913)

* restore file

* Minor simplification to rename code

* Remaining fallback options (#60888)

* Add missing fallbacks

* Fallback options from ILegacyGlobalOptionsWorkspaceService

* Pass options to CodeCleaner APIs.

* Fallback options from ILegacyGlobalOptionsWorkspaceService 2

* Fallback in tests

* CodeModel

* Remove CodeActionOptions.Default

* Remove dependency on IGlobalOptionService from inline hints service

* Remove obsolete VS UnitTesting APIs.

* Remote dependency on IGlobalOption service from RemoteProcessTelemetryService

* Remove ExportGlobalOptionProviderAttribute

* Remove PythiaOptions

* Remove DiagnosticOptions from solution snapshot

* Access options via AnalyzerOptionsProvider

* Split ISyntaxFormatting.cs

* Simplify initializers

* Fix

* Move AddImportPlacementOptions to a separate file in compiler extensions

* Move option providers to workspace extensions

* Move CodeCleanupOptions and IdeAnalyzerOptions to workspace extensions

* Layering

* Replace legacy GetOptions with AnalyzerOptionsProvider; add missing options

* Parameter rename, comment

* Add LineFormattingOptionsProviders

* CodeFixOptionsProvider, include CodeStyleOptions in CodeActionOptions, include LineFormattingOptions in ExtractMethodGenerationOptions

* DocumentFormattingOptions

* Move a couple of options from IdeCodeStyle to SyntaxFormatting to make them available to new document formatter

* Generalize using placement option in AddImportPlacementOptions

* Move PreferParameterNullChecking and AllowEmbeddedStatementsOnSameLine to CSharpSimplifierOptions

* Move CodeGen options to compiler extensions

* UseExpressionBody

* Eliminate more calls to Document.GetOptionsAsync

* Cleanup DocumentationCommentOptions

* Line formatting options

* DefaultConditionalExpressionWrappingLength

* insert_final_newline

* Add PreferThrowExpression to simplifier options

* Add AddNullChecksToConstructorsGeneratedFromMembers to CodeGenOptions

* GenerateEqualsAndGetHashCodeFromMembersOptions

* IImplementInterfaceService

* AddParameterCheckCodeRefactoringProvider

* ReplaceMethodWithPropertyService

* NamingStylePreferences

* Eliminate legacy option helpers

* Fix up ExtractMethod options

* Remove SyntaxFormattingOptions ctors

* Replace extra helpers with CodeFixOptionsProvider

* PreferUtf8StringLiterals

* RazorLineFormattingOptionsStorage

* Remove usage of Document.GetOptionsAsync - 1

* Remove internal usage of DocumentOptionSet and Document.GetOptionsAsync

* Simplify and unify option definition patterns

* Fixes and pattern unification

* Serialization and equality

* Simplify

* Rename

* Fixes

* CompletionOption fixes

* Feedback

* Single switch

* Add frozen delegate tests

* Add extract method test

* Add workitem

* Fix

* Add support for CompilerFeatureRequiredAttribute (#61113)

Adds support for decoding and reporting errors when `CompilerFeatureRequiredAttribute` is encountered on metadata type symbols. We also block applying the attribute by hand in both C# and VB.

* Delegate keyword tests

* Verifying interpolation escaping of curlies in content (#61387)

* Verify classification on var pattern (#61376)

* Add lambda parameters in scope in nameof using proper binder (#61382)

* Parse `unchecked` gracefully in operators (#61309)

* Update src/Features/Core/Portable/InheritanceMargin/AbstractInheritanceMarginService_Helpers.cs

* Update src/Features/Core/Portable/InheritanceMargin/AbstractInheritanceMarginService_Helpers.cs

* Use AspNetCoreKey to external access assembly

* Fix typo (#61380)

* Add new collapsing option for metadata files that contain source (#61205)

* More correctly respect background analysis scope (#61392)

* Fix function id (#61400)

* Wait for async operations to complete before proceeding

* Update SDK to .NET 7 Preview 4

* Avoid logging work when no logger is specified

* Emit CompilerFeatureRequired for ref structs when present.

* Support emitting CompilerFeatureRequiredAttribute for contructors of types with required members.

* [LSP] Small cleanup for pull diagnostics logging (#61417)

* Small logging cleanup on pull diagnostics code

* Update tests to account for lsp diagnostics throwing when mismatch in diagnostic mode

* Address feedback from numeric IntPtr feature review (#61418)

* Fix binding for checkbox text in rename dialogs (#61430)

Previously text was bound to properties on the control type using x:Name. This restores that

* Fix build

* Restrict IsGenericConstraintContext for C#

* More instrumentation for ReferenceCachingCS (#61402)

* Do not filter snippets

* Reverted delegate completion

* Allow source link, embedded or decompiled source in Peek Definition (#61427)

* Update status for DIM and numeric IntPtr (#61464)

* Lazily produce semantic models in source generators

* Remove unnecessary finalizer state handling from MethodToStateMachineRewriter (#61409)

* Update src/Tools/IdeCoreBenchmarks/IncrementalSourceGeneratorBenchmarks.cs

* Update src/Tools/IdeCoreBenchmarks/IncrementalSourceGeneratorBenchmarks.cs

* Update src/Tools/IdeCoreBenchmarks/IncrementalSourceGeneratorBenchmarks.cs

* lint

* Address prototype comments (#61436)

* Give a warning when obsolete is applied to a required member and the containing context is not obsolete, or all constructors are not obsolete/setsrequiredmembers.

* Restore nullable constructor warnings for constructors with `SetsRequiredMembersAttribute`.

* Remove prototype comments.

* Add tests and extra state

* Extract checking for generic constraint context to extension method & minor refactoring

* Update test comment

* Generate single OptProf config for compiler vsix

Currently OptProf can't support profiling for multiple flavors of vsix, and Optprof test only runs on X64. Multiple configs with same profiling binary are causing the tests to fail.

* Reduce release/64 limit for EndToEndTests.Constraints (#61480)

* Reduce release/64 limit for EndToEndTests.Constraints

* Lower bar more

* Lower bar more

* Remove parameter nullchecking feature (#61397)

* Fix null ref for JS files (#61472)

* Add file paths to interactive buffers and documents to support LSP requests (#61441)

* Add file paths to interactive buffers and documents to support LSP requests

* Switch to false returning predicate

* more feedback

* mroe feedback

* Reword comment

* Log additional information from CopyRefAssembly (#61384)

* update versioning to use languageserver.client.implementation

* Require VS 17.0 in signed build.

* Bump LSP protocol version (#61494)

* Bump protocol version

* React to breaking changes in foldingrangekind

* Disable inheritance margin for interactive documents (#61476)

* fix

* Improvements to the background compiler component

* add docs

* Simplify

* docs

* Check token

* Simplify

* Simplify

* Rename enum field

* Lifted relational operator implies operands non-null when true (#61403)

* Use ImmutableArray instead of IEnumerable parameters

* Use assignabiilty instead of subclass test in extension loader

* Fix test

* Fix test

* Simplify rename implementation

* Rename

* Unify all end operations that rename performs

* restore code

* Remove unnecessary code'

* Unify error handling in rename

* Add comment

* message severities

* Restore

* Simplify

* Bring main-vs-deps back (#61514)

* Add main-vs-deps back

* Update eng/config/PublishData.json

Co-authored-by: Joey Robichaud <joseph.robichaud@microsoft.com>

Co-authored-by: Joey Robichaud <joseph.robichaud@microsoft.com>

* Simplify LSP reference update

* Adjust conversion from nuint to float/double (#61345)

* Add embedded classification for field initializers

* Add support for properties

* Update src/EditorFeatures/Core/InlineRename/InlineRenameSession.cs

* Update src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.RenameTrackingCommitter.cs

* Update src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.RenameTrackingCommitter.cs

* Fix setup authoring bug (#61508)

* Expose VirtualChars to asp.net (through EA) to facilitate route classification

* add docs

* Add member

* NRT

* Make async

* Make async

* Pull token out

* Use feature attribute

* Remove Utf8StringLiteral conversion (#61481)

https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-04-18.md#target-typing-a-regular-string-literal-to-utf8-types

* Fix AbstractLanguageService constructor (#61513)

* Fix AbstractLanguageService constructor

* Fix formatting

* Don't throw in logging when the document path contains curly braces (#61524)

* Update unit tests

* Improve normalization to match idiomatic patterns for nested usings and fixed statements. (#61533)

* Better syntax normalization for fixed/using statements

* Add tests

* Prepare VB iterators for EnC support (#61488)

* Remove unused parameters

* Separate iterator finalizer states from resumable states.

* Remove unused

* Skip timing test (#61222)

* Skip test

* Add some APIs on AspNetCoreVirtualCharSequence

* Add IsDefault

* Final prototype comments and top level statements local adjustments (#61551)

Clean up the last of the prototype comments and adjust the parsing of locals named required in top level statements.

* IDE Support for Required Members (#61440)

* Add required keyword recommender.

* Add SyntaxNormalizer test.

* Code generation support.

* Add SymbolDisplay

* F1 help service and test fix.

* Add order modifier tests and update.

* Change natural type of UTF-8 string literals to `ReadOnlySpan<byte>` and null terminate the underlying blob. (#61532)

https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-04-18.md#natural-type-of-utf8-literals
https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-04-18.md#should-utf8-literals-be-null-terminated

Related to #61517
Closes #60644

* fix assumption of length

* Bind native integers in cref (#61431)

* Use VS2022 for PR Validation builds

* PR feedback

* Add unit test project IVT to ExternalAccess.AspNetCore

* Fix generation location when generating across files

* Add test

* Relax check

* EnC: Allow adding/removing await expressions and yield statements (#61356)

* Implements support for adding and removing await/yield return in C# async, iterator and async iterator methods.

* Fix syntax node associated with BoundTryStatement created from using syntax

* Update required members status (#61602)

* Implements support for adding and removing await/yield return in C# in the IDE (#61521)

Co-authored-by: Sam Harwell <Sam.Harwell@microsoft.com>
Co-authored-by: Julien Couvreur <jcouv@users.noreply.github.com>
Co-authored-by: Chris Sienkiewicz <chsienki@microsoft.com>
Co-authored-by: DoctorKrolic <mapmyp03@gmail.com>
Co-authored-by: Gen Lu <genlu@users.noreply.github.com>
Co-authored-by: DoctorKrolic <70431552+DoctorKrolic@users.noreply.github.com>
Co-authored-by: Cyrus Najmabadi <cyrusn@microsoft.com>
Co-authored-by: gel@microsoft.com <gel@microsoft.com>
Co-authored-by: CyrusNajmabadi <cyrus.najmabadi@gmail.com>
Co-authored-by: dotnet bot <dotnet-bot@dotnetfoundation.org>
Co-authored-by: AlFas <AlFasGD@users.noreply.github.com>
Co-authored-by: Ramkumar Ramesh <ramkumar.ramesh.8@live.com>
Co-authored-by: Ramkumar Ramesh <ramram@microsoft.com>
Co-authored-by: AlekseyTs <AlekseyTs@users.noreply.github.com>
Co-authored-by: Allison Chou <allichou@microsoft.com>
Co-authored-by: Tomáš Matoušek <tmat@users.noreply.github.com>
Co-authored-by: David Wengier <david.wengier@microsoft.com>
Co-authored-by: David Barbet <dabarbet@microsoft.com>
Co-authored-by: Fred Silberberg <frsilb@microsoft.com>
Co-authored-by: James Newton-King <james@newtonking.com>
Co-authored-by: Weihan Li <weihanli@outlook.com>
Co-authored-by: Joey Robichaud <joseph.robichaud@microsoft.com>
Co-authored-by: Julien Couvreur <julien.couvreur@gmail.com>
Co-authored-by: Andrew Hall <ryzngard@live.com>
Co-authored-by: Manish Vasani <mavasani@microsoft.com>
Co-authored-by: Jared Parsons <jaredpparsons@gmail.com>
Co-authored-by: Joey Robichaud <jorobich@microsoft.com>
Co-authored-by: Rikki Gibson <rigibson@microsoft.com>
Co-authored-by: akhera99 <ankitakhera@microsoft.com>
Co-authored-by: Ankita Khera <40616383+akhera99@users.noreply.github.com>
@jcouv jcouv mentioned this pull request Oct 14, 2022
49 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants