on master help sign in
Merge pull request #68 from replit/cb-nix-flake

Add Nix flake

commit49d3ff926a05bf4bd4c2227b6a91cbc420531575 authorConnor Brewster <cbrewster@hey.com> dateThu 8 Jul 2021, 20:34 (5 years ago) parentbaf2c2472c4b1a
71 files changed+299−206
.circleci/config.yml+2−7 .gitignore+1 build-prybar.nix+64−70 default.nix+10−60 flake.lock+43 flake.nix+110 tests/clojure/all.exp+1−1 tests/clojure/evaluate_expression.exp+1−1 tests/clojure/initialize_code_with_script.exp+1−1 tests/clojure/initialize_expression_with_script.exp+1−1 tests/clojure/initialize_repl_with_script.exp+1−1 tests/clojure/plus_1_1.exp+1−1 tests/clojure/print.exp+1−1 tests/clojure/quiet_repl.exp+1−1 tests/clojure/run_code.exp+1−1 tests/clojure/run_script.exp+1−1 tests/julia/1_plus_1.exp+1−1 tests/julia/header.exp+1−1 tests/julia/input.exp+1−1 tests/julia/print_a_line.exp+1−1 tests/julia/start_with_file.exp+1−1 tests/lua/always_try_expression.exp+1−1 tests/lua/history.exp+1−1 tests/lua/load_file.exp+1−1 tests/lua/ps1_ps2.exp+1−1 tests/lua/quiet.exp+1−1 tests/lua/returns.exp+1−1 tests/nodejs/1_plus_1.exp+1−1 tests/nodejs/err.exp+1−1 tests/nodejs/eval_code.exp+1−1 tests/nodejs/global_bug.exp+2−2 tests/nodejs/header.exp+2−2 tests/nodejs/module_patching.exp+2−2 tests/nodejs/printing.exp+1−1 tests/nodejs/run_code.exp+1−1 tests/nodejs/run_file.exp+2−2 tests/nodejs/set_ps1.exp+1−1 tests/ocaml/code_print.exp+1−1 tests/ocaml/exception.exp+1−1 tests/ocaml/expr.exp+1−1 tests/ocaml/not_quiet.exp+1−1 tests/ocaml/ps1.exp+1−1 tests/ocaml/ps2.exp+1−1 tests/ocaml/quiet.exp+1−1 tests/python2/1_plus_1.exp+1−1 tests/python2/code_print.exp+1−1 tests/python2/exception.exp+1−1 tests/python2/expr.exp+1−1 tests/python2/ps1.exp+1−1 tests/python2/ps2.exp+1−1 tests/python2/quiet.exp+1−1 tests/python2/stdout_stderr.exp+1−1 tests/python3/1_plus_1.exp+1−1 tests/python3/eval_code.exp+1−1 tests/python3/printing.exp+1−1 tests/python3/run_code.exp+1−1 tests/python3/set_ps1.exp+1−1 tests/python3/set_ps2.exp+1−1 tests/python3/show_header.exp+1−1 tests/python3/stderr_red.exp+1−1 tests/sqlite/1_plus_1.exp+1−1 tests/sqlite/eval.exp+1−1 tests/sqlite/exec.exp+1−1 tests/sqlite/header.exp+1−1 tests/sqlite/quiet.exp+1−1 tests/sqlite/read_file.exp+1−1 tests/tcl/a_few_outputs.exp+1−1 tests/tcl/from_file.exp+1−1 tests/tcl/input_output.exp+1−1 tests/tcl/invalid_command.exp+1−1 tests/tcl/unknown_command.exp+1−1
.circleci/config.yml+2−7
@@ -21,13 +21,8 @@ jobs:
2121 - checkout
2222 - restore_cache:
2323 key: nix-store
24− - run:
25− # Skipping the julia and closure tests for now since they break in CI
26− name: Run nix build
27− command: |
28− mv ./tests/julia ./tests/julia_skip
29− mv ./tests/clojure ./tests/clojure_skip
30− nix-build
24+ - run: apk add coreutils git
25+ - run: nix-build
3126 - save_cache:
3227 key: nix-store
3328 when: always
.gitignore+1
@@ -4,3 +4,4 @@ prybar_assets/sqlite/patch.so
44deps.lst
55prybar.tar.gz
66generated_*.go
7+result*
build-prybar.nix+64−70
@@ -1,71 +1,65 @@
1−{ language, buildInputs ? [], binaries ? [], setFlags ? false, pkgName ? language, versionArg ? "" }:
2−
3−{ lib, buildGoModule, fetchFromGitHub, bash, expect, pkg-config, runCommand, git, python3, copyPathToStore }:
4−
5−let
6− src = copyPathToStore ./.;
7− revision = runCommand "get-rev" {
8− nativeBuildInputs = [ git python3 ];
9− dummy = builtins.currentTime;
10− } ''
11− if [ -d ${src}/.git ]; then
12− cd ${src}
13− git rev-parse --short HEAD | tr -d '\n' > $out
14− else
15− echo ${versionArg} | tr -d '\n' > $out
16− fi
17− '';
18−in buildGoModule {
19− pname = "prybar-${language}";
20− version = builtins.readFile revision;
21−
22− inherit src;
23−
24− inherit buildInputs;
25− nativeBuildInputs = [ pkg-config ];
26−
27− subPackages = [ "languages/${language}" ];
28−
29− vendorSha256 = null;
30−
31− # This prebiuild hook will setup the compiler flags on demand based on the package
32− # If a language requires this, it MUST expost a ${pkgName}.pc file in its `lib/pkg-config`
33− # for pkg-config to detect it. Otherwise, we can't find the required flags.
34− preBuild = ''
35− export CGO_LDFLAGS_ALLOW="-Wl,--compress-debug-sections=zlib"
36− ${if setFlags then ''
37− export NIX_CFLAGS_COMPILE="$(pkg-config --cflags ${pkgName}) $NIX_CFLAGS_COMPILE"
38− export NIX_LDFLAGS="$(pkg-config --libs-only-L ${pkgName}) $(pkg-config --libs-only-l ${pkgName}) $NIX_LDFLAGS"
39− '' else ""}
40−
41− ${bash}/bin/bash ./scripts/inject.sh ${language}
42− go generate ./languages/${language}/main.go
43− '';
44−
45− # The test file expect the binary to be in the current directory rather than bin
46− preCheck = ''
47− cp $GOPATH/bin/${language} ./prybar-${language}
48− '';
49−
50− # Add all the dependencies to the check. Binaries should include the language interpreter/binaries
51− # for testing the language.
52− checkInputs = [ expect ] ++ buildInputs ++ binaries;
53−
54− # Run the end-to-end tests for this specific language
55− checkPhase = ''
56− runHook preCheck
57−
58− "${bash}/bin/bash" "./run_tests_language" "${language}" "${expect}/bin"
59−
60− runHook postCheck
61− '';
62−
63− # Delete the test binary we copied in the preCheck
64− postCheck = ''
65− rm -f ./prybar-${language}
66− '';
67−
68− postInstall = ''
69− mv $out/bin/${language} $out/bin/prybar-${language}
70− '';
1+{ language, buildInputs ? [ ], binaries ? [ ], setFlags ? false
2+, pkgName ? language }:
3+
4+{ lib, buildGoModule, fetchFromGitHub, bash, expect, pkg-config, runCommand, git
5+, python3, copyPathToStore, rev }:
6+
7+buildGoModule {
8+ pname = "prybar-${language}";
9+ version = rev;
10+
11+ src = ./.;
12+
13+ inherit buildInputs;
14+ nativeBuildInputs = [ pkg-config ];
15+
16+ subPackages = [ "languages/${language}" ];
17+
18+ vendorSha256 = null;
19+
20+ # This prebiuild hook will setup the compiler flags on demand based on the package
21+ # If a language requires this, it MUST expost a ${pkgName}.pc file in its `lib/pkg-config`
22+ # for pkg-config to detect it. Otherwise, we can't find the required flags.
23+ preBuild = ''
24+ export CGO_LDFLAGS_ALLOW="-Wl,--compress-debug-sections=zlib"
25+ ${if setFlags then ''
26+ export NIX_CFLAGS_COMPILE="$(pkg-config --cflags ${pkgName}) $NIX_CFLAGS_COMPILE"
27+ export NIX_LDFLAGS="$(pkg-config --libs-only-L ${pkgName}) $(pkg-config --libs-only-l ${pkgName}) $NIX_LDFLAGS"
28+ '' else
29+ ""}
30+
31+ ${bash}/bin/bash ./scripts/inject.sh ${language}
32+ go generate ./languages/${language}/main.go
33+ '';
34+
35+ # The test file expect the binary to be in the current directory rather than bin
36+ preCheck = ''
37+ cp $GOPATH/bin/${language} ./prybar-${language}
38+ '';
39+
40+ # Add all the dependencies to the check. Binaries should include the language interpreter/binaries
41+ # for testing the language.
42+ checkInputs = [ expect ] ++ buildInputs ++ binaries;
43+
44+ # Run the end-to-end tests for this specific language
45+ checkPhase = ''
46+ runHook preCheck
47+
48+ # Nix unsets HOME but some tests rely on it, let's set it to whatever tmp dir the check
49+ # is running in.
50+ export HOME=$(echo pwd)
51+
52+ "${bash}/bin/bash" "./run_tests_language" "${language}" "${expect}/bin"
53+
54+ runHook postCheck
55+ '';
56+
57+ # Delete the test binary we copied in the preCheck
58+ postCheck = ''
59+ rm -f ./prybar-${language}
60+ '';
61+
62+ postInstall = ''
63+ mv $out/bin/${language} $out/bin/prybar-${language}
64+ '';
7165}
default.nix+10−60
@@ -1,64 +1,14 @@
1−{ pkgs ? import <nixpkgs>{}, versionArg ? "" } :
2−let
3− buildPrybar = attrs: pkgs.callPackage(import ./build-prybar.nix attrs) {};
4−
5− julia = import ./languages/julia/julia.nix { inherit pkgs; };
6− clojureWithCP = import ./languages/clojure/wrappedClojure.nix { inherit pkgs; };
7−in
8−{
9− prybar-R = buildPrybar {
10− language = "R";
11− buildInputs = [ pkgs.R ];
12− versionArg = versionArg;
13− pkgName = "libR";
14− setFlags = true;
15− };
16−
17− prybar-julia = buildPrybar {
18− language = "julia";
19− buildInputs = [ julia ];
20− versionArg = versionArg;
21− setFlags = true;
22− binaries = [ pkgs.zlib ];
23− };
24−
25− prybar-nodejs = buildPrybar { language = "nodejs"; binaries = [ pkgs.nodejs ]; versionArg = versionArg; };
26−
27− # The official Ruby packages is running ruby 2.7
28− prybar-ruby = buildPrybar {
29− language = "ruby";
30− buildInputs = [ pkgs.ruby ];
31− pkgName = "ruby-2.7";
32− versionArg = versionArg;
33− setFlags = true;
34− };
35−
36− prybar-python2 = buildPrybar { language = "python2"; buildInputs = [ pkgs.python2 ]; versionArg = versionArg; };
1+{ system ? builtins.currentSystem }:
372
38− prybar-python3 = buildPrybar { language = "python3"; buildInputs = [ pkgs.python3 ]; versionArg = versionArg; };
39−
40− prybar-lua = buildPrybar { language = "lua"; buildInputs = [ pkgs.lua5_1 pkgs.readline ]; versionArg = versionArg; };
41−
42− prybar-clojure = buildPrybar {
43− language = "clojure";
44− buildInputs = [ clojureWithCP ];
45− binaries = [ pkgs.jdk11_headless ];
46− versionArg = versionArg;
47− };
48−
49− prybar-elisp = buildPrybar { language = "elisp"; versionArg = versionArg; };
50−
51− prybar-ocaml = buildPrybar {
52− language = "ocaml";
53− # This has to be in the build inputs so it set-ups the library paths before the check phase
54− # It will not be copied over to the final package.
55− buildInputs = [ pkgs.opam pkgs.ocaml pkgs.ocamlPackages.findlib pkgs.ocamlPackages.topkg pkgs.ocamlPackages.reason ];
56− versionArg = versionArg;
57− };
3+let
584
59− prybar-scala = buildPrybar { language = "scala"; versionArg = versionArg; };
5+ # flake-compat makes Nix flakes compatible with the old Nix cli commands, like nix-build and nix-shell.
6+ default = (import (fetchTarball {
7+ url =
8+ "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
9+ sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2";
10+ }) { src = ./.; }).defaultNix;
6011
61− prybar-sqlite = buildPrybar { language = "sqlite"; binaries = [ pkgs.sqlite ]; versionArg = versionArg; };
12+in
6213
63− prybar-tcl = buildPrybar { language = "tcl"; buildInputs = [ pkgs.tcl ]; versionArg = versionArg; };
64−}
14+builtins.getAttr system default.packages
flake.locknew file+43
@@ -0,0 +1,43 @@
1+{
2+ "nodes": {
3+ "flake-utils": {
4+ "locked": {
5+ "lastModified": 1623875721,
6+ "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=",
7+ "owner": "numtide",
8+ "repo": "flake-utils",
9+ "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772",
10+ "type": "github"
11+ },
12+ "original": {
13+ "owner": "numtide",
14+ "repo": "flake-utils",
15+ "type": "github"
16+ }
17+ },
18+ "nixpkgs": {
19+ "locked": {
20+ "lastModified": 1625512941,
21+ "narHash": "sha256-P2POZzfG+Hp8ktIWwkOs/OMB8jSsQvIPQaLO0swpgZo=",
22+ "owner": "nixos",
23+ "repo": "nixpkgs",
24+ "rev": "3e0ce8c5d478d06b37a4faa7a4cc8642c6bb97de",
25+ "type": "github"
26+ },
27+ "original": {
28+ "owner": "nixos",
29+ "ref": "nixpkgs-unstable",
30+ "repo": "nixpkgs",
31+ "type": "github"
32+ }
33+ },
34+ "root": {
35+ "inputs": {
36+ "flake-utils": "flake-utils",
37+ "nixpkgs": "nixpkgs"
38+ }
39+ }
40+ },
41+ "root": "root",
42+ "version": 7
43+}
flake.nixnew file+110
@@ -0,0 +1,110 @@
1+{
2+ description = "A universal interpreter front-end";
3+
4+ inputs = {
5+ nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
6+ flake-utils.url = "github:numtide/flake-utils";
7+ };
8+
9+ outputs = { self, nixpkgs, flake-utils }:
10+ flake-utils.lib.eachDefaultSystem (system:
11+ let
12+ pkgs = nixpkgs.legacyPackages.${system};
13+
14+ rev = if self ? rev then
15+ "0.0.0-${builtins.substring 0 7 self.rev}"
16+ else
17+ "0.0.0-dirty";
18+
19+ buildPrybar = attrs:
20+ pkgs.callPackage (import ./build-prybar.nix attrs) { inherit rev; };
21+
22+ julia = import ./languages/julia/julia.nix { inherit pkgs; };
23+
24+ clojureWithCP =
25+ import ./languages/clojure/wrappedClojure.nix { inherit pkgs; };
26+
27+ in {
28+ packages = {
29+ prybar-R = buildPrybar {
30+ language = "R";
31+ buildInputs = [ pkgs.R ];
32+ pkgName = "libR";
33+ setFlags = true;
34+ };
35+
36+ prybar-nodejs = buildPrybar {
37+ language = "nodejs";
38+ binaries = [ pkgs.nodejs ];
39+ };
40+
41+ prybar-python2 = buildPrybar {
42+ language = "python2";
43+ buildInputs = [ pkgs.python2 ];
44+ };
45+
46+ prybar-python3 = buildPrybar {
47+ language = "python3";
48+ buildInputs = [ pkgs.python3 ];
49+ };
50+
51+ prybar-lua = buildPrybar {
52+ language = "lua";
53+ buildInputs = [ pkgs.lua5_1 pkgs.readline ];
54+ };
55+
56+ prybar-clojure = buildPrybar {
57+ language = "clojure";
58+ buildInputs = [ clojureWithCP ];
59+ binaries = [ pkgs.jdk11_headless ];
60+ };
61+
62+ prybar-elisp = buildPrybar { language = "elisp"; };
63+
64+ prybar-ocaml = buildPrybar {
65+ language = "ocaml";
66+ # This has to be in the build inputs so it set-ups the library paths before the check phase
67+ # It will not be copied over to the final package.
68+ buildInputs = [
69+ pkgs.opam
70+ pkgs.ocaml
71+ pkgs.ocamlPackages.findlib
72+ pkgs.ocamlPackages.topkg
73+ pkgs.ocamlPackages.reason
74+ ];
75+ };
76+
77+ prybar-scala = buildPrybar { language = "scala"; };
78+
79+ prybar-sqlite = buildPrybar {
80+ language = "sqlite";
81+ binaries = [ pkgs.sqlite ];
82+ };
83+
84+ prybar-tcl = buildPrybar {
85+ language = "tcl";
86+ buildInputs = [ pkgs.tcl ];
87+ };
88+ }
89+ # These packages have issues on macOS
90+ // nixpkgs.lib.optionalAttrs (!pkgs.stdenv.isDarwin) {
91+ prybar-julia = buildPrybar {
92+ language = "julia";
93+ buildInputs = [ julia ];
94+ setFlags = true;
95+ binaries = [ pkgs.zlib ];
96+ };
97+
98+ # The official Ruby packages is running ruby 2.7
99+ prybar-ruby = buildPrybar {
100+ language = "ruby";
101+ buildInputs = [ pkgs.ruby ];
102+ pkgName = "ruby-2.7";
103+ setFlags = true;
104+ };
105+
106+ };
107+
108+ });
109+}
110+
tests/clojure/all.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33# ignore ANSI escape sequences
44set _ "(?:.*?)"
tests/clojure/evaluate_expression.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33# ignore ANSI escape sequences
44set _ "(?:.*?)"
tests/clojure/initialize_code_with_script.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33# ignore ANSI escape sequences
44set _ "(?:.*?)"
tests/clojure/initialize_expression_with_script.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33# ignore ANSI escape sequences
44set _ "(?:.*?)"
tests/clojure/initialize_repl_with_script.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33# ignore ANSI escape sequences
44set _ "(?:.*?)"
tests/clojure/plus_1_1.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33# ignore ANSI escape sequences
44set _ "(?:.*?)"
tests/clojure/print.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33# ignore ANSI escape sequences
44set _ "(?:.*?)"
tests/clojure/quiet_repl.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33# ignore ANSI escape sequences
44set _ "(?:.*?)"
tests/clojure/run_code.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-clojure -q -c {(do (println "foo") "bar")}
tests/clojure/run_script.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-clojure ./test_files/hello.clj
44expect eof
tests/julia/1_plus_1.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-julia -q -i
tests/julia/header.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22#
33# This Expect script was generated by autoexpect on Fri Jun 12 21:00:42 2020
44# Expect and autoexpect were both written by Don Libes, NIST.
tests/julia/input.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-julia -q -i
tests/julia/print_a_line.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-julia -q -i
tests/julia/start_with_file.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-julia -q -i ./test_files/hi_julia.jl
tests/lua/always_try_expression.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-lua -q -i
tests/lua/history.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-lua -q -i
tests/lua/load_file.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-lua -i ./test_files/hello.lua
tests/lua/ps1_ps2.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-lua -i -ps1 ps1 -ps2 ps2
tests/lua/quiet.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-lua -q -i
tests/lua/returns.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-lua -q -i
tests/nodejs/1_plus_1.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-nodejs -i -q
tests/nodejs/err.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-nodejs -i -q
tests/nodejs/eval_code.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-nodejs -q -e 1+1
tests/nodejs/global_bug.exp+2−2
@@ -1,9 +1,9 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-nodejs -i ./test_files/global_bug.js
55match_max 100000
6−expect -re {Node v\d+\.\d+.\d+ on linux}
6+expect -re {Node v\d+\.\d+.\d+ on (linux|darwin)}
77expect -exact "\[0m\[90mHint: hit control+c anytime to enter REPL.\[0m\r
88\[1G\[0J--> \[5G"
99send -- ""
tests/nodejs/header.exp+2−2
@@ -1,9 +1,9 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-nodejs -i
55match_max 100000
6−expect -re {Node v\d+\.\d+.\d+ on linux}
6+expect -re {Node v\d+\.\d+.\d+ on (linux|darwin)}
77expect -exact "\[1G\[0J--> \[5G"
88send -- ""
99expect eof
tests/nodejs/module_patching.exp+2−2
@@ -1,9 +1,9 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-nodejs -i ./test_files/global_bug.js
55match_max 100000
6−expect -re {Node v\d+\.\d+.\d+ on linux}
6+expect -re {Node v\d+\.\d+.\d+ on (linux|darwin)}
77expect -exact "\[0m\[90mHint: hit control+c anytime to enter REPL.\[0m\r
88\[1G\[0J--> \[5G"
99send -- ""
tests/nodejs/printing.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-nodejs -i -q
tests/nodejs/run_code.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-nodejs -q -c 1+1
tests/nodejs/run_file.exp+2−2
@@ -1,9 +1,9 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-nodejs -i ./test_files/hello.js
55match_max 100000
6−expect -re {Node v\d+\.\d+.\d+ on linux}
6+expect -re {Node v\d+\.\d+.\d+ on (linux|darwin)}
77expect -exact "\[0m\[90mHint: hit control+c anytime to enter REPL.\[0m\r
88hello\r
99\[32m'hello'\[39m\r
tests/nodejs/set_ps1.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-nodejs -i -q -ps1 custom
tests/ocaml/code_print.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-ocaml -q -c "print_endline(\"hello world\")"
44match_max 100000
tests/ocaml/exception.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-ocaml -q -i
44match_max 100000
tests/ocaml/expr.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-ocaml -q -e 1+1
44match_max 100000
tests/ocaml/not_quiet.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-ocaml -e 1+1
44match_max 100000
tests/ocaml/ps1.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-ocaml -q -i -ps1 ">>"
44match_max 100000
tests/ocaml/ps2.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-ocaml -q -i -ps2 continuation
44match_max 100000
tests/ocaml/quiet.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-ocaml -q -i
44match_max 100000
tests/python2/1_plus_1.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-python2 -i
44match_max 100000
tests/python2/code_print.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-python2 -q -c print('hello')
44match_max 100000
tests/python2/exception.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-python2 -q -i
44match_max 100000
tests/python2/expr.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-python2 -e 1+1
44match_max 100000
tests/python2/ps1.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-python2 -i -ps1 somethingelse
44match_max 100000
tests/python2/ps2.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-python2 -i -ps2 continuation
44match_max 100000
tests/python2/quiet.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-python2 -q -i
44match_max 100000
tests/python2/stdout_stderr.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-python2 -q -i
44match_max 100000
tests/python3/1_plus_1.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-python3 -i -q
tests/python3/eval_code.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-python3 -e 1+1
tests/python3/printing.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-python3 -i -q
tests/python3/run_code.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-python3 -c print('hello')
tests/python3/set_ps1.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-python3 -i -q -ps1 custom
tests/python3/set_ps2.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-python3 -i -q -ps2 custom
tests/python3/show_header.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-python3 -i
tests/python3/stderr_red.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33# red is currently nondeterministic
44exit 0
tests/sqlite/1_plus_1.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-sqlite -q -i
44expect -- "^--> "
tests/sqlite/eval.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-sqlite -e "select 1+1;"
44expect ^2
tests/sqlite/exec.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-sqlite -c "select 1+1;"
44expect ^eof
tests/sqlite/header.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-sqlite -i
44expect -gl "-- Loading resources from /tmp/sqlite-config*\r\nSQLite version 3.27.2*\r\nEnter \".help\" for usage hints.\r\n--> "
tests/sqlite/quiet.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-sqlite -q -i
44expect "^--> "
tests/sqlite/read_file.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33spawn ./prybar-sqlite -q -i ./test_files/hello.sql
44expect -- "^hey there\r
tests/tcl/a_few_outputs.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-tcl -q -i
tests/tcl/from_file.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-tcl -q -i ./test_files/hello_tcl.tcl
tests/tcl/input_output.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-tcl -q -i
tests/tcl/invalid_command.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-tcl -q -i ./test-files/hi_julia.jl
tests/tcl/unknown_command.exp+1−1
@@ -1,4 +1,4 @@
1−#!/usr/bin/expect -f
1+#!/usr/bin/env -S expect -f
22
33set timeout -1
44spawn ./prybar-tcl -q -i