temporalio / sdk-dotnet

Temporal .NET SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to debug sdk?

charzhao opened this issue · comments

I follow your build step as below:

Prerequisites:

.NET
Rust (i.e. cargo on the PATH)
Protobuf Compiler (i.e. protoc on the PATH)
This repository, cloned recursively

But I get below error, is there any thing i should do to let it pass?

MSBuild version 17.5.0-preview-23061-01+040e2a90e for .NET
正在确定要还原的项目…
已还原 C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\Temporalio.csproj (用时 601 ms)。
已还原 C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\tests\Temporalio.Tests\Temporalio.Tests.csproj (用时 1.54 sec)。
EXEC : error : failed to get temporal-client as a dependency of package temporal-sdk-bridge v0.1.0 (C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Tempora lio\Bridge) [C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\Temporalio.csproj]

Caused by:
failed to load source for dependency temporal-client

Caused by:
Unable to update C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\Bridge\sdk-core\client

Caused by:
failed to read C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\Bridge\sdk-core\client\Cargo.toml

Caused by:
绯荤粺鎵句笉鍒版寚瀹氱殑璺緞銆?(os error 3)
C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\Temporalio.csproj(46,5): error MSB3073: 命令“cargo build”已退出,代码为 101。
C:\Users\jzhao3.nuget\packages\microsoft.build.tasks.git\1.1.1\build\Microsoft.Build.Tasks.Git.targets(25,5): warning : Could not find file 'C:\Users\jzhao3\OneDrive

  • Tesla\temporal\sdk-dotnet\src\Temporalio\Bridge\sdk-core.git'. 无法通过源链接获取源代码。 [C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\Temporalio.csproj:
    :TargetFramework=netcoreapp3.1]
    C:\Program Files\dotnet\sdk\7.0.201\Microsoft.Common.CurrentVersion.targets(5181,5): error MSB3030: 无法复制文件“C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Tem
    poralio\Bridge\target\debug\temporal_sdk_bridge.dll”,原因是找不到该文件。 [C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\Temporalio.csproj::TargetFramework
    =netcoreapp3.1]

生成失败。

C:\Users\jzhao3.nuget\packages\microsoft.build.tasks.git\1.1.1\build\Microsoft.Build.Tasks.Git.targets(25,5): warning : Could not find file 'C:\Users\jzhao3\OneDrive

  • Tesla\temporal\sdk-dotnet\src\Temporalio\Bridge\sdk-core.git'. 无法通过源链接获取源代码。 [C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\Temporalio.csproj:
    :TargetFramework=netcoreapp3.1]
    EXEC : error : failed to get temporal-client as a dependency of package temporal-sdk-bridge v0.1.0 (C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Tempora lio\Bridge) [C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\Temporalio.csproj]
    C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\Temporalio.csproj(46,5): error MSB3073: 命令“cargo build”已退出,代码为 101。
    C:\Program Files\dotnet\sdk\7.0.201\Microsoft.Common.CurrentVersion.targets(5181,5): error MSB3030: 无法复制文件“C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Tem
    poralio\Bridge\target\debug\temporal_sdk_bridge.dll”,原因是找不到该文件。 [C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\Temporalio.csproj::TargetFramework
    =netcoreapp3.1]
    1 个警告
    3 个错误

Now I copy core-sdk source under "sdk-dotnet\src\Temporalio\Bridge" solve this issue, but i am not sure it is the best one.

another issue that prevent me to debug it as below :

1>EXEC : error : linker `link.exe` not found
1>  |
1>  = note: program not found
1>
1>note: the msvc targets depend on the msvc linker but `link.exe` was not found
1>
1>note: please ensure that Visual Studio 2017 or later, or Build Tools for Visual Studio were installed with the Visual C++ option.
1>
1>note: VS Code is a different product, and is not sufficient.
1>
1>EXEC : error : could not compile `indexmap` due to previous error
1>EXEC : warning : build failed, waiting for other jobs to finish...
1>EXEC : error : could not compile `lock_api` due to previous error
1>EXEC : error : could not compile `log` due to previous error
1>EXEC : error : could not compile `windows_x86_64_msvc` due to previous error
1>EXEC : error : could not compile `futures-core` due to previous error
1>EXEC : error : could not compile `quote` due to previous error
1>EXEC : error : could not compile `parking_lot_core` due to previous error
1>EXEC : error : could not compile `memchr` due to previous error
1>EXEC : error : could not compile `syn` due to previous error
1>EXEC : error : could not compile `proc-macro2` due to previous error
1>EXEC : error : could not compile `winapi` due to previous error

