Repository navigation
Add DataSet, DataTable, and much more to corefx - #12426
Conversation
|
Excellent! Thanks for the hard work so far! :) |
| "System.Runtime": "4.0.0", | ||
| "System.Threading.Tasks": "4.0.0", | ||
| "System.IO": "4.0.0" | ||
| "Microsoft.Win32.Primitives": "4.3.0-beta-24604-02", |
There was a problem hiding this comment.
I assume you haven't pruned this dependency list yet? As I hope this doesn't depend on all these.
There was a problem hiding this comment.
I actually did prune the list, based on looking at the compiled assembly and its dependencies. Is that an inaccurate approach? Which dependencies would you expect to see go away?
There was a problem hiding this comment.
Yes looking at the assembly references is a good way to prune. What in the ref depends on System.Diagnostics.FileVersionInfo or System.Diagnostics.TraceSource? I wouldn't expect those to be used by any of the public APIs. They might be used by the implementation perhaps.
There was a problem hiding this comment.
Ah, I thought this comment was on the src. I expect the ref can be trimmed. I'll do that.
There was a problem hiding this comment.
Yeah, the ref list is much shorter:
System.Collections.NonGeneric
System.ComponentModel
System.ComponentModel.Primitives
System.ComponentModel.TypeConverter
System.IO
System.ObjectModel
System.Runtime
System.Transactions
System.Xml.ReaderWriter
There was a problem hiding this comment.
(Also, there are several entries from the src that can actually be removed as well, e.g. CodeDom; I'd pruned the list prior to trimming out some implementation, and now those entries are no longer needed. I'll do that as well.)
There was a problem hiding this comment.
System.Transactions is not part of netstandard so that will become an issue when trying to add these APIs to netstandard. We will either need to add them as well or remove the dependent APIs. cc @terrajobst
There was a problem hiding this comment.
We will either need to add them as well or remove the dependent APIs.
@weshaggard, removing System.Transactions would mean removing this method:
public abstract partial class DbConnection : System.ComponentModel.Component, System.Data.IDbConnection, System.IDisposable
{
public virtual void EnlistTransaction(System.Transactions.Transaction transaction);
}To be clear, though, you're not actually talking about removing it from this ref, right? You're instead talking about not having it in netstandard when the rest of these APIs are added there? My understanding is there's nothing wrong with having additional members here, and this one seems fairly important to expose, at least in core.
| { | ||
| internal const string EcmaPublicKey = "b77a5c561934e089"; | ||
| internal const string SystemDrawing = "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; | ||
| internal const string MicrosoftVSDesigner = "Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; |
There was a problem hiding this comment.
I hope we don't really need to keep these strings for the attributes they are applied to.
There was a problem hiding this comment.
If we don't need the attributes, I can remove these. I thought we would need them if we cared to support the designer scenarios... maybe we don't?
I suspect we don't really need these attributes. Particularly in the reference assemblies we can remove the majority of these ComponentModel attributes. You can see the list I used to pass to GenAPI to exclude a lot of these type of attributes from the ref. https://github.com/dotnet/standard/blob/master/platforms/attributeExcludeList.txt. Refers to: src/System.Data.Common/ref/System.Data.Common.cs:115 in 23c9d86. [](commit_id = 23c9d86, deletion_comment = False) |
We don't need them because we don't care about them? Some of those in the list, like EditorBrowsable, would actually be necessary in the ref assembly if we wanted them to do their job. I'm happy to remove any such attributes if we no longer care about them, of course. |
EditorBrowsable isn't in the list as you are correct that is interesting for the ref. As for the others I don't think any of them are really interesting for refs and just cause noise. |
Ah, I misread EditorAttribute as EditorBrowsableAttribute.
Do we not care about designers? If we do, I'd think we'd want those attributes included in the refs. If we don't, I'll strip them from the PR. Seems like those would need to be in the ref or they might as well be removed from the implementation as well. |
At this point we haven't cared and most things don't have this stuff applied throughout corefx. That's not to say it we won't start caring in the future but if we do I suspect we have more work to do. From past experience designers cannot work well with just refs as they also try to get resources and such which means we have other work to do for that scenario. |
Fair enough. So... delete the attributes throughout both ref and src (which also means I can remove those string resources)? |
Yes I would clean those things up. |
| "4.1.0.0": "4.1.0", | ||
| "4.1.1.0": "4.3.0", | ||
| "4.1.2.0": "4.4.0" | ||
| "4.2.0.0": "4.4.0" |
There was a problem hiding this comment.
What does this change do ?
There was a problem hiding this comment.
This file is maintained automatically by running msbuild /t:UpdatePackageIndex on the relevant package (and not running that when a change is needed results in build errors). 4.1.2 was never a stable/published version in the package, it was just a placeholder version number that was set after we shipped 4.1.1, so that we wouldn't inadvertently add to the same version. But since new APIs are being added, which necessitates bumping the minor version, we changed the version number to 4.2.0 instead of to 4.1.2, and this reflects that.
23c9d86 to
e58cb83
Compare
|
For some reason, codeflow is not showing the file However it shows up in the Diff. In the SqlClient contracts, you have type forwarded all the SqlTypes to System.Data.Common Two questions:
|
Yes, it's for compat. If a binary was built against SqlClient and was trying to find the types there, the runtime will redirect them to System.Data.Common where the types are now defined. In general we do this any time we move a type from one assembly to another, essentially leaving breadcrumbs for existing code to follow.
No, there won't be duplication. |
e58cb83 to
0a03ed4
Compare
There was a problem hiding this comment.
LGTM @stephentoub Can you verify that the manual tests of SqlClient run with 100% success rate before merging this PR?
0a03ed4 to
4c6f739
Compare
|
Thanks for reviewing, @saurabh500! I've run the SqlClient manual tests, and they all passed successfully: |
- Ports src from desktop corefx - Ports tests from Mono - Upgrades the System.Data.SqlClient project to netstandard 1.7 Some notes: - This adds ~120 public types and ~3800 public members to System.Data.Common. It includes all of the non-provider-specific types from System.Data.dll with the exception of permissions-related types (e.g. DbDataPermissionAttribute) and configuration-related types (e.g. DbProviderFactories). - I've done close to zero cleanup in the tests ported from Mono. There is a sizeable amount of work there to bring it into conformance with our normal usage of xunit, and I'll open an issue for that to be done subsequently. I did the minimal work necessary to bring the tests over, convert them to xunit, and get them passing. - I've done some cleanup/formatting/etc. in the product source, but there's still plenty more we could do if we want to, more application of C# features added since this code was written, etc. - I type-forwarded the SqlTypes down from System.Data.SqlClient into System.Data.Common, as they need to be known by DataSet and friends. SqlClient was accessing some internals of these types, so I put some workarounds in place to enable it to continue functioning without measurable performance loss and with the same behavior. They're slightly hacky, but they get the job done.
4c6f739 to
7888677
Compare
|
Thanks for all the hard work, |
|
Does Dataset/DataTable/DataView Support INotifyPropertyChanged/INotifyCollectionChanged Interface in dot net core 3.0 |
Add DataSet, DataTable, and much more to corefx Commit migrated from dotnet/corefx@c5c75db
Some notes:
cc: @weshaggard, @ericstj, @terrajobst, @saurabh500, @YoungGah, @FransBouma
Fixes https://github.com/dotnet/corefx/issues/8622
Fixes https://github.com/dotnet/corefx/issues/2065
Related to https://github.com/dotnet/corefx/issues/4571 (DbProviderFactory is included, but DbProviderFactories is not)