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

Overload Resolution Priority #74190

Merged
merged 26 commits into from
Jul 10, 2024

Conversation

333fred
Copy link
Member

@333fred 333fred commented Jun 27, 2024

This implements the Overload Resolution Priority language feature.

Test Plan: #74131
Champion issue: dotnet/csharplang#7706
Speclet: https://github.com/dotnet/csharplang/blob/main/proposals/overload-resolution-priority.md

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Jun 27, 2024
@333fred
Copy link
Member Author

333fred commented Jun 27, 2024

This feature is small enough that, rather than do a full feature branch with multiple PRs, I've just done it as a single PR. I don't really recommend a commit-by-commit review here, I'll go through and comment on the actually interesting parts of the implementation. Most of it is actually just tests and attribute decoding boilerplate.

@333fred 333fred marked this pull request as ready for review June 28, 2024 17:01
@333fred 333fred requested a review from a team as a code owner June 28, 2024 17:01
@jcouv jcouv self-assigned this Jun 28, 2024
@333fred 333fred requested review from cston and jcouv June 28, 2024 17:03
.vscode/settings.json Outdated Show resolved Hide resolved
…solution-priority

* upstream/main: (184 commits)
  Disable BuildWithNetFrameworkHostedCompiler (dotnet#74299)
  Avoid using constants for large string literals (dotnet#74305)
  Adjust lowering of a string interpolation in an expression lambda to not use expanded non-array `params` collection in Format/Create calls. (dotnet#74274)
  Consolidate test Span sources (dotnet#74281)
  Allow Document.FilePath to be set to null (dotnet#74290)
  Update Directory.Build.rsp
  Remove fallback options from IdeAnalyzerOptions (dotnet#74235)
  Fix msbuild issue
  Improve parser recovery around nullable types in patterns (dotnet#72805)
  Syntax formatting options (dotnet#74223)
  Localized file check-in by OneLocBuild Task: Build definition ID 327: Build ID 2490585 (dotnet#74287)
  fix (dotnet#74276)
  Remove more
  fix (dotnet#74237)
  Fix scenario where lightbulbs weren't being displayed
  Reduce closures allocated during invocation of CapturedSymbolReplacement.Replacement (dotnet#74258)
  Reduce allocations in SymbolDeclaredCompilationEvent (dotnet#74250)
  remove type that now serves no purpose
  Remove uncalled method
  Remove more unused code
  ...
@jcouv
Copy link
Member

jcouv commented Jul 9, 2024

| Overload Resolution Priority | PR not yet available | In Progress | 333fred | jcouv, cston | Not yet assigned | 333fred |

Could be moved at the bottom of the C# 13 table, since the feature is now attached to new language version. Or would you rather wait until VB is done to make that change?
Never mind. I was confused by the diff. I see the entry in the C# 13 section #Closed


Refers to: docs/Language Feature Status.md:13 in c0c1730. [](commit_id = c0c1730, deletion_comment = False)

cston
cston previously approved these changes Jul 9, 2024
jcouv
jcouv previously approved these changes Jul 9, 2024
Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (iteration 24)

…solete attributes during early attribute binding: this isn't good, because it will cause us to throw out the bound attribute data we found during early binding. Depending on the order we bind constructors in, this can cause a race condition in the binding of overload resolution priority. Thankfully, this was racy enough that it failed a couple of times during CI, and I was able to explicitly reproduce the failure by pulling on attributes on one constructor or the other.
@333fred 333fred dismissed stale reviews from jcouv and cston July 10, 2024 01:31

Stale

Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

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

LGTM Thanks (iteration 26)

@333fred 333fred merged commit bb5ea47 into dotnet:main Jul 10, 2024
28 checks passed
@333fred 333fred deleted the feature/overload-resolution-priority branch July 10, 2024 21:16
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jul 10, 2024
@RikkiGibson RikkiGibson modified the milestones: Next, 17.12 P1 Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Feature - Overload Resolution Priority untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants