-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add step-logs.js to crunch. #799
Conversation
83b8efe
to
f861829
Compare
f861829
to
9730f38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice, thanks!
// Called via jsoo in the generated step-logs.js | ||
function extractStepsToReproduce(startIndex, finishIndex) { | ||
if ( // return if already done | ||
!!document.getElementById("build-repro-container") && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if the double bang is necessary, isn't the value already truthy/falsy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The double bang is "idiomatic" js for Boolean(object)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but the values you're testing are already in a "boolean context", the if condition, so they're already evaluated as booleans using their thruthy/falsy semantics. To my understanding, you only need the double bang when storing the "boolean value" of a value, or comparing the value to another using "boolean" semantics.
match Astring.String.cuts ~sep:"/" (List.hd refs) with | ||
| "refs" :: "heads" :: branch -> Astring.String.concat ~sep:"/" branch | ||
| _ -> "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe check that "refs/heads/"
is a prefix of List.hd refs
instead.
|
||
let collapse_carriage_returns log_line = | ||
let rec last = function | ||
| [] -> raise (Failure "Trying to take log_line from empty list (BUG)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| [] -> raise (Failure "Trying to take log_line from empty list (BUG)") | |
| [] -> Fmt.failwith "Trying to take log_line from empty list (BUG)" |
module Ev = Brr.Ev | ||
module El = Brr.El | ||
module At = Brr.At | ||
module Document = Brr.Document | ||
module Window = Brr.Window |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module Ev = Brr.Ev | |
module El = Brr.El | |
module At = Brr.At | |
module Document = Brr.Document | |
module Window = Brr.Window |
Can't this be remove?
This reverts commit 06bb80a.
Co-authored-by: Tim McGilchrist <[email protected]>
aba944d
to
ecc37e8
Compare
This reverts commit cf3930c.
This PR is a second attempt at bringing the work in #794 to production. In addition to re-introducing the changes from #794 it deals with the issue of not including the newly generated javascript file to ocaml-crunch.
Also, when trying to build a docker image the deployer failed to find a recent version of
jsoo
so I've updated the opam-repository commit sha. The latest opam-repository includes thealpha5
release of Dream so I've dropped the pins on Dream entirely.