Skip to content
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

[ffigen] Use package:file instead of dart:io directly #1405

Open
dcharkes opened this issue Aug 8, 2024 · 0 comments
Open

[ffigen] Use package:file instead of dart:io directly #1405

dcharkes opened this issue Aug 8, 2024 · 0 comments
Labels
P3 A lower priority bug or feature request package:ffigen package:ffigenpad

Comments

@dcharkes
Copy link
Collaborator

dcharkes commented Aug 8, 2024

Currently FFIgen uses dart:io directly.

This forces our FFIgenPad prototype to use IOOverrides.

If we were to use package:file, we could potentially wire up all File reads and writes using a FileSystem that targets the emscripten file system when we use WASM.

Since this is a more general problem than just our use case, I've gone ahead and file an issue on the Dart SDK to see if others think that would be a good direction to go in:

So let's wait on some feedback there before we head in this direction. (marking issue low prio)

Note, it would be tempting to run the the whole of FFIgen with a MemoryFileSystem and make our test suite blazing fast. However, that doesn't work due to libclang wanting to read from the LocalFileSystem.

FYI @TheComputerM @mannprerak2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request package:ffigen package:ffigenpad
Projects
None yet
Development

No branches or pull requests

1 participant