-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[cdac] break up cdacreader into 4 separate assemblies #108156
Merged
Merged
Conversation
This file contains 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
Break up the monolithic cdacreader assembly into three parts: 1. `Microsoft.Diagnostics.DataContractReader.Abstractions` just the API surface for contract implementations and clients **note** everything is `internal` for now (with IVT for the other assemblies) - we're not committing to a public API surface yet 2. `Microsoft.Diagnostics.DataContractReader.Contracts`: the concrete implementations of the contracts and data 3. `Microsoft.Diagnostics.DataCotnractReader`: a concrete `Target` that ties everything together 4. `cdacreader` just the unmanaged entrypoints and the legacy DAC API surface `SOSDacImpl` To untangle things I had to add a new `IContractFactory<TProduct>` interface - this is what the target's `Registry` uses to instantiate specific versions of contracts. Goals: 1. Make it possible to mock a `ITarget` and its `IRegistry` so that concrete contracts can be tested in isolation for example by making dummy dependent contracts that return canned answers. 2. Eventually make it possible to inject additional contract implementations into a `Registry` implementations 3. Make it possible to consume just the `Target` and `Contracts` without the unmanaged entrypoints or the legacy interfaces
Tagging subscribers to this area: @tommcdon |
...aged/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IRegistry.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/ITarget.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/ITarget.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/ITarget.cs
Outdated
Show resolved
Hide resolved
...anaged/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/DacStreams.cs
Outdated
Show resolved
Hide resolved
...aged/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/EcmaMetadata.cs
Outdated
Show resolved
Hide resolved
am11
reviewed
Sep 24, 2024
...ed/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IDacStreams.cs
Show resolved
Hide resolved
Allows the TypeNameBuidler and SigFormat to depend on the abstract target
…egistry -> ContractRegistry
am11
reviewed
Sep 25, 2024
...anaged/cdacreader/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IThread.cs
Show resolved
Hide resolved
I believe I've addressed the outstanding feedback (except the |
This was referenced Sep 27, 2024
AaronRobinsonMSFT
approved these changes
Sep 30, 2024
sirntar
pushed a commit
to sirntar/runtime
that referenced
this pull request
Oct 3, 2024
Break up the monolithic cdacreader assembly into four parts: 1. `Microsoft.Diagnostics.DataContractReader.Abstractions` just the API surface for contract implementations and clients. **Note**: everything is internal for now (with IVT for the other assemblies) - we're not committing to a public API surface yet 2. `Microsoft.Diagnostics.DataContractReader.Contracts`: the concrete implementations of the contracts and data 3. `Microsoft.Diagnostics.DataContractReader`: a concrete Target that ties everything together 4. `cdacreader`: just the unmanaged entrypoints and the legacy DAC API surface `SOSDacImpl` To untangle things I had to add a new `IContractFactory<TContract>` interface - this is what the target's ContractRegistry uses to instantiate specific versions of contracts. Goals: * Make it possible to mock a Target and its ContractRegistry so that concrete contracts can be tested in isolation for example by making dummy dependent contracts that return canned answers. * Eventually make it possible to inject additional contract implementations into a ContractRegistry implementation Make it possible to consume just the Target and Contracts without the unmanaged entrypoints or the legacy interfaces Changes: * [cdac] break up cdacreader into 4 separate assemblies * rename the contract factories using libraries naming convention * removed unused usings * document all abstract Target members * rename Target -> ContractDescriptorTarget * Add ReadTargetPointerFromSpan to abstract Target Allows the TypeNameBuidler and SigFormat to depend on the abstract target * change SOSDacImpl to depend on the abstract Target * fixup filenames and namespaces
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Break up the monolithic cdacreader assembly into four parts:
Microsoft.Diagnostics.DataContractReader.Abstractions
just the API surface for contract implementations and clients note everything isinternal
for now (with IVT for the other assemblies) - we're not committing to a public API surface yetMicrosoft.Diagnostics.DataContractReader.Contracts
: the concrete implementations of the contracts and dataMicrosoft.Diagnostics.DataContractReader
: a concreteTarget
that ties everything togethercdacreader
just the unmanaged entrypoints and the legacy DAC API surfaceSOSDacImpl
To untangle things I had to add a new
IContractFactory<TContract>
interface - this is what the target'sContractRegistry
uses to instantiate specific versions of contracts.Goals:
Target
and itsContractRegistry
so that concrete contracts can be tested in isolation for example by making dummy dependent contracts that return canned answers.ContractRegistry
implementationTarget
andContracts
without the unmanaged entrypoints or the legacy interfaces