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

Inconsistent compiler prompt message when use --pause switch #445

Closed
mstyura opened this issue May 12, 2015 · 0 comments
Closed

Inconsistent compiler prompt message when use --pause switch #445

mstyura opened this issue May 12, 2015 · 0 comments

Comments

@mstyura
Copy link
Contributor

mstyura commented May 12, 2015

Description:
Run the compiler fsc.exe with the switch --pause (for example, to have a chance to attach a debugger) and pass some source files for compilation.
Compiler will prompt to press any key to continue, but implementation fscopts.fs#L764 actually uses read line and expect enter key.

Example:

E:\Projects\FSharp\Compiler>f4-1\net40\bin\fsc.exe test.fs --pause
Press any key to continue...
 Microsoft (R) F# Compiler version (private)
Copyright (c) Microsoft Corporation. All Rights Reserved.

Ok so far, but all of the subsequent prompts expect enter key

warning FS0075: The command-line option '--pause' is for test purposes only
[done 'Import mscorlib', entering 'Import mscorlib and FSharp.Core.dll'] press any key...
[done 'Import mscorlib and FSharp.Core.dll', entering 'Import system references'] press any key...
[done 'Import system references', entering 'Parse inputs'] press any key...
[done 'Parse inputs', entering 'Import non-system references'] press any key...
[done 'Import non-system references', entering 'Typecheck'] press any key...
[done 'Typecheck', entering 'Typechecked'] press any key...
[done 'Typechecked', entering 'Write Interface File'] press any key...
[done 'Write Interface File', entering 'Write XML document signatures'] press any key...
[done 'Write XML document signatures', entering 'Write XML docs'] press any key...
[done 'Write XML docs', entering 'Write HTML docs'] press any key...
[done 'Write HTML docs', entering 'Encode Interface Data'] press any key...
[done 'Encode Interface Data', entering 'Optimizations'] press any key...
[done 'Optimizations', entering 'Ending Optimizations'] press any key...
[done 'Ending Optimizations', entering 'Encoding OptData'] press any key...
[done 'Encoding OptData', entering 'TAST -> ILX'] press any key...

test.fs(1,81): warning FS0988: Main module of program is empty: nothing will happen when it is run
[done 'TAST -> ILX', entering 'ILX -> IL (Unions)'] press any key...
[done 'ILX -> IL (Unions)', entering 'ILX -> IL (Funcs)'] press any key...
[done 'ILX -> IL (Funcs)', entering 'Write .NET Binary'] press any key...
[done 'Write .NET Binary', entering 'Write Stats File'] press any key...
[done 'Write Stats File', entering 'Exiting'] press any key...

Expected:
Compiler continues when user press any key as specified in message OR compiler prompts to press enter.

Actual:
Compiler continues only after enter key.

Severity: Cosmetic

Version: 1251430

Workaround: Press enter key

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

No branches or pull requests

2 participants