isatty fix for luvit runtime #77

Merged
PatrickDahlin merged 1 commit from master into master 2022-03-01 07:09:35 +01:00
PatrickDahlin commented 2022-02-27 13:39:14 +01:00 (Migrated from github.com)

This makes the library usable with luvit runtime, however the tests wont run correctly because of the change in behaviour of 'require' (and it's output).

The library does work as expected as far as I've tested it even tho the tests mostly fail.

eg:
expected: test.lua:12 in upvalue 'func2' got : E:\Projects\Lua\debugger.lua\test\test.lua:12 in upvalue 'func2'
Path is the full path of tests file, while luajit for example emits only the filename.

Sidenote: This seems to have been fixed before but changes reverted at some point, #12 refers to a similar issue aswell.

This makes the library usable with [luvit](https://github.com/luvit/luvit) runtime, however the tests wont run correctly because of the change in behaviour of 'require' (and it's output). The library does work as expected as far as I've tested it even tho the tests mostly fail. eg: `expected: test.lua:12 in upvalue 'func2' got : E:\Projects\Lua\debugger.lua\test\test.lua:12 in upvalue 'func2' ` Path is the full path of tests file, while luajit for example emits only the filename. Sidenote: This seems to have been fixed before but changes reverted at some point, #12 refers to a similar issue aswell.
slembcke commented 2022-03-01 07:16:30 +01:00 (Migrated from github.com)

Yeah... all of the stuff for implementing history libraries, tty detection, etc is a real crap chute (that's the expression right? <_<) I'm highly considering removing all of that and sticking it in a secondary optional file. Automatically detecting color support probably shouldn't be a core feature, and inferring it via tty is a really poor heuristic anyway. It would probably cause less headaches if you simply opt into color support if you know you can use it.

Anyway, until then I guess it's good to gather up info people can use to integrate it into more places.

Yeah... all of the stuff for implementing history libraries, tty detection, etc is a real crap chute (that's the expression right? <_<) I'm _highly_ considering removing all of that and sticking it in a secondary optional file. Automatically detecting color support probably shouldn't be a core feature, and inferring it via tty is a really poor heuristic anyway. It would probably cause less headaches if you simply opt into color support if you know you can use it. Anyway, until then I guess it's good to gather up info people can use to integrate it into more places.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
slembcke/debugger.lua!77
No description provided.