packages
packages copied to clipboard
[RFC] [cross_file] New architecture.
This PR attempts to solve the current issues of XFile by slightly re-architecting it.
In this PR:
XFileis now an interface that does not have any code, except for the two "legacy" constructors that are maintained (but deprecated) for backwards-compatibility reasons.- Each underlying data structure contains a super simple implementation of the interface.
XFileinstances are now created from the platform-specific (nativevsweb) factories.
This does not remove saveAs from the XFile interface.
[!NOTE] ~~This is a breaking change because I've made the old
XFileconstructors deprecated (and throwy) but if we want to, we could possibly re-implement the "old" constructors with the new implementations and a few conditional imports?~~This is not a breaking change anymore. Old tests continue passing (
test/legacy*), and new tests contain minor changes.
Anyway, just a RFC!
Pre-launch Checklist
- [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [x] I read the Tree Hygiene page, which explains my responsibilities.
- [x] I read and followed the relevant style guides and ran the auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages repo does use
dart format.) - [x] I signed the CLA.
- [x] The title of the PR starts with the name of the package surrounded by square brackets, e.g.
[shared_preferences] - [ ] I linked to at least one issue that this PR fixes in the description above.
- [x] I updated
pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes. - [x] I updated
CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes. - [x] I updated/added relevant documentation (doc comments with
///). - [x] I added new tests to check the change I am making, or this PR is test-exempt.
- [x] All existing and new tests are passing.
If you need help, consider asking for advice on the #hackers-new channel on Discord.
/cc @stuartmorgan this is my idea for the "next" version of the x-files. PTAL and let me know what you think, or if you want this to go in another direction :)
Quick note to say I haven't forgotten about this, I just haven't had time to fully context switch to give this the attention it will need. I'll try to do it within the next week.
I'm going to work on this on my next flutter/packages on-call rotation.
Hey @ditman! Greetings from stale PR triage. :) Do you plan to pick this back up?
@Piinks I do want to pick this up again, but I don't think I'll have time to do this before I/O :(
sorry @ditman to bother you but do you plan on finishing this PR
Hey @ditman! Greetings from stale PR triage (again). Should we continue to leave this open?
Given the many return trips to stale PR triage, the many merge conflicts, and the lack of progress for a year now, I am going to close this PR. Please feel free to reopen if needed @ditman. Thank you!