Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WorkerExtensionStartupAttribute does not work for F# #1246

Open
jviau opened this issue Dec 19, 2022 · 3 comments
Open

WorkerExtensionStartupAttribute does not work for F# #1246

jviau opened this issue Dec 19, 2022 · 3 comments
Labels
external Issues that impact function apps, but are caused by external factors team-issue

Comments

@jviau
Copy link
Contributor

jviau commented Dec 19, 2022

Issue

Types marked with WorkerExtensionStartupAttribute are not being called automatically on worker startup when using F#. This is due to this attribute relying on ExtensionStartupRunnerGenerator (source gen) to function - which does not work for F#.

Impact

Any extension which relies on that attribute to configure themselves does not work for F#. One such extension is Durable Functions, which uses that attribute to inject services and configure options.

Workaround

In environments where source generation does not run, applications will need to manually configure extensions on startup:

Host.CreateDefaultBuilder()
    .ConfigureFunctionsWorkerDefaults(app =>
    {
        new ServiceBusExtensionStartup().Configure(app);
    });
@kmadof
Copy link

kmadof commented Oct 27, 2024

Any update here?

@jviau
Copy link
Contributor Author

jviau commented Oct 28, 2024

@kmadof the workaround is to manually configure the extension. The root issue is external to us: source generation is not available in F#.

@jviau jviau added external Issues that impact function apps, but are caused by external factors and removed bug Something isn't working labels Oct 28, 2024
@kmadof
Copy link

kmadof commented Oct 28, 2024

I found the issue (Support Source Generators #864) confirming your words

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Issues that impact function apps, but are caused by external factors team-issue
Projects
None yet
Development

No branches or pull requests

4 participants