-
Notifications
You must be signed in to change notification settings - Fork 33
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
Refactor module structure #237
base: main
Are you sure you want to change the base?
Conversation
Move data types to their respective modules
I think this is ready to merge. I'd recommend reviewing the commits individually otherwise this is a lot to take in at once. |
To be clear, this is a first stab at sorting parley's files differently. Follow-up PRs should:
|
I think this is blocked (at least) pending a comment from @dfrg … |
I'm not sure it is. This goes into the discussions we've had about crate ownership: if we accept that this is a Linebender community crate (and that multiple people have hands-on experience by now), then we should also accept that Chad's approval isn't necessary for a major change. Obviously it'd be better to get Chad's input, to coordinate things, etc, but I don't think we should block on it indefinitely. I would suggest late January as the deadline. |
From my perspective, the changes to create the new I'm not going to approve the rest of it, as this is not code that I maintain. |
I am opposed to this change in it's current form. Aside from the fact that some things are miscategorised (our line-breaking algorithm now seems to live in In Taffy inputs are "styles" in the I agree that splitting editing out into it's own top-level module would make sense. I reckon it would also make sense to:
There are a lot more improvements to code organisation to be made, but some of them involve actually changing what the code does too, and I think these are the low-hanging fruit. From a meta perspective I'd suggest:
|
This echoes a discussion I had with Chad a few weeks ago. Parley's current structure de-facto splits into three types of items:
(EDIT: There's also data structures for text editing which are mostly separate from the rest.)
This PR makes these four blocs into explicit modules, which should make both the code and the documentation much easier to read.
This should also help people navigate the upcoming refactor; algorithms will be changed radically, input types may be changed, output types are likely to stay the same. Explicitly marking them should make parallel work easier.
Another thing the PR does in de-tangle layout types. Currently, when you're looking for Cluster, do you find it in
cluster.rs
? Nope,layout/mod.rs
. What aboutClusterData
?layout/data.rs
. Splitting these types into their eponymous files makes them easier to find without IDE assistance.