Demote dead code into a stdout warning #328
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/nac3#328
Loading…
Reference in New Issue
No description provided.
Delete Branch "issue-118"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Things to consider:
nix build
currently fails because the error message is outputted to stdout, and it is included in the diff when runningcheck_demos.sh
. Should we add a flag to suppress this warning, or changecheck_demos.sh
to ignore outputs from the compiler?Workaround for #118.
@sb10q Could you take a look at the "Thing to consider" section of the PR and let me know your view on this?
Just add a third optional argument to run_demo.sh (and interpret_demo.sh and run_demo_lli.sh) to write the output of the NAC3 program (and the NAC3 program alone) to a file. Defaults to stdout and merged with the output so the scripts can be run manually and produce immediately visible output.
88587ea871
toe1e219e884
v2: Rebased against master, added flags for redirecting/suppressing output, added forking of demo execution.
WIP: Demote dead code into a stdout warningto Demote dead code into a stdout warningWhy?
You just needed to add an argument to the run script to redirect the output of the compiled binary (and no others) to a file, everything else is unwanted complexity as far as I can tell.
The need for suppressing output is because this will happen:
Would it be better if the
--redirect-exe-stdout
flag also suppressed warnings, or how would you prefer this to be handled?This is only to speed up running the tests, on my machine the execution time reduced by 50%.
Doesn't sound like a significant problem.
But those tests run fast anyway, so it doesn't sound like it is worth the extra complexity. There are other things that are more important to optimize.
e1e219e884
tof2cb171982
v3: Reverted redundant changes in v2, fixed two script issues.
@ -15,2 +19,2 @@
./run_demo.sh "$@" "$demo" > run.log
./run_demo_lli.sh "$@" "$demo" > run_lli.log
./run_demo.sh --redirect-exe-stdout "${nac3args[@]}" "$demo"
./run_demo_lli.sh --redirect-exe-stdout "${nac3args[@]}" "$demo"
That parameter name is too long and also it's unclear that this creates
run.log
.Can it be changed to something like
--out run.log
?@ -0,0 +4,4 @@
def run() -> int32:
f()
remove blank line
@ -10,0 +19,4 @@
esac
shift
done
You may want to merge run_demo and run_demo_lli to reduce code duplication, and add a --lli flag.
f2cb171982
tof34c6053d6
v4: Merged
run_demo_lli.sh
withrun_demo.sh
, changed to--out
flag.