Commit dcc68ed
committed
fix(macros): drop anyhow dependency from workflow_methods expansion
The `#[workflow_methods]` macro expanded to code that referenced
`::anyhow::Error` directly, forcing every downstream crate using the
proc-macro workflow API to add a direct `anyhow` dependency even when
its application code did not use `anyhow`.
Add a `From<workflows::WorkflowError> for WorkflowTermination` impl
that delegates to the existing `PayloadConversionError`/`anyhow::Error`
conversions, and have the macro convert the `serialize_result` error
through that impl instead of constructing an `anyhow::Error` itself.
Fixes #12451 parent 87162f5 commit dcc68ed
2 files changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1012 | 1012 | | |
1013 | 1013 | | |
1014 | 1014 | | |
1015 | | - | |
| 1015 | + | |
1016 | 1016 | | |
1017 | 1017 | | |
1018 | 1018 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
1284 | 1293 | | |
1285 | 1294 | | |
1286 | 1295 | | |
| |||
0 commit comments