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

[Request] BackgroundWorker main method supported translations. #151

Open
Telavian opened this issue Jul 3, 2024 · 2 comments
Open

[Request] BackgroundWorker main method supported translations. #151

Telavian opened this issue Jul 3, 2024 · 2 comments

Comments

@Telavian
Copy link

Telavian commented Jul 3, 2024

If I have a Console.WriteLine or Logger.LogInformation in the BackgroundWorker.Main method then the build will always fail.

For instance, this will work

    [BackgroundWorkerMain]
    public override void Main()
    {
        //Logger.LogInformation("Initializing extension");
        WebExtensions.Runtime.OnInstalled.AddListener(OnInstalled);              
    } 

This will fail

    [BackgroundWorkerMain]
    public override void Main()
    {
        Logger.LogInformation("Initializing extension");
        WebExtensions.Runtime.OnInstalled.AddListener(OnInstalled);              
    } 
@mingyaulee mingyaulee changed the title Logging In BackgroundWorker main method fails [Request] BackgroundWorker main method supported translations. Jul 3, 2024
@mingyaulee
Copy link
Owner

Yes at the moment logging is not translated to JS yet. The initial support for translating C# to JS only allows calling to extension APIs and declaring constant variables.

I am renaming this issue so that we can continue to use it as a tracker for all the requests for new translation supports like this.

@mingyaulee
Copy link
Owner

Logging methods translation is now supported in v1.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants