moonbitlang / minimoonbit-public

BSD 3-Clause "New" or "Revised" License
39 stars 15 forks source link

from_json test on roundtripping double fails #8

Open glyh opened 1 month ago

glyh commented 1 month ago

Moonbit info:

moon 0.1.20240910 (0a5e0dc 2024-09-10)

System info:

Linux mechrevo 6.10.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 09 Sep 2024 02:38:45 +0000 x86_64 GNU/Linux

One of relvant code occurence:

inspect!(Syntax::from_json!(["Float", 1.0]), content="Double(1.0)")

test info:

test moonbitlang/minimbt/utils.mbt::1 failed
expect test failed at /home/lyh/Documents/Knowledge/CS/PL/Moonbit/minimoonbit/src/utils.mbt:340:3-345:4
Diff:
----
["App",["Var","f"],[["Int",1.0]]]
----

test moonbitlang/minimbt/utils.mbt::2 failed
expect test failed at /home/lyh/Documents/Knowledge/CS/PL/Moonbit/minimoonbit/src/utils.mbt:391:3-391:70
Diff:
----
Double(1.0)
----

Total tests: 3, passed: 1, failed: 2.
glyh commented 1 month ago

Looks like this also occurs for any ints

glyh commented 1 month ago

建议在大赛中提供稳定版本的编译器套件

lynzrand commented 1 month ago

This was broken by a recent compiler update that changes Double::to_string implementation to match that specified in JavaScript. We will update this repository, along with other bugfixes, shortly.