haf / expecto

A smooth testing lib for F#. APIs made for humans! Strong testing methodologies for everyone!
Apache License 2.0
663 stars 96 forks source link

Error when running ./fake build in master #345

Closed drhumlen closed 4 years ago

drhumlen commented 4 years ago

I want to contribute to the repo, but after cloning the repo and running ./fake build I get an error:

---------------------------------------------------------------------
Build Time Report
---------------------------------------------------------------------
Target                 Duration
------                 --------
Clean                  00:00:00.0517259
AssemblyInfo           00:00:00.0217708
ProjectVersion         00:00:00.0118640
BuildExpecto           00:00:20.8960939
BuildBenchmarkDotNet   00:00:14.1400790
BuildTest              00:00:18.8088789
RunTest                00:00:25.8602560   (Expecto.Tests.dll failed)
Pack                   00:00:00           (skipped)
All                    00:00:00           (skipped)
Total:                 00:01:19.9471722
Status:                Failure
---------------------------------------------------------------------
Script reported an error:
-> BuildFailedException: Target 'RunTest' failed.
-> One or more errors occurred. (Expecto.Tests.dll failed)
-> Expecto.Tests.dll failed
Hint: To further diagnose the problem you can run fake in verbose mode `fake -v run ...` or set the 'FAKE_DETAILED_ERRORS' environment variable to 'true'
Hint: Detected paket version '5.219.0' in your paket.dependencies file bootstrapper arguments, consider locking the version to '5.216.0' in your dependencies file (/Users/nix/dev/expecto/paket.dependencies).
Read https://github.com/fsharp/FAKE/issues/2193 for details.
Performance:
 - Cli parsing: 271 milliseconds
 - Packages: 1 second
   - Creating Runtime Graph: 68 milliseconds
   - Retrieve Assembly List: 720 milliseconds
 - Script compiling: 6 seconds
 - Script analyzing: 287 milliseconds
 - Script running: 1 minute, 20 seconds
 - Script cleanup: 17 milliseconds
 - Runtime: 1 minute, 30 seconds

This test seem to fail:

[00:27:05 ERR] expecto/args/lots failed in 00:00:00.0810000.
testArgs.
expected:
Ok
  [Sequenced; Parallel; Parallel_Workers 3; Stress 0.1; Stress_Timeout 100.1;
   Stress_Memory_Limit 128.0; Fail_On_Focused_Tests; Debug; Log_Name "fred";
   Filter "phil"; Filter_Test_List "f list"; Filter_Test_Case "f case";
   Run ["a"; "b"; "c"]; List_Tests; Summary; Version; Summary_Location;
   FsCheck_Max_Tests 5; FsCheck_Start_Size 10; FsCheck_End_Size 20;
   My_Spirit_Is_Weak; Allow_Duplicate_Names; No_Spinner; Colours 256]
  actual:
Error
  ["--stress-timeout cannot parse parameter '100.1'";
   "--stress cannot parse parameter '0.1'"]
   at Expecto.Tests.expecto@477-64.Invoke(Unit unitVar) in /Users/nix/dev/expecto/Expecto.Tests/Tests.fs:line 529
   at Microsoft.FSharp.Control.AsyncBuilderImpl.callA@522.Invoke(AsyncParams`1 args) <Expecto>

also:

[00:27:13 ERR] expecto/args/three failed in 00:00:00.0060000.
testArgs.
expected: Ok [Sequenced; Stress 1.2; Parallel]
  actual: Error ["--stress cannot parse parameter '1.2'"]
   at Expecto.Tests.expecto@393-44.Invoke(Unit unitVar) in /Users/nix/dev/expecto/Expecto.Tests/Tests.fs:line 393
   at Microsoft.FSharp.Control.AsyncBuilderImpl.callA@522.Invoke(AsyncParams`1 args) <Expecto>
haf commented 4 years ago

@drhumlen Could you please write a test that verifies this as fixed for you in 98c1c32f? Thanks

drhumlen commented 4 years ago

I can verify that it is fixed now 😄

I don't have enough knowledge of the codebase yet to know where to start writing a test for that. I'm not even quite sure yet what the problem was..

haf commented 4 years ago

@drhumlen Ok, thanks for letting me know. The problem was that numeric parsing was done without fixing the locale and you have a locale set in your OS (Norwegian Bokmål?) where you represent the 1.2 value as 1,2.