-
Notifications
You must be signed in to change notification settings - Fork 301
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
Revist logging #3671
Revist logging #3671
Conversation
Reading the linked issue in your command, ringed a bell to me. I believe we still have some issues when running Fable in watch mode. I don't know if this is related to the logger or not but, when running a sub process via Fable sometimes the processes are freezing. Example of command: I observed a similar behaviour when working on fantomas-tool or even worth sometimes for that particular project where |
@nojaf The main problem there was that the logs were being re-written in the same line via cursor manipulation, this could cause hang ups if the output was redirected (e.g. calling Fable via Process APIs or in my case CLIWrap). From a quick glance on this PR, looks like the main change is that logging now goes through an I'm guessing that leaves using the cursor to write in the same line/position out of the window, if that is the case, I believe it should not break anyone calling fable from another process via stdio. |
Ok, thanks for confirming. For now, I think I'd like to remove that cursor manipulation thing, as it is probably tricky to achieve using the ILogger. |
The cursor manipulation allows for a much smaller / easier to read output in the log when Fable does all the recompilation of the files. So it would be nice to keep it. There is currently the |
Ok, I restored that cursor update functionality. |
I don't have much time this week, review will most likely happens next week. |
@nojaf Minor CI error to fix:
|
Thanks, is this project not part of the |
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
Alright, another crucial part of To guarantee that nobody ever sins against this, I've created an analyzer that detects calls to
I still need to address the actual |
/// Prevent ReflectionTypeLoadException | ||
/// From http://stackoverflow.com/a/7889272 | ||
let getTypes (asm: System.Reflection.Assembly) = | ||
let mutable types: Option<Type[]> = None |
Check notice
Code scanning / Ionide.Analyzers.Cli
Detect if generic type should be in the postfix position. Note
I removed the |
@ncave thanks! I've rebased and all is green now. @MangelMaxime with the |
Noted, I will work on the next release of Fable.
To trigger the release for If you could update the |
Done! |
Thank you for the contribution and to the reviewers |
Currently, a lot of logging happens directly to the standard output.
This is unwanted in the
Fable.Compiler
, and I wish to introduce a logging abstraction.Inside my use case, I would like to log in to memory or disk.
The only thing I'm not quite sure about is what to do with #2727. It seems like some code was written to avoid this problem and I'm not sure it will still be problematic after this change.
@AngelMunoz, is this still an active use-case of yours?