Weird issue with @DependencyClient and typed throws #324
Unanswered
finestructure
asked this question in
Q&A
Replies: 2 comments 2 replies
-
FWIW, I was able to work around this by simply not using the |
Beta Was this translation helpful? Give feedback.
0 replies
-
@finestructure I think the library still needs to be updated to support typed throws. It hasn't been on the top of our list but if anyone tackles a PR we will gladly merge it! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Happy New Year 🥳🙂
I'm encountering a baffling issue trying to add a dependency with a typed throwing function in a
@DependencyClient
. The client looks like this (trimmed down):The macro is failing to compile with an error inside the generated code
I went to create a minimal reproducer for the issue - only to find that it doesn't reproduce in this new package. It compiles fine.
I then went and copied the exact same source file into the main project and it fails to compile with the same error as the original attempt.
I've compared the package manifests - both tools-version 6.0, same dependency versions - and I'm at a loss what the difference could possibly be.
As the title indicates, this seems to be related to the typed throw
throws(Github2.Error)
. If I make the closurethrows
it compiles.But not only that: it also compiles, even with the typed throw, if I comment out the
fetchLicense
closure 🤯:So to summarise:
Any ideas what might be going on? Why would this fail embedded in the bigger project while it works for all scenarios in the standalone one? Any ideas what I could look at in the main project to further isolate the issue?
Just to make sure I'm not imagining things, I've re-run everything with fresh checkouts. Here's the recipe to reproduce:
And my transcript:
Beta Was this translation helpful? Give feedback.
All reactions