ReplMaker.jl
ReplMaker.jl copied to clipboard
Set up CI using GitHub Actions (WIP, tests fail)
Also disable Travis CI which last run for this project ~9 months ago, and enable Julia TagBot, see https://github.com/marketplace/actions/julia-tagbot
The action won't be run on this repository until this PR is merged, for security reasons. However, it'll run in my fork of the project, so you can get a "preview" of what this will look like at https://github.com/fingolfin/ReplMaker.jl/actions
Unfortunately, tests fail here in CI -- despite running just fine locally. I.e., I cannot replicate the issue on my computer. I also cannot replicate it on the CI machine when I use https://github.com/mxschmitt/action-tmate to SSH into it. But I did hack test/runtest.jl to print some debug output into a file... Note that just printing it via println to stdou doesn't work, it isn't shown; instead we see the data that is supposed to go to the child processes. And the logged data also looks like that... i.e.,:
$ cat test/out1.log
1: using ReplMaker\r
2: function parse_to_expr(s)\r
3: quote Meta.parse($s) end\r
4: end\r
5: initrepl(parse_to_expr,\r
6: prompt_text=\"Expr> \",\r
7: prompt_color = :blue,\r
8: start_key=')',\r
9: mode_name=\"Expr_mode\");\r
10: ) x + 1\r
11: ^C\r
12: exit()\r
13: \r
14: julia>
$
While if I run the tests on my computer, then out1.log contains this:
1: \e[0m\e[0m\r\e[7C\r\e[7Cusing ReplMaker\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7Cusing ReplMaker\r\e[22C\r
2: \e[?2004l\e[0m\r
3: \r\e[0K\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7C\r\e[7C\e[?2004h\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7C\r\e[7Cfunction parse_to_expr(s)\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7Cfunction parse_to_expr(s)\r
4: \r\e[7C\r\e[7C quote Meta.parse($s) end\r\e[0K\e[1A\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7Cfunction parse_to_expr(s)\r
5: \r\e[7C quote Meta.parse($s) end\r
6: \r\e[7C\r\e[7Cend\r\e[0K\e[1A\r\e[0K\e[1A\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7Cfunction parse_to_expr(s)\r
7: \r\e[7C quote Meta.parse($s) end\r
8: \r\e[7Cend\r\e[10C\r
9: \e[?2004l\e[0m\e[0mparse_to_expr (generic function with 1 method)\r
10: \r
11: \r\e[0K\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7C\r\e[7C\e[?2004h\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7C\r\e[7Cinitrepl(parse_to_expr,\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7Cinitrepl(parse_to_expr,\r
12: \r\e[7C\r\e[7C prompt_text=\"Expr> \",\r\e[0K\e[1A\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7Cinitrepl(parse_to_expr,\r
13: \r\e[7C prompt_text=\"Expr> \",\r
14: \r\e[7C\r\e[7C prompt_color = :blue,\r\e[0K\e[1A\r\e[0K\e[1A\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7Cinitrepl(parse_to_expr,\r
15: \r\e[7C prompt_text=\"Expr> \",\r
16: \r\e[7C prompt_color = :blue,\r
17: \r\e[7C\r\e[7C start_key=')',\r\e[0K\e[1A\r\e[0K\e[1A\r\e[0K\e[1A\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7Cinitrepl(parse_to_expr,\r
18: \r\e[7C prompt_text=\"Expr> \",\r
19: \r\e[7C prompt_color = :blue,\r
20: \r\e[7C start_key=')',\r
21: \r\e[7C\r\e[7C mode_name=\"Expr_mode\");\r\e[0K\e[1A\r\e[0K\e[1A\r\e[0K\e[1A\r\e[0K\e[1A\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7Cinitrepl(parse_to_expr,\r
22: \r\e[7C prompt_text=\"Expr> \",\r
23: \r\e[7C prompt_color = :blue,\r
24: \r\e[7C start_key=')',\r
25: \r\e[7C mode_name=\"Expr_mode\");\r\e[39C\r
26: \e[?2004l\e[0mREPL mode Expr_mode initialized. Press ) to enter and backspace to exit.\r
27: \r
28: \r\e[0K\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7C\r\e[7C\e[?2004h\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7C\r\e[7C\r\e[0K\r\e[0K\e[34m\e[1mExpr> \e[0m\e[0m\r\e[6C\r\e[6C x + 1\r\e[0K\e[34m\e[1mExpr> \e[0m\e[0m\r\e[6C x + 1\r\e[12C\r
29: \e[?2004l\e[0m\e[0m:(x + 1)\r
30: \r
31: \e[?2004h\r\e[0K\e[34m\e[1mExpr> \e[0m\e[0m\r\e[6C\r\e[6C\r\e[0K\e[34m\e[1mExpr> \e[0m\e[0m\r\e[6C\r\e[6C^C\r
32: \r
33: \r\e[0K\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7C\r\e[7C\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7C\r\e[7C\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7C\r\e[7C\r
34: \e[?2004l\r
35: \r\e[0K\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7C\r\e[7C\e[?2004h\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7C\r\e[7Cexit()\r\e[0K\e[32m\e[1mjulia> \e[0m\e[0m\r\e[7Cexit()\r\e[13C\r
36: \e[?2004l\e[0m
Combining all this makes me wonder if there is a problem with the fake PTY produced by open_fake_pty ?!?
Hmm. Yeah I'm not sure what could be causing these issues. Testing REPL modes with CI is a pretty cursed process.