-
Notifications
You must be signed in to change notification settings - Fork 824
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
Fetch the pirita download URL #3355
Conversation
@@ -317,6 +318,7 @@ pub fn query_command_from_registry( | |||
let package = command.package_version.package.display_name; | |||
let version = command.package_version.version; | |||
let url = command.package_version.distribution.download_url; | |||
let pirita_url = command.package_version.distribution.pirita_download_url; | |||
|
|||
Ok(PackageDownloadInfo { |
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.
Why don't we return the type/content from command.package_version
. That seems way easier than recreating a new struct each time
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.
I'll approve in any case, we can revisit this after
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.
Yeah, you have a good point.
Something we should do is make all our GraphQL queries public. That way people can execute them directly if a high-level function (e.g. wasmer_registry::query_command_from_registry()
) doesn't support exactly what you are looking for.
bors r+ |
Build succeeded: |
3360: Introduce a "wasmer_registry::queries" module with all GraphQL queries r=fschutt a=Michael-F-Bryan This makes all queries used in the `wasmer-registry` crate public. See #3355 (comment) for some more context. Co-authored-by: Michael-F-Bryan <[email protected]>
Add some more queries to the
wasmer-registry
crate.I've also had to remove
lib/wasi-types/wit-bindgen
because it's a broken link to usewai-bindgen
from crates.io, otherwise you get the following error when trying to usewasmerio/wasmer
as a git dependency (I had to temporarily patch mywasmer-registry
from crates.io in https://github.com/wasmerio/pirita/pull/62 to see if this PR would work).