You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a custom generator that has many "this.log" statements. In a couple of code paths, I have a method that makes a series of log calls. One gets called from "initializing" and one gets called from "end". In those two cases only the first log statement gets output and the rest do not. At the same time, the "tihs.log(yosay(message));" in initializing doesn't prevent other log calls from working and neither does a call to another custom logging method being called under "writing". This started happening after I updated my 'yo' installation to v5 without changing the generator itself.
I debugged into my generator project and can see all the logging statements getting added to the queue but the first statement in those two cases seems to log and then then the queue has an "await" call after calling the log and that isn't getting resolved before all the other statements get logged and the method finished.
Based on the previous observation I awaited all my this.log calls (and made all the methods async) and that seems to work around the problem. I don't believe the log call itself it async so I'm a little confused about how this is working.
The text was updated successfully, but these errors were encountered:
Not that I don't believe you, but it's not feasible to take action on a description without a reproduction. Could you please provide an minimum reproduction that we can look at? https://antfu.me/posts/why-reproductions-are-required
I'm using a custom generator that has many "this.log" statements. In a couple of code paths, I have a method that makes a series of log calls. One gets called from "initializing" and one gets called from "end". In those two cases only the first log statement gets output and the rest do not. At the same time, the "tihs.log(yosay(message));" in initializing doesn't prevent other log calls from working and neither does a call to another custom logging method being called under "writing". This started happening after I updated my 'yo' installation to v5 without changing the generator itself.
I debugged into my generator project and can see all the logging statements getting added to the queue but the first statement in those two cases seems to log and then then the queue has an "await" call after calling the log and that isn't getting resolved before all the other statements get logged and the method finished.
Based on the previous observation I awaited all my this.log calls (and made all the methods async) and that seems to work around the problem. I don't believe the log call itself it async so I'm a little confused about how this is working.
The text was updated successfully, but these errors were encountered: