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
Describe the bug
I have been using focus to work with odin projects which so far is a pleasant experience. Recently however, their test module got a major makeover which focus does not seem to be able to handle.
From the conversation with obiwanus on Discord, the issue stems from focus not expecting or being able to handle the escape codes being produced.
Create a focus-config file so you can run the odin project and get the output like so: > odin test /path/to/project/
Run the test project via the command modal in focus
Expected behavior
[INFO ] --- [2024-08-17 07:52:29] Starting test runner with 1 thread. Set with -define:ODIN_TEST_THREADS=n.
[INFO ] --- [2024-08-17 07:52:29] The random seed sent to every test is: 39114654177527. Set with -define:ODIN_TEST_RANDOM_SEED=n.
[INFO ] --- [2024-08-17 07:52:29] Memory tracking is enabled. Tests will log their memory usage if there's an issue.[INFO ] --- [2024-08-17 07:52:29] < Final Mem/ Total Mem> < Peak Mem> (#Free/Alloc) :: [package.test_name][INFO ] --- [2024-08-17 07:52:29] [rendering.odin:9:example()] Debug testrendering [| ] 1 :: [package done]Finished 1 test in 270µs. The test was successful.
Actual behaviour
�[?25l�[?7lrendering [�[90m| �[0m] 0/ 1 :: �[90mexample�[0m
�[?7h1 thread 0/ 1 :: total
�[2F�[J�]2;Odin test runner (0/1)�\�[?7lrendering [�[33m| �[0m] 0/ 1 :: �[33mexample�[0m
�[?7h1 thread 0/ 1 :: total
�[2F�[J�]2;Odin test runner (1/1)�\�[?7lrendering [�[32m| �[0m] 1 :: [package done]
�[?7h
�[?25h�[0m[INFO ] --- �[0m[2024-08-17 07:53:51] Starting test runner with 1 thread. Set with -define:ODIN_TEST_THREADS=n.
�[0m[INFO ] --- �[0m[2024-08-17 07:53:51] The random seed sent to every test is: 39368671393172. Set with -define:ODIN_TEST_RANDOM_SEED=n.
�[0m[INFO ] --- �[0m[2024-08-17 07:53:51] Memory tracking is enabled. Tests will log their memory usage if there's an issue.�[0m[INFO ] --- �[0m[2024-08-17 07:53:51] < Final Mem/ Total Mem> < Peak Mem> (#Free/Alloc) :: [package.test_name]�[0m[INFO ] --- �[0m[2024-08-17 07:53:51] [rendering.odin:9:example()] Debug testFinished 1 test in 151µs. The test was �[32msuccessful.�[0m
Screenshots
Expected:
Actual:
OS: macOS 12.7.2
Focus 0.6.0-5fd56ce
The text was updated successfully, but these errors were encountered:
MrStevns
changed the title
Focus output does not handle certain escape codes
[Bug] Focus output does not handle certain escape codes
Aug 17, 2024
MrStevns
changed the title
[Bug] Focus output does not handle certain escape codes
[Bug] Output window does not handle certain escape codes
Aug 17, 2024
However since it's a recent addition to Odin maybe you could reach out to ginger Bill and tell him that escape codes should only be used when the output is being sent to a terminal?
Other programs are able to detect this and not send escape codes. E.g. Jai does this.
Unless this program intends to parse ANSI SGR codes, both color and cursor motion, then this is strictly an issue with Odin's ability to detect the presence of a TTY.
Describe the bug
I have been using focus to work with odin projects which so far is a pleasant experience. Recently however, their test module got a major makeover which focus does not seem to be able to handle.
From the conversation with obiwanus on Discord, the issue stems from focus not expecting or being able to handle the escape codes being produced.
To Reproduce
> odin test /path/to/project/
Expected behavior
Actual behaviour
Screenshots
Expected:
Actual:
The text was updated successfully, but these errors were encountered: