Prepare 1.11 Release#1302
Conversation
…litepclraw.bundle_e_sqlcipher, which is deprecated
…deprecated, implement the same approach here in SQLite-net-pcl, using the system SQLite library on iOS and e_sqlite3 everywhere else.
|
I'm holding off the merge until @ericsink has verified the package versions. |
|
@praeclarum You asked if config.e_sqlite3 is the same as bundle_green: It is not. The bundle_green package was: Use e_sqlite3 builds everywhere except iOS, and on iOS, use the system SQLite. The config.e_sqlite3 package is: Use e_sqlite3 builds everywhere. I deprecated bundle_green because it was only intended to be used by sqlite-net, but others kept using it without understanding it. If you still prefer the bundle_green behavior for sqlite-net-pcl, I will incorporate the stuff from bundle_green into sqlite-net-pcl. Let me know. |
|
@ericsink Understood, thank you for explaining. Overall I'm OK with bundling sqlite.
However these are just worries and we can address the situation if any of them become real problems. In terms of Raw initialization, is this PR OK? |
There was a problem hiding this comment.
Actually, this should probably change from config.e_sqlite3 to bundle_e_sqlite3. The "config" package says "reference e_sqlite3 but don't actually bring it into the build". The "bundle" package says "reference e_sqlite3 and include it in the build".
There was a problem hiding this comment.
bundle_e_sqlcipher has been deprecated. I suggest deprecation of sqlite-net-sqlcipher. Such cases can be handled with the sqlite-net-e package, which uses config.e_sqlite3, which allows custom builds of SQLite using the e_sqlite3 name.
There was a problem hiding this comment.
And actually, I don't see the sqlite-net-e package here in this file either. I'd suggest adding it here. The raw3 branch contains my work on this.
Which raises another issue.: sqlite-net-e was published with a version number of 1.11.0. We should synchronize all these, but it would difficult to go back now.
I can add you as an owner of sqlite-net-e.
|
And FWIW, my e_sqlite3 builds do support maccatalyst. |
|
SQLitePCLRaw 3.0.3 has been released. |
|
@ericsink OK. I'll add maccat, and switch the version to 1.11 beta. Once I've proven to myself everything is OK on iOS, I'll ship as 1.11. Sound good? Sorry, but I'm a bit confused about packages.
|
|
HYPE |
| </Description> | ||
| <PackageTags>sqlite-net;sqlite;database;orm;encryption;sqlcipher</PackageTags> | ||
| <IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsAotCompatible> | ||
| <IsIOS>$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0-ios'))</IsIOS> |
There was a problem hiding this comment.
@ericsink Should we change this to IsApple and check for macos and maccatalyst also?
There was a problem hiding this comment.
I suppose it depends on whether you want to use the system SQLite on those platforms or my builds.
|
Acknowledging: I'll take a look at all this in the morning. Thanks. |
ericsink
left a comment
There was a problem hiding this comment.
Overall, looking good. I want to give everything another look outside of review mode so I can see whole files better. But this is close.
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks> | ||
| <TargetFrameworks>netstandard2.0;net8.0;net9.0;net8.0-ios</TargetFrameworks> |
There was a problem hiding this comment.
I may need to verify compatibility of my packages with the net8 mobile workloads. I'm pretty sure I'm avoiding dependencies on the mobile workloads whenever possible, but when needed, I'm building with net10 versions.
There was a problem hiding this comment.
I generally prefer net8 at the moment because I know some shops that are still on it. But since this change is to support modern Android, I'm vaguely OK with using net10. I'll leave it at net8 for the moment unless you tell me otherwise.
| </Description> | ||
| <PackageTags>sqlite-net;sqlite;database;orm;encryption;sqlcipher</PackageTags> | ||
| <IsAotCompatible Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0'))">true</IsAotCompatible> | ||
| <IsIOS>$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net8.0-ios'))</IsIOS> |
There was a problem hiding this comment.
I suppose it depends on whether you want to use the system SQLite on those platforms or my builds.
|
@ericsink Thanks for the feedback. I'll release a beta today, and if I like it, get a release out soon. Just one more question: My |
I know, right? IIRC, -base only depends on SQLitePCLRaw.core, which means it makes no assumptions about where the native SQLite library is coming from. It still has valid use cases. The -e variant is a bit different. It means "always look for a SQLite with e_sqlite3 as the name, but don't actually specify which one". In my view, both still have a place. |
|
Hmmm @praeclarum I seem to get: I had to manually add and then revert to the previous beta and call SQLitePCL.Batteries.Init(); and it worked, but this isn't in the latest beta |
|
Which SQLite-net package were you using? |
|
Currently: https://github.com/jamesmontemagno/app-dcp-tracker Just: However if I do this: |
|
I'll take a look and figure this out. Thanks. |
|
FWIW, the attached minimal sample works for me with 1.11.272-beta. I'm not sure yet why app-dcp-tracker is having trouble. |
|
Maybe it's just an iOS specific thing hmmmmm |
|
I just tested it on android emulator and also mac catalyst - and it worked alright, so maybe just iOS |
|
In order to suport the 16kb pages on Android I moved Now on Android the local DB works fine after the upgrade, but on iOS I am getting this: |
|
@ognjensuljagic That looks like the same problem @jamesmontemagno is describing. Now that I can see that it's iOS-specific, I'm pretty sure I know what it is. I should have it fixed today. |
|
Hmmm. The problem is something wrong with the iOS-specific logic in SQLite-net-std.csproj, but it's not as obvious as I hoped. And the iOS build configuration on my dev machine is currently messed up. I have what feels like a constant battle with the Maui workloads and Xcode where things get out of date and stuff stops working. Anyway, I'm probably going to have to do the Xcode/workload dance so I can actually test any fixes. |
|
@jamesmontemagno @ognjensuljagic I've got my dev environment updated now, and I'm having trouble reproducing this problem. I'm using a basic sample ( Something I'm doing here is different. |
|
Hmmmmm... I'm on .NET 10, what if you do |
|
I'll try that. If I can reproduce the problem, it should be easy to fix. |
|
I'll try to get a tiny reproduction tomorrow for you as well. |
|
OK, I've got a repro now. Fixing coming soon I hope. |
|
Looks like the problem is: That package is being built for net8.0-ios and net9.0, so it gets a dependency group for each of those frameworks. When consumed from net10.0-ios, it matches the net9.0 dependency group instead of the net8.0-ios one, so it gets the wrong provider. If I add net9.0-ios to the build for the sqlite-net-pcl package, it works. Does this seem like the right fix? |
|
interesting..... i wonder then if it should be net8.0-ios;net9.0-ios;net10.0-ios |
|
Or maybe we should try just removing net9.0 plain? The problem seems to be that net9.0 plain takes precedence over net8.0-ios. I assume that adding all three of the -iOS tfms would mean that all 3 of those workloads would need to be present at build time, so that's a possible issue. |
|
@ericsink @praeclarum #1305 to try |
|
FWIW, I removed net9.0 and ran the same quickie test with a 'dotnet new maui' app on .NET 10, and it worked fine. But I don't know why net9.0 was there, or if its removal might cause problems on other platforms, etc. |
|
Interesting: https://learn.microsoft.com/en-us/dotnet/standard/frameworks Apparently the docs cover this exact problem with TFM precedence rules. |
|
@praeclarum |
No description provided.