-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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] Implement a JSON contract reader #100966
Conversation
6689c43
to
6e583da
Compare
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
By the way, the unit tests for cdacreader aren't hooked up to any CI infrastructure at the moment. I'm not sure if we should include them into |
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
For hooking up the unit tests, I think hooking it up in the same way as the ILCompiler and ILLink unit tests will be the easiest way. That way it won't take on additional dependencies or complexity introduced by the other test harnesses. |
src/native/managed/cdacreader/tests/ContractDescriptorParserTests.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdacreader/tests/ContractDescriptorParserTests.cs
Outdated
Show resolved
Hide resolved
@jkoritzinsky just so I'm clear: I would need to add a new lane in the yaml file, right? |
You could add a subset and add that subset to the CLR Tools Tests job's build args (and update the path triggers). Then it will run as part of that job. No need for an additional job. |
we incorrectly allowed `[number]` as a field descriptor conversion. that's not allowed. removed it.
Dont' use libraries test infrastructure. Just normal arcade xunit support.
Added a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there docs anywhere about tools tests (adding, running, etc) that we should update?
src/native/managed/cdacreader/tests/Microsoft.Diagnostics.DataContractReader.Tests.csproj
Outdated
Show resolved
Hide resolved
Co-authored-by: Elinor Fung <elfung@microsoft.com>
Added a new PR with docs: #101186 |
there's a relevant failure on the "CLR_Tools_Tests" lane that is similar to what we previously saw with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me - assuming whatever is going on with the CLR_Tools_Tests leg is straightforward to address.
…roperties Since we set Configuration and RuntimeIdentifier, if we don't pass the same AdditionalProperties in all ProjectReferences, we bad project.assets.json files
Ah. The issue was that we now have two We set |
Implement a parser for the "compact" JSON contract descriptor format specified in [data_contracts.md](https://github.com/dotnet/runtime/blob/main/docs/design/datacontracts/data_descriptor.md) The data model is a WIP - it's likely we will want something a bit more abstract (and less mutable). This is not wired up to consume a real contract descriptor from target process memory at the moment. It's only exercised by unit tests for now. --- * compact descriptor format json parser * suggestions from reviews; remove FieldDescriptor wrong conversion we incorrectly allowed `[number]` as a field descriptor conversion. that's not allowed. removed it. * Make test project like the nativeoat+linker tests Dont' use libraries test infrastructure. Just normal arcade xunit support. * add tools.cdacreadertests subset; add to CLR_Tools_Tests test leg * no duplicate fields/sizes in types * Make all cdacreader.csproj ProjectReferences use the same AdditionalProperties Since we set Configuration and RuntimeIdentifier, if we don't pass the same AdditionalProperties in all ProjectReferences, we bad project.assets.json files * Don't share the native compilation AdditionalProperties --------- Co-authored-by: Aaron Robinson <arobins@microsoft.com> Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com> Co-authored-by: Elinor Fung <elfung@microsoft.com>
Contributes to #99298
Implement a parser for the "compact" JSON contract descriptor format specified in data_contracts.md
The data model is a WIP - it's likely we will want something a bit more abstract (and less mutable).
This is not wired up to consume a real contract descriptor from target process memory at the moment. It's only exercised by unit tests for now.
TODO:
src/libraries
orsrc/tests
or to something else