tweag / nickel

Better configuration for less
https://nickel-lang.org/
MIT License
2.43k stars 93 forks source link

Add a flake check for testing the stdlib #2061

Closed jneem closed 1 month ago

jneem commented 1 month ago

An amusing little thing that I think is harmless: when a test in the stdlib uses the std name (like std.contract.not) then it's testing the copy of the stdlib that was compiled into the nickel binary. But when it uses a "local" name (like HasField) then it's testing the copy of the stdlib that it gets from the path ./core/stdlib/std.ncl.

github-actions[bot] commented 1 month ago

🐰 Bencher Report

Branch2061/merge
Testbedubuntu-latest

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
fibonacci 10📈 view plot
⚠️ NO THRESHOLD
497,790.00
pidigits 100📈 view plot
⚠️ NO THRESHOLD
3,241,700.00
product 30📈 view plot
⚠️ NO THRESHOLD
842,070.00
scalar 10📈 view plot
⚠️ NO THRESHOLD
1,531,500.00
sum 30📈 view plot
⚠️ NO THRESHOLD
839,480.00
🐰 View full continuous benchmarking report in Bencher
yannham commented 1 month ago

An amusing little thing that I think is harmless: when a test in the stdlib uses the std name (like std.contract.not) then it's testing the copy of the stdlib that was compiled into the nickel binary. But when it uses a "local" name (like HasField) then it's testing the copy of the stdlib that it gets from the path ./core/stdlib/std.ncl.

Yeah, it's the same for the actual stdlib code - often functions refer to other function of the same module directly, but use std to access outer module (in some places this was required because of the typechecking not being the same - I don't know if it's the case anymore with the polymorphism rework but it might be).