in my computer i have installed vs2019 and vs2022 , according my knowledge c++ build tools has ready for that, do you have any suggestion about this one?

Now I copy core-sdk source under "sdk-dotnet\src\Temporalio\Bridge" solve this issue, but i am not sure it is the best one.

Yes, from your pasted instructions "cloned recursively".

in my computer i have installed vs2019 and vs2022 , according my knowledge c++ build tools has ready for that, do you have any suggestion about this one?

I think this means C++ buildtools are not available. See https://stackoverflow.com/questions/55603111/unable-to-compile-rust-hello-world-on-windows-linker-link-exe-not-found. I will make sure to update the build instructions to say they are required.

Thanks for your comments, when i install C++ for desktop development those errors go, but i encounter the new issues.

Compiling temporal-sdk-core v0.1.0 (C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\Bridge\sdk-core\core)
1>error[E0599]: no method named update_workflow found for struct RetryClient in the current scope
1> --> src\client.rs:329:53
1> |
1>329 | "UpdateWorkflow" => rpc_call!(client, call, update_workflow),
1> | ^^^^^^^^^^^^^^^ method not found in RetryClient<ConfiguredClient<TemporalServiceClient<InterceptedService<temporal_client::metrics::GrpcMetricSvc, ServiceCallInterceptor>>>>
1>
1>error[E0599]: no method named update_workflow found for struct ConfiguredClient<TemporalServiceClient<InterceptedService<temporal_client::metrics::GrpcMetricSvc, ServiceCallInterceptor>>> in the current scope
1> --> src\client.rs:329:53
1> |
1>329 | "UpdateWorkflow" => rpc_call!(client, call, update_workflow),
1> | ^^^^^^^^^^^^^^^ method not found in ConfiguredClient<TemporalServiceClient<InterceptedService<temporal_client::metrics::GrpcMetricSvc, ServiceCallInterceptor>>>
1>
1>error[E0599]: Option<temporal_sdk_core::telemetry::metrics::TemporalMeter<'_>> is not an iterator
1> --> src\client.rs:106:52
1> |
1>106 | let metric_meter = runtime.core.metric_meter().cloned();
1> | ^^^^^^ Option<temporal_sdk_core::telemetry::metrics::TemporalMeter<'_>> is not an iterator
1> --> /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483\library\core\src\option.rs:518:1
1> |
1> = note: doesn't satisfy _: Iterator
1> |
1> = note: the following trait bounds were not satisfied:
1> Option<temporal_sdk_core::telemetry::metrics::TemporalMeter<'_>>: Iterator
1> which is required by &mut Option<temporal_sdk_core::telemetry::metrics::TemporalMeter<'_>>: Iterator
1>
1>error[E0599]: no variant named Default found for enum EphemeralExeVersion
1> --> src\testing.rs:239:73
1> |
1>239 | "default" => ephemeral_server::EphemeralExeVersion::Default {
1> | ^^^^^^^ variant not found in EphemeralExeVersion
1>
1>For more information about this error, try rustc --explain E0599.
1>EXEC : error : could not compile temporal-sdk-bridge due to 4 previous errors
1>C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\Temporalio.csproj(46,5): error MSB3073: 命令“cargo build”已退出,代码为 101。
1>已完成生成项目“Temporalio.csproj”的操作 - 失败。
2>------ 已启动生成: 项目: Temporalio.Tests, 配置: Debug Any CPU ------
2>CSC : error CS0006: 未能找到元数据文件“C:\Users\jzhao3\OneDrive - Tesla\temporal\sdk-dotnet\src\Temporalio\bin\Debug\netcoreapp3.1\Temporalio.dll”
2>已完成生成项目“Temporalio.Tests.csproj”的操作 - 失败。
========== 生成: 0 成功,2 失败,0 最新,0 已跳过 ==========
========= 生成 开始于 9:34 AM,并花费了 02:33.626 分钟 =========

seems like i did not use the right version core-sdk? so here what is the right version, could your help on those information.

Did you clone recursively at the same version that's in here or did you try to clone a different sdk-core version.

Can you attach a log of you running these three commands in a blank directory in order?

git clone --recursive https://github.com/temporalio/sdk-dotnet.git
cd sdk-dotnet
dotnet build

Thanks, It worked now.