masonry: Use Kurbo via Vello.#223
Conversation
|
This does leave some |
|
I think we need to re-export I would propose postponing this until after RustNL. The phrasing via "vello or peniko" there is quite telling, imo, that this is still messy. |
|
The vellol or peniko is only because I included changes for xilem_web which uses peniko but not vello. |
|
Ah, apologies. That makes sense. I still think this isn't straightforwardly a win, and needs more careful thought. And so overall, would still prefer to defer this for 3 weeks or so |
|
It looks like a win to me. If most usage of Kurbo will happen either by crates that need to depend on Vello or (in the case of xilem_web) via Peniko it makes sense then re-exporting Kurbo in Vello makes sense (and so I would also say that linebender/vello_svg#5 does not make much sense to me). In fact I already noticed that xilem_web has a kurbo dependency that it doesn't end up using so removing that would definitely make sense. |
It's used though? In the svgtoy for example? But I guess we can put kurbo and other things there behind a feature flag. |
|
If it's used (directly) only for the examples it should be a dev-dependency. |
|
@djc @Philipp-M See #293, I just split that off. |
984796c to
ff29738
Compare
|
I've rebased this PR forward, but left in the part that I did in #293 (I'll rebase again). This should make things more clear that this patch isn't about how we re-export, but about how we use, and this just brings the usage of This also cleans up a number of places where multiple paths to I'd previously done (and landed) a version of this in I've edited the commit message and description on the commit in this PR to reflect that it isn't going to be involving anything but |
ff29738 to
180c661
Compare
DJMcNab
left a comment
There was a problem hiding this comment.
I find this frustrating, because it is not clear what the right rules are here.
I now realise that this is an improvement - apologies, I hadn't fully understood the actual changes being suggested here. I had assumed that this was only doing pub use vello::kurbo
| use kurbo::{Affine, Stroke}; | ||
| use smallvec::{smallvec, SmallVec}; | ||
| use tracing::{trace, trace_span, Span}; | ||
| use vello::kurbo::{Affine, BezPath, Cap, Join, Size, Stroke}; |
There was a problem hiding this comment.
I think I'd prefer these all to use crate::{...}
If we need the types, we should export them directly, probably.
180c661 to
8b899a1
Compare
|
It is frustrating, I agree! And what's worse is that just naively accepting suggestions from rust-analyzer or other tools to resolve imports may or may not do the "right" thing (whatever that even is). We had a In that case, we could do: or Or the current: This brings up another thing which is that the import styles are also not identical across things, so some stuff will do: while others might do: So ... I'm happy to make them all do the same thing, I just need to know what that thing should be. |
xStrom
left a comment
There was a problem hiding this comment.
Based on discussion in Zulip we can move forward in principle.
Next step would be to rebase on main to resolve merge conflicts.
|
I'll do that this week. |
8b899a1 to
1b0678f
Compare
Rather than have to keep a dependency on `kurbo` at the correct version, use it consistently via `vello`. This makes this match how `peniko` is already used within `masonry`.
1b0678f to
77a4e87
Compare
|
I've resurrected this and rebased it. |
|
FYI @PoignardAzur |
Rather than have to keep a dependency on
kurboat the correct version, always use it viavello.This makes this match how
penikois already used withinmasonry.