Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

dioxus build - Failed to parse name custom section #62

Closed
dxps opened this issue Aug 19, 2022 · 4 comments
Closed

dioxus build - Failed to parse name custom section #62

dxps opened this issue Aug 19, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@dxps
Copy link
Contributor

dxps commented Aug 19, 2022

Hi everyone!

Using dioxus CLI ver. 0.1.5, when building the project a warning message is thrown.
However, the details are not descriptive enough to be addressed by the user.

❯ dioxus build
[INFO] πŸš… Running build command...
[INFO] πŸ‘‘ Build done.
[WARN] failed to parse `name` custom section Invalid name type (at offset 17635851)
❯ 
@mrxiaozhuox
Copy link
Collaborator

We don't know how to fix this problem, but this warn info does not affect the project.

@dxps
Copy link
Contributor Author

dxps commented Aug 19, 2022

That is correct. Ok, I'll try to find some time this weekend, see if I can get a clue about it. 😊

@mrxiaozhuox mrxiaozhuox added the bug Something isn't working label Aug 19, 2022
@dxps
Copy link
Contributor Author

dxps commented Aug 19, 2022

It looks like that this warning is being thrown by the wasmparser, an indirect dependency.

For versions 0.59.0 or 0.77.0 (as per cargo tree) there is this code:

    pub(crate) fn read_name_type(&mut self) -> Result<NameType> {
        let code = self.read_var_u7()?;
        match code {
            0 => Ok(NameType::Module),
            1 => Ok(NameType::Function),
            2 => Ok(NameType::Local),
            _ => Err(BinaryReaderError::new(
                "Invalid name type",
                self.original_position() - 1,
            )),
        }
    }

Meanwhile, this part evolved (as shown here), and it knows about more NameType values.


The quick part of just updating wasm-bindgen-cli-support to v0.2.82 doesn't solve it as it still includes these older versions as shown below:

β”œβ”€β”€ wasm-bindgen-cli-support v0.2.82
β”‚   β”œβ”€β”€ anyhow v1.0.61
    ...
β”‚   β”œβ”€β”€ walrus v0.19.0
β”‚   β”‚   β”œβ”€β”€ anyhow v1.0.61
        ...
β”‚   β”‚   └── wasmparser v0.77.0         <-----------
    ...
β”‚   β”œβ”€β”€ wit-validator v0.2.1
β”‚   β”‚   β”œβ”€β”€ anyhow v1.0.61
β”‚   β”‚   β”œβ”€β”€ wasmparser v0.59.0         <-----------
        ...

@mrxiaozhuox
Copy link
Collaborator

So we can only wait.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants