C#: tests in CI are disabled

Aberta
#1,700 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
42/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
csharp, github-actions, rust
Domínio
ci-cd, testing

Direção de pesquisa

Comece pela configuração de CI e reproduza as falhas em tests/runtime/rust/dylibs/runner.rs e tests/runtime/variants/test.cs usando as versões referenciadas do wasi-sdk. Compare os erros do linker entre os SDK 29, 32 e 34 e, em seguida, verifique se os testes C# podem ser reativados e se os testes afetados de runtime e variants são concluídos com sucesso.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

gen-c#

In https://github.com/bytecodealliance/wit-bindgen/pull/1699 I'm disabling testing with C# due to failures building tests.

An example failure with wasi-sdk-29 is here:

---- tests/runtime/rust/dylibs/runner.rs ----
  component: runner
  path: tests/runtime/rust/dylibs/runner.rs
  error: failed to compile component "tests/runtime/rust/dylibs/runner.rs"
  
  Caused by:
      command execution failed
      command: BINDINGS="/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/dylibs/runner-rust/bindings/runner.rs" CARGO_MANIFEST_DIR="tests/runtime/rust/dylibs" "rustc" "--edition=2021" "--target" "wasm32-wasip2" "-Dwarnings" "-Cdebuginfo=1" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/debug/deps" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/debug/build/quote-53a208424db1e1d7" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/debug/build/serde_core-0ecc340f22280655" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/debug/build/proc-macro2-6955ed29c3acce69" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/debug/build/anyhow-ce8ecf614e24fd86" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/debug/build/zmij-5e4b739506ce1fa0" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/debug/build/serde_json-2bddfa072642257e" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/debug/build/serde-8c4981138e2ed61c" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/debug/build/prettyplease-3bdb7e6f3ad61c08" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/wasm32-wasip2/debug/deps" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/debug/build/wit-bindgen-rust-ea4e7d82dea7c074" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/debug/build/wit-bindgen-rust-macro-b2978fab7bdd55a9" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/debug/build/wit-bindgen-a11e78330ba53fc2" "-Ldependency=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/wasm32-wasip2/debug" "-Lnative=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/wasm32-wasip2/debug/build/wit-bindgen-41a5941b58e7a593/out" "--extern=wit_bindgen=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/wasm32-wasip2/debug/libwit_bindgen.rlib" "--extern=wit_bindgen=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/wasm32-wasip2/debug/deps/libwit_bindgen-83c4ea851fcc31f6.rmeta" "--extern=futures=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/wasm32-wasip2/debug/libfutures.rlib" "--extern=futures=/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/wasm32-wasip2/debug/deps/libfutures-b27c7f5ef205c54f.rmeta" "tests/runtime/rust/dylibs/runner.rs" "-o" "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/dylibs/runner-rust.core.wasm" "-Clink-arg=-shared" "-Clink-self-contained=n" "-Clinker=/opt/hostedtoolcache/wasi-sdk-29.0-x86_64-linux/bin/clang" "-L" "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/dylibs/runner-rust" "--crate-type=cdylib" "-Clink-arg=-Wl,--skip-wit-component"
      status: exit status: 1
      stderr:
        error: linking with `/opt/hostedtoolcache/wasi-sdk-29.0-x86_64-linux/bin/clang` failed: exit status: 1
          |
          = note:  "/opt/hostedtoolcache/wasi-sdk-29.0-x86_64-linux/bin/clang" "-Wl,--no-export-dynamic" "-Wl,--export" "-Wl,run" "-Wl,--export" "-Wl,cabi_realloc" "-Wl,-z" "-Wl,stack-size=1048576" "-Wl,--stack-first" "-Wl,--no-demangle" "<2 object files omitted>" "-ldylib_dep" "<sysroot>/lib/rustlib/wasm32-wasip2/lib/libpanic_abort-*.rlib" "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/wasm32-wasip2/debug/libwit_bindgen.rlib" "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/wasm32-wasip2/debug/deps/{libfutures-b27c7f5ef205c54f,libfutures_executor-922299a107bb047a,libfutures_util-9dc6196014b01a3f,libmemchr-42aea3167221f1c8,libfutures_io-8f5dbb637f9af8fd,libslab-e7bcb3e3d56d11ea,libfutures_channel-e0220edc4c5fb7be,libpin_project_lite-6a517c497ca1cc61,libfutures_sink-47a2cb5e9ef840c0,libfutures_task-df6ab379a1a807af,libfutures_core-f82a2f8330c0d626,libbitflags-860f6eb07a090227}.rlib" "<sysroot>/lib/rustlib/wasm32-wasip2/lib/{libstd-*,libwasip2-*,libwit_bindgen-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*}.rlib" "-lc" "<sysroot>/lib/rustlib/wasm32-wasip2/lib/{librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "--target=wasm32-wasip2" "-L" "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/rust/wit-bindgen/target/wasm32-wasip2/debug/build/wit-bindgen-41a5941b58e7a593/out" "-L" "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/dylibs/runner-rust" "-o" "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/dylibs/runner-rust.core.wasm" "-Wl,--gc-sections" "-static" "-shared" "-nodefaultlibs" "-shared" "-Wl,--skip-wit-component"
          = note: some arguments are omitted. use `--verbose` to show all linker arguments
          = note: wasm-ld: warning: creating shared libraries, with -shared, is not yet stable
                  PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
                  error: failed to invoke LLD: signal: 11 (SIGSEGV) (core dumped)
                  clang: error: linker command failed with exit code 1 (use -v to see invocation)
                  
        
        error: aborting due to 1 previous error
        
        


failures:
    tests/runtime/rust/dylibs/runner.rs

an example failure with wasi-sdk-32 is here

---- tests/runtime/variants/test.cs ----
  component: test
  path: tests/runtime/variants/test.cs
  error: failed to compile component "tests/runtime/variants/test.cs"
  
  Caused by:
      command execution failed
      command: cd "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings" && "/usr/share/dotnet/dotnet" "publish" "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj" "-r" "wasi-wasm" "-c" "Debug" "/p:PlatformTarget=AnyCPU" "/p:MSBuildEnableWorkloadResolver=false" "--self-contained" "/p:UseAppHost=false" "-o" "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/csharp-testcase"
      status: exit status: 1
      stdout:
          Determining projects to restore...
          Restored /home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj (in 1.28 sec).
          TestWorld -> /home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/bin/Debug/net10.0/wasi-wasm/csharp-testcase.dll
        /home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/.packages/microsoft.dotnet.ilcompiler.llvm/10.0.0-rc.1.26357.1/build/Microsoft.NETCore.Native.Wasm.targets(48,5): warning : Wasi SDK version 33.0+m is being used. This differs from the expected 29.0 and might result in build or runtime failures. [/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj]
          Generating native code
          LLVM compilation to IR finished in 6.14 seconds
          LLVM generation of bitcode finished in 0.62 seconds
          LLVM generation of debug info finished in 0.11 seconds
          Object writing finished in 0.64 seconds, allocated 36.63 MB
        wasm-ld : error : --global-base cannot be less than stack size when --stack-first is used [/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj]
        EXEC : error : failed to invoke LLD: exit status: 1 [/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj]
        clang : error : linker command failed with exit code 1 (use -v to see invocation) [/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj]
        /home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/.packages/microsoft.dotnet.ilcompiler.llvm/10.0.0-rc.1.26357.1/build/Microsoft.NETCore.Native.targets(616,5): error MSB3073: The command ""/opt/hostedtoolcache/wasi-sdk-33.0-x86_64-linux/bin/clang" @obj/Debug/net10.0/wasi-wasm/native/link.rsp " exited with code 1. [/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj]

and example failure with wasi-sdk-34 is here

---- tests/runtime/variants/test.cs ----
  component: test
  path: tests/runtime/variants/test.cs
  error: failed to compile component "tests/runtime/variants/test.cs"
  
  Caused by:
      command execution failed
      command: cd "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings" && "/usr/share/dotnet/dotnet" "publish" "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj" "-r" "wasi-wasm" "-c" "Debug" "/p:PlatformTarget=AnyCPU" "/p:MSBuildEnableWorkloadResolver=false" "--self-contained" "/p:UseAppHost=false" "-o" "/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/csharp-testcase"
      status: exit status: 1
      stdout:
          Determining projects to restore...
          Restored /home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj (in 1.28 sec).
          TestWorld -> /home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/bin/Debug/net10.0/wasi-wasm/csharp-testcase.dll
        /home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/.packages/microsoft.dotnet.ilcompiler.llvm/10.0.0-rc.1.26357.1/build/Microsoft.NETCore.Native.Wasm.targets(48,5): warning : Wasi SDK version 33.0+m is being used. This differs from the expected 29.0 and might result in build or runtime failures. [/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj]
          Generating native code
          LLVM compilation to IR finished in 6.14 seconds
          LLVM generation of bitcode finished in 0.62 seconds
          LLVM generation of debug info finished in 0.11 seconds
          Object writing finished in 0.64 seconds, allocated 36.63 MB
        wasm-ld : error : --global-base cannot be less than stack size when --stack-first is used [/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj]
        EXEC : error : failed to invoke LLD: exit status: 1 [/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj]
        clang : error : linker command failed with exit code 1 (use -v to see invocation) [/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj]
        /home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/.packages/microsoft.dotnet.ilcompiler.llvm/10.0.0-rc.1.26357.1/build/Microsoft.NETCore.Native.targets(616,5): error MSB3073: The command ""/opt/hostedtoolcache/wasi-sdk-33.0-x86_64-linux/bin/clang" @obj/Debug/net10.0/wasi-wasm/native/link.rsp " exited with code 1. [/home/runner/work/wit-bindgen/wit-bindgen/target/artifacts/variants/test-csharp/bindings/TestWorld.csproj]

cc @yowl

Linguagem predominante
Rust
Estrelas
1.5k
Forks
306
Merge médio
1d 4h
PRs com merge (30d)
21

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

  • Sem Dockerfile nem arquivo Docker Compose
  • Sem modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de bytecodealliance/wit-bindgen

Todas as issues de bytecodealliance/wit-bindgen

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.