Avoid emitting FSI multiemit PDBs without debug info - #20394
Open
Happypig375 wants to merge 2 commits into
Open
Conversation
Contributor
❗ Release notes requiredYou can open this PR in browser to add release notes: open in github.dev
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
FSI's multi-assembly emit path always supplied
WriteILBinaryInMemorywith a portable PDB path, even after--debug-clearedTcConfig.debuginfo. As a result, every submission generated PDB bytes, wrote them to the session's temporary symbol directory, and loaded the assembly throughAssembly.Load(byte[], byte[])when no debugging information was requested.This restores the
debuginfogate that existed before #14537 moved FSI symbols to disk:--multiemit+ --debug-now passes no PDB path, generates no PDB, and follows the existingAssembly.Load(byte[])branch.--multiemit+ --debug+continues to generate, persist, and load portable PDB data.This addresses the symbol-generation performance item in #17306. The downstream report is bryanedds/Nu#1090, where enabling native debugging through
launchSettings.jsonamplified FSI code-reload time by a reported 5-10x.Root cause
PR #14537 enabled CoreCLR script debugging and changed
pdbfilefrom atcConfig.debuginfo-conditioned option to an unconditional temporary path.WriteILBinaryInMemoryuses the presence of that path as its PDB-generation switch, so--debug-no longer prevented symbol work in multi-emit mode.Validation
origin/main: 1 test run, 1 failed because the session symbol directory containedFSI-ASSEMBLY-MULTI-1.pdb.--debug-emits no PDB;--debug+still emits one).build.cmd -noVisualStudio -c Release -nobl: succeeded locally (639.5s incremental fixed build).A stable automated timing benchmark was not added because the reported multiplier depends on Visual Studio's mixed managed/native debugger. The regression test directly asserts that the unnecessary per-submission symbol artifact is eliminated.
Checklist