wasmCloud / wash

WAsmcloud SHell - the comprehensive command-line tool for wasmCloud development
https://wasmcloud.com
Apache License 2.0
148 stars 58 forks source link

[BUG] docs.rs documentation broken #831

Closed rvolosatovs closed 11 months ago

rvolosatovs commented 11 months ago

Describe the bug docs.rs is unable to build the documentation of wash-lib

To Reproduce Steps to reproduce the behavior:

  1. Go to https://docs.rs/crate/wash-lib/latest

Expected behavior Docs available on docs.rs

Screenshots 2023-09-26-22:15:05-screenshot

Environment (please complete the following information)

Additional context 0.9.1 was the last successful build

connorsmith256 commented 11 months ago

Here's the error from docs.rs:

[INFO] [stderr]   Error: `https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasi_snapshot_preview1.command.wasm` is not a valid URL
[INFO] [stderr] 
[INFO] [stderr]   Caused by:
[INFO] [stderr]       0: error sending request for url (https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.1/wasi_snapshot_preview1.command.wasm): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
[INFO] [stderr]       1: error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
[INFO] [stderr]       2: dns error: failed to lookup address information: Temporary failure in name resolution
[INFO] [stderr]       3: failed to lookup address information: Temporary failure in name resolution

I just released v0.11 of wash-lib, so hopefully this doesn't happen again 🤞

connorsmith256 commented 11 months ago

Unfortunately it happened again. I'm not sure, but I suspect it's because build.rs is trying to download the adapter, and the container that docs.rs uses doesn't support network access?

brooksmtownsend commented 11 months ago

I assume that means that we will have to bundle the adapter in with our repo?

rvolosatovs commented 11 months ago

I assume that means that we will have to bundle the adapter in with our repo?

Kind of, what we could do is introduce a feature flag and enable it for docs.rs. I've seen other projects do that.

connorsmith256 commented 11 months ago

Yeah I think a docs FF is the quickest solution

connorsmith256 commented 11 months ago

We should be able to use custom metadata for docs.rs to enable the feature flag. Note the fix will be to https://github.com/wasmCloud/wasmcloud-component-adapters, since that's where the build.rs is

I started filing a good first issue but since that repo isn't well-known, I think a maintainer will have to take this one on

connorsmith256 commented 11 months ago

Fixed :) https://docs.rs/wash-lib/latest/wash_lib/