-
Notifications
You must be signed in to change notification settings - Fork 261
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
Implementation of Component Dependencies #2673
Implementation of Component Dependencies #2673
Conversation
d01a047
to
92efd6d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
9cba0fc
to
f64cdd6
Compare
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.
Looking like a really great start! 🎉
3ee065c
to
eaa0280
Compare
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.
A few random and not very organised comments - I hope it's not too early for them, feel free to ignore if it is! I'm very much enjoying playing with the new feature. Pretty slick!
1b27140
to
bb1f0af
Compare
fb7ed10
to
617803b
Compare
617803b
to
22afb6a
Compare
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.
Looking good! I'm fine with merging as is.
I do have one piece of feedback about the user experience, that I'd like to discuss. In the spin.toml
manifest, the component dependencies keys are somewhat treated like patterns where a "org:package" = { path = "/path/to/wasm.wasm" }
means that all imports that have "org:package"
as their org/package namespace will be satisfied by that dependency. I wonder if we would be better of with a more explicit pattern matching syntax like "org:package/*" = { path = "/path/to/wasm.wasm" }
. Such a syntax seems more extensible and less likely to paint us into design corners in the future.
I've been thinking about this over the last week and i'm not really sold that |
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.
Thanks @fibonacci1729 for making this happen!
I did have one further (extremely non-blocking) question on the deny-all adapter. The adapter Wasm file is checked in. But I am nut sure how it gets built. Is this a "build locally and check in the binary" thing? If so it would be good to investigate (as a follow-up) how to move it to a controlled, trusted build environment, but I am not sure how that would play nicely with needing to have it checked in and being included as a blob. |
7d8ae2a
to
07aa519
Compare
@fibonacci1729 I'm not tied to my proposed syntax, but I do maintain that the current syntax is not ideal. The fact that I'm not tied to any particular solution, but I feel somewhat strongly that the existing syntax is the wrong way go. In the interest of making some sort of alternative for discussion, how about:
In the above syntax, the key is always the package. |
# equivalent to "org:package/my-interface"
"org:package" = { exports = ["my-interface"], ... } |
@rylev could you say more about why |
0a344e3
to
19b2e6f
Compare
Regarding the UI, my mental model was that the left hand side was "the thing that is being satisfied" and the right hand side was "the thing that satisfies it". I appreciate that Ryan's (And if Lann's comment is how we plan to do multiple interfaces then Ryan's idea seems consistent with it, although perhaps I am misunderstanding.) |
e09cdd5
to
9df6994
Compare
Signed-off-by: Brian H <brian.hardock@fermyon.com>
9df6994
to
b121199
Compare
This PR implements the Component Dependencies SIP.
See here for a simple example.
There are a few remaining items to address, namely better error messages and some lingering documentation TODOs. Additionally i'd like to put a few examples together.