-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
Switch Bookmarks plugin to use Microsoft.Data.Sqlite #2335
Conversation
This comment has been minimized.
This comment has been minimized.
Hey thanks for the PR. Could you list what tests you have done with this PR, e.g. loading bookmarks from chrome, edge, etc |
No issues, we don't support 32-bit Windows. |
Before we can officially publish ARM64 installer, we need to check:
Should do all this in another PR. Just noting it down here for now. |
We further need to have a more comprehensive plugin assembly loader. The current one doesn't support deps.json which leads to various issue when publishing crossplatform. |
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Flow.Launcher.Plugin.BrowserBookmark.csproj
Outdated
Show resolved
Hide resolved
@@ -12,6 +12,7 @@ | |||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | |||
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> | |||
<UseWindowsForms>true</UseWindowsForms> | |||
<RuntimeIdentifier>win-x64</RuntimeIdentifier> |
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.
Remember win-x64 is also not arm. Therefore this may also break the potential arm build.
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.
I decided on it to have "default" win-x64 build, RuntimeIdentifier in .csproj can be overridden by specyfing it in the console build, e.g. dotnet build -r win-arm64
. So right now you can build without a problem in VS, and switch to ARM if you really need it.
Alternatively, there is a possibility to put multiple RIDs and compile everytime for all archs.
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.
Alright that sounds reasonable. Let's just take the default behavior.
Seems like it is easier than what I think of. I will push the change to this pr. ref: https://www.reddit.com/r/dotnet/comments/ojl3ah/any_resources_for_resolving_assembly_dependencies/ |
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view or the 📜action log for details. Unrecognized words (1)newsqlite To accept ✔️ these unrecognized words as correct and remove the previously acknowledged and now absent words, run the following commands... in a clone of the [email protected]:ktos/Flow.Launcher.git repository curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' |
perl - 'https://github.com/Flow-Launcher/Flow.Launcher/actions/runs/6147607468/attempts/1' Errors (1)See the 📂 files view or the 📜action log for details.
See ❌ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
@jjw24 I think we can merge this in. There shouldn't be much issue. |
It's an enhancement, we can merge after 1.16.2 is released. |
Also if you have updated the DLL loading mechanism, have you tested that it is working as expected and for some plugins as well? Otherwise I would seperate this if it's a non-relevant change for the purpose of this PR, so testing is easier. |
As for the tests, I made a few more to check if nothing was broken in the process: I've created a simple console app depending on IBookmarkLoader f = new FirefoxBookmarkLoader();
foreach (var item in f.GetBookmarks())
{
Console.WriteLine(item.Name);
} I've been building it for win-arm64 and win-x64 and checking manually if the results are actually my bookmarks. Seems to be working for Edge, Chrome, Firefox and Firefox ESR. I've also checked if native e_sqlite3.dll is the one I wanted after build:
So I am quite sure migration to new library didn't broke bookmarks loading. |
In fact, that's the supposed way to do it. I think previously we missed that part to load unmanaged dll, which creates weird issues. I have vscode workspace installed, which works fine with this branch. That one also need to load some native dll. |
I been test driving this change for fair few days now so far no issues I have spotted with this and the code changes look good. Thanks guys. |
In order to prepare a possible ARM64 release (see #2318) the first step would be probably to switch Bookmarks plugin to use a sqlite library available natively for ARM64.
System.Data.SQlite
which was used is quite old, so this PR switches to currentMicrosoft.Data.Sqlite
, which is based onSQLiteRawPCL
offering native sqlite library for many platforms.The differences are in the connection string, as some parameters were not available for the newer nuget, and in the setting the default RuntimeID to
win-x64
, which can be overridden at a build step (e.g. towin-arm64
if needed).This PR also effectively removes support for 32-bit Windows, not sure if it is a problem.