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

Fix #16398 - The dotnet framework has a limit of ~64K methods in a single class. #16427

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

KevinRansom
Copy link
Member

@KevinRansom KevinRansom commented Dec 12, 2023

Limit a type to 65K methods.

Ensure that while writing the assembly, ensure that no type has more than approx 64K. Includes property setters/getters/constructors and event methods.

Technically this is a breaking change, however, a type with more than 64K methods, will not be loadable at runtime by the CLR, so warning on compilation is a vast improvement.

I have added a couple of test cases but we may want to disable them as they add about 8 minutes to the test execution time.

Fixes #16398

@KevinRansom KevinRansom requested a review from a team as a code owner December 12, 2023 23:24
@KevinRansom KevinRansom force-pushed the investigate branch 2 times, most recently from c38a178 to 887298e Compare December 13, 2023 09:11
@KevinRansom KevinRansom changed the title Investigate Fix #16398 - The dotnet framework has a limit of ~64K methods in a single class. Dec 13, 2023
@KevinRansom KevinRansom enabled auto-merge (squash) December 14, 2023 19:40
@KevinRansom KevinRansom merged commit e9576a2 into dotnet:main Dec 14, 2023
26 checks passed
@smoothdeveloper
Copy link
Contributor

That "64k methods ought to be good enough for anyone" fable must be true.

OwnageIsMagic added a commit to OwnageIsMagic/fsharp that referenced this pull request Dec 21, 2023
* upstream/main: (166 commits)
  typo in foldBack summary (dotnet#16453)
  Fix for dotnet#83 (improve constraint error message) (dotnet#16304)
  Name resolution: resolve interfaces in expressions (dotnet#15660)
  AddExplicitReturnType refactoring (dotnet#16077)
  Disabling 2 tests: running for too long, causing CI timeouts
  Improve value restriction error message dotnet#1103 (dotnet#15877)
  Parens: Keep parens for non-identical infix operator pairs with same precedence (dotnet#16372)
  More release note entries (dotnet#16438)
  Using Ordinal is both faster and more correct as our intent is to do … (dotnet#16439)
  merge (dotnet#16427)
  Optimize empty string compares (dotnet#16435)
  Checker: recover on unresolved type in 'inherit' member (dotnet#16429)
  Release notes proposal (dotnet#16377)
  [main] Update dependencies from dotnet/source-build-reference-packages (dotnet#16411)
  Allow usage of [<TailCall>] with older FSharp.Core package versions (dotnet#16373)
  Parser: recover on unfinished 'as' patterns (dotnet#16404)
  Parens: Keep parens in method calls in dot-lambdas (dotnet#16395)
  Checker: check unfinished obj expression inside computations (dotnet#16413)
  Added default dotnet-tools + additional tasks to launch them (dotnet#16409)
  make `remarks` and `returns` visible in quick info (dotnet#16417)
  ...
@0101 0101 mentioned this pull request Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

The dotnet framework has a limit of ~64K methods in a single class.
4 participants