Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.

Discussion: Microsoft.Data.Sqlite 2.0 to target .NET Standard 2.0 #373

Closed
divega opened this issue May 26, 2017 · 12 comments
Closed

Discussion: Microsoft.Data.Sqlite 2.0 to target .NET Standard 2.0 #373

divega opened this issue May 26, 2017 · 12 comments
Milestone

Comments

@divega
Copy link

divega commented May 26, 2017

Discussion thread for aspnet/Announcements#247.

@divega divega added this to the Discussions milestone May 26, 2017
@divega divega changed the title Discussion: Microsoft.Data.Sqlite to target .NET Standard 2.0 Discussion: Microsoft.Data.Sqlite 2.0 to target .NET Standard 2.0 May 26, 2017
@JensNordenbro
Copy link

JensNordenbro commented May 26, 2017

I take it you will support linux-arm rid?

@bricelam
Copy link
Contributor

bricelam commented May 26, 2017

In 2.0.0 we leverage SQLitePCL.raw (also used by Azure Mobile Apps, SQLite-net, and the AWS SDK) which supports a very large matrix of platforms out of the box and lets you easily use your own (or the system-wide) version of libsqlite3.so.

@JensNordenbro
Copy link

Ok. How do you decide when to assume os dist presence and when to include native dependencies like libuv.so? Also, is there a list of assumed os dependencies available to simplify life for meta dist creators and dist creators?

@bricelam
Copy link
Contributor

The Microsoft.Data.Sqlite package uses SQLitePCLRaw.bundle_green which will bring its own copy of the native SQLite library on all platforms except iOS where it will use the system's.

The Microsoft.Data.Sqlite.Core package lets you decide. See SQLitePCL.raw's README for all the gritty details on how to specify what native library to use on which platforms.

@JensNordenbro
Copy link

Ok. Great😊

@alexvaluyskiy
Copy link

@divega The NetCore documentation says In general, we recommend you to target the lowest version of .NET Standard possible. Why does Microsoft not follow their own recommendation? It is fine to increase the version of NetStandard if you want to use some new APIs. But what new API do you want to use with Microsoft.Data.Sqlite?

@bricelam
Copy link
Contributor

bricelam commented Jun 5, 2017

Primarily Thread.Sleep(). Without it, we can't yield execution in the "table locked" retry loop leading to unnecessary CPU spikes.

@arturosevilla
Copy link

Also, now that Visual Studio 2017 15.3 Preview is out with core tools 2.0.0 preview, which supports netstandard2.0 where System.Transactions is implemented, I think Microsoft.Data.Sqlite should support it.

Considering that System.Data.Sqlite supports System.Transactions but does not support netstandard, currently there is no library that supports both netstandard and ambient transactions.

@bricelam
Copy link
Contributor

Issue #294 is tracking support for System.Transactions.

@zone117x
Copy link

zone117x commented Aug 12, 2017

I think this is a bad idea. NET45 is an important minimum target for several reasons.

  • NET451 Its the newest version that ships with Win7 and later.
  • NET451 is the minimum version that many other Microsoft nuget packages target - aspnetcore is a big one that I know if.
  • NET45 the version that the Xamarin.Mac "Full Framework" is pegged at.

We will not ship a Windows product targeting above NET451 and it looks like a lot of other software is in the same position.

I've forked the dev branch and "backported" it to NET45 and netstandard1.3, see https://github.com/PingmanTools/Microsoft.Data.Sqlite/commits/backport
Although it did not take many changes and all unit tests pass.. In my opinion the reasons given for netstandard2.0 minimum don't really hold up.

Especially considering that the bulk of the compatibility and complexity is already taken care of by SqlitePCLRaw.

@zone117x
Copy link

The "backport" fork is now being built and tested https://ci.appveyor.com/project/zone117x/microsoft-data-sqlite
And is published on nuget as Microsoft.Data.Sqlite.Core.Backport https://www.nuget.org/packages/Microsoft.Data.Sqlite.Core.Backport/

Please consider backing out of this decision.

@Thorium
Copy link

Thorium commented Oct 23, 2017

In general I very much like the idea to build just netstandard2.0 library.
The only problem is that currently, mainly on non-Windows-environment the Mono seems to not be fully compatible with .NET Standard 2.0, so I need to use the Microsoft.Data.Sqlite.Core.Backport. Problem with that solution is that I would like my single source code to work with all the platforms (which is the idea of the .Net Standard) but as the Microsoft.Data.SQLite API evolves and Microsoft.Data.Sqlite.Core.Backport is not keeping up, I have to create different solution for Mono. So the idea of the .Net Standard is not working, at least not yet. So I think the decision is good but made too early.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants