boxo icon indicating copy to clipboard operation
boxo copied to clipboard

Broken WASM builds

Open hsanjuan opened this issue 2 years ago • 2 comments

Using latest versions of things I discovered that WASM builds are now broken.

# github.com/ipfs/go-libipfs/files
../../../../pkg/mod/github.com/ipfs/[email protected]/files/filewriter.go:25:13: undefined: createNewFile
../../../../pkg/mod/github.com/ipfs/[email protected]/files/filewriter.go:47:6: undefined: isValidFilename

I would normally be able to just use an older version of go-ipfs-files, but it was deprecated and now dependencies are only pulling the broken code present in libipfs.

I cannot think of a workaround in terms of dependency management that can fix this, is there one?

hsanjuan avatar Feb 25 '23 11:02 hsanjuan

I cannot think of a workaround in terms of dependency management that can fix this, is there one?

Off the top of my head Go vendoring almost always lets you fix the problem. However, given how small the fix is here I would just make that patch rather than trying to use an older version of the library that has other bugs in it.

WASM builds of this library aren't supported, but (as with other unsupported platforms) fixes are definitely welcome. If you'd like to fix the issue you can do so in a similar manner to https://github.com/ipfs/go-ipfs-files/pull/50.

aschmahmann avatar Feb 26 '23 03:02 aschmahmann

Triage notes:

  • Maintainers are concerned how future-proof this is, and IF we want to officially support WASM target
    • We need a policy on WARM.
      • If we are to merge https://github.com/ipfs/boxo/pull/573, we need to officially support wasm builds, and if we do that, we need to have regression tests / CI build that confirms WASM target always works on PRs that add new things.

lidel avatar Jun 25 '24 16:06 lidel