-
Notifications
You must be signed in to change notification settings - Fork 586
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
FAKE doesn't support Unicode output redirection #2503
Comments
Welcome to the FAKE community! Thank you so much for creating your first issue and therefore improving the project! |
I took a quick look at the dump. If not please make sure the process actually exits, because |
No, the define does not generate "At least one redirection task did not finish:" output. The tool I try to run is yarn (basic SAFE stack template) and with the redirect output, the bottom left bar keeps showing Building... and never starts actually debugging the client. |
@Balinth As far as I can see it behaves as designed. You apparently are running |
@matthid I had some time to look further into the problem, and got closer to the cause (but not the root, or a solution) The more accurate problem is, that the redirected output screws up unicode characters, and VS Code looks for a specific console output to know when the yarn task is done building and entered watch mode: "i 「wdm」: Compiled" This gets mangled to "i ?wdm?: Compiled" with the FAKE redirection In trying to circumvent the problem, I tried setting |
@Balinth Maybe you can contribute a failing test case so it is easier for me to look into it? |
The simple case: putting |
@Balinth I'm still not 100% sure what the scenario is or how to reproduce myself. |
The most basic case, create a new FAKE build.fsx and inside it anywhere call Trace.trace "「" and the console output will be "?". |
Are you sure this has something to do with FAKE? dotnet new console -lang f#
# add printfn "「"
dotnet run
I'm not exactly sure what's going on but it looks like it is way out of our league... |
The following changes that behavior [<EntryPoint>]
let main argv =
Console.OutputEncoding <- System.Text.Encoding.UTF8
printfn "「"
0 // return an integer exit code I'm not sure how 'safe' it is to add this to FAKE globally. |
Ok scratch that. Adding those lines to the script doesn't seem to work for some reason. |
One thing to consider when fixing this: #1461 |
I'm not quite sure why the same line of code works when running at the start of |
From testing around locally I'm pretty sure the So in the new version:
Thanks for the report and the detailed research with the repro steps :). |
Please test with |
Tested locally, and solves the issue. FAKE_DISABLE_UTF8=true also unsolves the issue if that was someone's poison, thanks for taking the time! |
Description
Exact same problem as #2401 I see that got stale because the original reporter could not reproduce it any longer.
In my case, the problem persists without fail, so I thought to upload the dump if it helps:
gdrive file to dump
Repro steps
FAKE script:
let runToolWithOutputFiltering cmd args workingDir = let arguments = args |> String.split ' ' |> Arguments.OfArgs Command.RawCommand (cmd, arguments) |> CreateProcess.fromCommand |> CreateProcess.withWorkingDirectory workingDir |> CreateProcess.ensureExitCode |> CreateProcess.redirectOutput |> CreateProcess.withOutputEventsNotNull Trace.trace Trace.traceError |> Proc.run |> ignore
with
Fake.Core.Process (5.19.1)
The text was updated successfully, but these errors were encountered: