Title: Regression in v0.12.0: External error types no longer work with lambda_runtime::run · Issue #901 · aws/aws-lambda-rust-runtime · GitHub
Open Graph Title: Regression in v0.12.0: External error types no longer work with lambda_runtime::run · Issue #901 · aws/aws-lambda-rust-runtime
X Title: Regression in v0.12.0: External error types no longer work with lambda_runtime::run · Issue #901 · aws/aws-lambda-rust-runtime
Description: With the release of v0.12.0, it is no longer possible to use error types defined externally to your own crate. This is caused by the inclusion of #897. Example: // Works in both v0.11.3 and v0.12.0 type Error = Box
Open Graph Description: With the release of v0.12.0, it is no longer possible to use error types defined externally to your own crate. This is caused by the inclusion of #897. Example: // Works in both v0.11.3 and v0.12.0...
X Description: With the release of v0.12.0, it is no longer possible to use error types defined externally to your own crate. This is caused by the inclusion of #897. Example: // Works in both v0.11.3 and v0.12.0...
Opengraph URL: https://github.com/aws/aws-lambda-rust-runtime/issues/901
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Regression in v0.12.0: External error types no longer work with lambda_runtime::run","articleBody":"With the release of v0.12.0, it is no longer possible to use error types defined externally to your own crate. This is caused by the inclusion of #897.\r\n\r\nExample:\r\n\r\n```rust\r\n// Works in both v0.11.3 and v0.12.0\r\ntype Error = Box\u003cdyn std::error::Error\u003e;\r\n\r\n// Works in v0.11.3 but not in v0.12.0\r\n// type Error = std::io::Error;\r\n\r\n// Works in v0.11.3 but not in v0.12.0\r\n// type Error = anyhow::Error;\r\n\r\n// Works in neither v0.11.3 nor v0.12.0\r\n// type Error = lambda_runtime::Diagnostic\u003c'static\u003e;\r\n\r\nasync fn handler(_event: lambda_runtime::LambdaEvent\u003c()\u003e) -\u003e Result\u003c(), Error\u003e {\r\n Ok(())\r\n}\r\n\r\n#[tokio::main]\r\nasync fn main() {\r\n lambda_runtime::run(lambda_runtime::service_fn(handler))\r\n .await\r\n .unwrap();\r\n}\r\n```\r\n\r\nNote that it is not possible to implement `Into\u003cDiagnostic\u003c'a\u003e\u003e` yourself for any of these types because of the orphan rules.","author":{"url":"https://github.com/TethysSvensson","@type":"Person","name":"TethysSvensson"},"datePublished":"2024-06-26T15:13:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/901/aws-lambda-rust-runtime/issues/901"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c1d4d211-9df0-21c9-893b-fdce4f830dcb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 81DE:12FC7E:29927C:3533C8:698C17A5 |
| html-safe-nonce | 0939295867e9a430ec3734eca758bb3ddb83f1e19eeaf9f4cb37a7112190ae88 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MURFOjEyRkM3RToyOTkyN0M6MzUzM0M4OjY5OEMxN0E1IiwidmlzaXRvcl9pZCI6Ijg3MjE4NTU3MDM5NzMzNjk3NjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a1ed948155920bb1b69955afa7dcc53302d26d555340a1f904f4b7835df048ca |
| hovercard-subject-tag | issue:2375629768 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/aws/aws-lambda-rust-runtime/901/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c54818498d82eb853952d629a89984a08622b728da1b963e81811b88f83f7a50/aws/aws-lambda-rust-runtime/issues/901 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c54818498d82eb853952d629a89984a08622b728da1b963e81811b88f83f7a50/aws/aws-lambda-rust-runtime/issues/901 |
| og:image:alt | With the release of v0.12.0, it is no longer possible to use error types defined externally to your own crate. This is caused by the inclusion of #897. Example: // Works in both v0.11.3 and v0.12.0... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TethysSvensson |
| hostname | github.com |
| expected-hostname | github.com |
| None | 640eeb7b6ff4d8d106235d228c0c286e82592d4d2403227b5b2b4fc5832297a4 |
| turbo-cache-control | no-preview |
| go-import | github.com/aws/aws-lambda-rust-runtime git https://github.com/aws/aws-lambda-rust-runtime.git |
| octolytics-dimension-user_id | 2232217 |
| octolytics-dimension-user_login | aws |
| octolytics-dimension-repository_id | 156752158 |
| octolytics-dimension-repository_nwo | aws/aws-lambda-rust-runtime |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 156752158 |
| octolytics-dimension-repository_network_root_nwo | aws/aws-lambda-rust-runtime |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3d444f0a47beeeac94cddbb51c91ab408befe8d4 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width