Skip to content

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

Merged
KevinRansom merged 1 commit into
dotnet:mainfrom
KevinRansom:investigate
Dec 14, 2023
Merged

Fix #16398 - The dotnet framework has a limit of ~64K methods in a single class.#16427
KevinRansom merged 1 commit into
dotnet:mainfrom
KevinRansom:investigate

Conversation

@KevinRansom

@KevinRansomKevinRansom commented Dec 12, 2023

Copy link
Copy Markdown
Contributor

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 ownerDecember 12, 2023 23:24
@KevinRansom
KevinRansomforce-pushed the investigate branch 2 times, most recently from c38a178 to 887298eCompareDecember 13, 2023 09:11
@KevinRansomKevinRansom changed the title InvestigateFix #16398 - The dotnet framework has a limit of ~64K methods in a single class.Dec 13, 2023
Comment threadsrc/Compiler/FSComp.txt Outdated
@KevinRansom
KevinRansom enabled auto-merge (squash) December 14, 2023 19:40
@KevinRansom
KevinRansom merged commit e9576a2 into dotnet:mainDec 14, 2023
@smoothdeveloper

Copy link
Copy Markdown
Contributor

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

@01010101 mentioned this pull request Feb 21, 2024
Sign up for freeto 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

@KevinRansom@smoothdeveloper@vzarytovskii@T-Gro