-
Notifications
You must be signed in to change notification settings - Fork 1
Initial implementation of native FS methods #3
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
Conversation
|
@dvd-bnc I can fix the pipeline after if it annoys you. I would add fvm and it's GitHub action as a replacement to the flutter subosito action if you are okay |
|
by me it works fine yea, hopefully the native assets feature lands soon so we can continue using stable, maybe use beta so we don't have too many changes coming at once? |
| @@ -0,0 +1,191 @@ | |||
| const std = @import("std"); | |||
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.
note for reviewers: ignore this file, it's my testing file to assert native behaviors, it'll get deleted in the future
(kinda ot from this pr) but I think we should generally give the whole repo a bit of an overhaul. The readme is also still full of mentions of dahliaos and even has a copyright claim for dahlia (obviously that's bs here and we should probably remove it) |
definitely, this code is very old and in much need of some upgrades, from this kind of stuff (README, ci, etc) to actual code practices and libraries |
Also remove progress display for dir fetch, it currently doesn't work
Implements the initial base for native filesystem methods, using GLib.
This implementation allows us to monitor progress for heavy operations, interface better with special folders (eg. Trash), get more info about files and the filesystem they reside on, display better errors and allow for cancellation, and many more other things.
This initial PR doesn't try to do much of the former, what it does though is lay out the foundation of such work, by trying to figure out a possible architecture for how dart code interfaces with native code, how threading between the IO thread and the main/platform dart thread works and so on.
This PR unfortunately (because of my own stupidity oop) includes other commits which are not closely related to this change, I recommend reviewers to mostly review the last commit (I apologize, I'll try to be more careful next time).
Some important things that are missing:
There's the chance we'll need to migrate database solution, isar has been discontinued and for now I'm using the community fork, we'll need to discuss whether or not to migrate to another solution.
To test out the PR you'll need to be on linux, to have glib development libraries installed and to have zig 0.15.1 installed.
You'll also need to be on flutter main/beta with a recent version of flutter to run it because of the Native assets feature.
From then on you just cd into the src directory, run
zig buildand that should be enough to have the native lib ready.After that you can run the files app by appending
--enable-experiment=native-assetsto flutter run/build, eventually the flutter command will tell you if you need to do something else