Replies: 2 comments
-
|
Has this been logged as a bug? Seems like a HUGE oversight? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
there is on new version support for assembly scanning, and is documented on docs. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Based on the code excerpts, I can see the root cause of this issue. The problem lies in how TickerQ discovers and registers functions across assemblies.
Looking at
src\TickerQ.Utilities\TickerFunctionProvider.cs, TickerQ uses a static registry to store functions:The issue is that TickerQ relies on source generators (as mentioned in the README) to discover and register
[TickerFunction]methods. Source generators typically run at compile time and generate code within the same assembly where the attributes are found.When you split your
[TickerFunction]methods across different assemblies:Setup A & B fail because the source generator in the application layer assembly generates registration code, but the web project (where
UseTickerQ()is called) doesn't have access to that generated registration code.Setup C works because both the
[TickerFunction]methods andUseTickerQ()are in the same assembly, so the source generator can properly register the functions in the same context where they're being used.Potential Solutions:
Manual Registration: You might need to manually call registration methods from your application layer in the startup project.
Assembly Scanning: TickerQ might need to implement assembly scanning to discover functions across referenced assemblies.
Explicit Registration: There might be an API to explicitly register functions from other assemblies that isn't documented in the provided excerpts.
To confirm this diagnosis, you could check if there are any registration methods or assembly scanning options in the TickerQ configuration that would allow cross-assembly function discovery.
Beta Was this translation helpful? Give feedback.
All reactions