question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dotnet fsi broken on inputs that take more than 1 line

See original GitHub issue

Please provide a succinct description of the issue.

dotnet fsi breaks because it cannot read multiline expressions

Provide the steps required to reproduce the problem:

1 run dotnet fsi 2 insert any expr taking more than 1 line in console 3 reach the bottom of console 4 the interpreter goes crazy

7.0.2xx sdk: dotnet-fsi

issue does not exist in 7.0.1** sdk: dotnet-fsi-old

workaround is to revert back to 7.0.1

sudo apt-get install dotnet-sdk-7.0=7.0.104-1

Issue Analytics

  • State:open
  • Created 6 months ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
NatElkinscommented, Mar 24, 2023

I also experienced this on macOS.

0reactions
sgoguencommented, Jun 11, 2023

The following update to console.fs to the function seems to resolve the issue on my Mac.

        let moveCursorToNextLine c =
            let charSize = x.GetCharacterSize(c)

            if Console.CursorLeft + charSize > Utils.bufferWidth () then
                if Console.CursorTop + 1 = Console.BufferHeight then
                    try
                        Console.BufferHeight <- Console.BufferHeight + 1
                    with _ ->
                        // If we can't increase the buffer height, just write a newline.
                        Console.WriteLine()
                        // When we add a newline, we need to reflect the change in the anchor.
                        anchor <- { anchor with top = (anchor).top - 1 }
                    
                Cursor.Move(0)
Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet fsi startup overhead surprisingly high · Issue #12636
On Windows I'm consistently seeing just above 1s for Measure-Command { dotnet fsi .\unit.fsx } . Quite a lot less than your Linux...
Read more >
App.config and F# Interactive not working
While FSI dynamically generates code for your input, using the fsi.exe.config will work just fine. I created this file: <configuration> < ...
Read more >
F# Interactive (dotnet) Reference
Learn how F# Interactive (dotnet fsi) is used to run F# code interactively at the console or to execute F# scripts.
Read more >
F# code formatting guidelines
Learn guidelines for formatting F# code.
Read more >
F# Command Line Interactive Repl - linux
Rather than typing directly into a REPL, I recommend creating an F# script file ... Under openSUSE Leap 15.3 the command is dotnet...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found