vito / bass

a low fidelity scripting language for project infrastructure
https://bass-lang.org
MIT License
378 stars 13 forks source link

URL missing for cryptic error messages #250

Open srenatus opened 2 years ago

srenatus commented 2 years ago

I've found it, anyways; but since I'm a fan of this little feature, I figured I might open an issue. Sorry I didn't get to look into myself just now.

In the REPL, it seems like the URL is consistently missing -- I only get

Tip: if this error is too cryptic, please open an issue:

without the link

image

The error is not important, I've gotten past this myself; I'm just sharing the input and error output for context.

vito commented 2 years ago

Thanks for reporting! Hmm if I had to guess I'd say this has to do with how the REPL renders its prompt. I use a fancy package for the auto-complete menu that sometimes gets a little invasive with the TUI. It might be rendering over the last line or something. Not sure why it would only be happening for the error message though.

srenatus commented 2 years ago

The concrete error is irrelevant, but on this occasion, it has cut of the interesting bit, not the "too cryptic" addendum:

=> (use (*dir*/opa.bass))

error! call trace (oldest first):

   ┆ <fs>/history:4:0..4:22
 4 │ (use (*dir*/opa.bass))
     ^^^^^^^^^^^^^^^^^^^^^^

   ┆ <host: opa.bass>:1:0..22:1
 1 │ (provide [evalu]
 2 │   (def *opa-image*
 3 │     (case (next *stdin* :none)
 4 │       :none (linux/openpolicyagent/opa :latest)
 5 │       image image))
 6 │ 
 7 │   (defn evalu [query])
 8 │     (from *opa-image*
 9 │       ($ opa eval $query))
10 │ 
11 │   (defn go-build [src pkg]
12 │     (-> (from (linux/golang)
13 │           (cd src
14 │             ($ go build -o ../out/)))
15 │         (subpath ./out/)))
16 │ 
17 │   (def cloned
18 │     (from (linux/alpine/git)
19 │       ($ git clone "https://github.com/open-policy-agent/opa" ./repo/)))
20 │ 
21 │   ;(emit (go-build cloned/repo/ "./cmd/...") *stdout*)
22 │ )
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

=>