Skip to content
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

io.circe.NoSpacesSortKeysPrinterSuite flakey spec #1911

Closed
zmccoy opened this issue Jan 24, 2022 · 5 comments · Fixed by #1997
Closed

io.circe.NoSpacesSortKeysPrinterSuite flakey spec #1911

zmccoy opened this issue Jan 24, 2022 · 5 comments · Fixed by #1997

Comments

@zmccoy
Copy link
Member

zmccoy commented Jan 24, 2022

On the JS run this test was seen failing. I haven't looked into it to se if it's related to JS or affects all and is just a good input to see a failure.

==> X io.circe.NoSpacesSortKeysPrinterSuite.Printer with sortKeys should sort the object keys 0.26s munit.FailException: /home/runner/work/circe/circe/modules/tests/shared/src/test/scala/io/circe/SortedKeysSuite.scala:30 assertion failed
29: val keys = parsed.keys.toVector
30: assert(keys.sorted === keys)
31: }

Failing seed: Q77xP9WJjYRbRkQLYsOsBNr-Ex78IBI9PAVcu7f3fZP=
You can reproduce this failure by adding the following override to your suite:

override val scalaCheckInitialSeed = "Q77xP9WJjYRbRkQLYsOsBNr-Ex78IBI9PAVcu7f3fZP="

Falsified after 88 passed tests.

ARG_0: Map(4 -> List(), -> List())
ARG_0_ORIGINAL: HashMap(괾疴拉ॲꐹ埄汼︧Ể챮ᯍ㖘칼浸莂熊輀붸产¡䧋寮犠㽢쇷㊔쉶ꭔ䌥믗ꆚ䠦賆뱡ꔾ瞕䞍ᄉ쵡萱꥓හ䁨㸅鯭桱ʏ턨갸珯ḽ飄亩ﭗ癐䇖霠ຩ얯ƣ酶炊꒳⨓ഖ -> List(1042975100, -1, 1, 0, 287249504, -2147483648, -56252568, 1821127378, 1243877841, -1647834088, 1475058019, 2147483647, 1623195016, 570507836, 1, 1389037830, -1411164114, 1, 2147483647, 1764233011, 685548540, -1056776594, -1363941620, -1, -2147483648, -1682231542, 994033677, 194776545, 0, -1778787540, -728928360, 2147483647, 1164216635, 1602471129, 1538897227, 1, -1270385162, 625678785, -2147483648, -1867598186, 2147483647, 181313802, -2147483648, 2147483647, -1417276772, 222984762, 503315103, -1, 2147483647, -11180336, -2147483648, -1549474365, -35786665, 1363337544, 1836307518, 1188079067, 1, 1, -2147483648, -2147483648, -1, -1, 1, 2147483647, 1610744238, 0, 208971576, -149996216, -244229809, -1150479233, -872890019, -1, -459169262, 2147483647, -1, 997712402, 2147483647, -1610860502, -1733886438, 1, -864562311, -2147483648, -820286823, -2124263885, 1327149694), 4 -> List(-1528769348, 419179653, 2147483647, 1, 994420970, 964678359, -1, 1228884292, -2147483648, 2147483647, -644861775, 1197845048, 700057368, 0, -2147483648, 234826857, -2147483648, -2089653652, -1, -1047662654, -1, 0, -1592779340, -2147483648, 1031545632, 739429821, -2147483648, -1389189886, -463914550, -931893884, -380599106, 1572141557, -1, 103681197, 1, 442179100, -535139426, -1, 0, 601705586, 2107619039, -413354162, 321808219, -1, 1, 1491194502, 99107591, 0, 1, 2147483647, 0, -1014860522, -44552417, -2147483648, 1811829567, 1420548405, -2147483648, 702078456, -2147483648, -1247080211, -1663824847, -222795671, 1, -1, 0, 968599033, 2147483647, -556945727, 1164528120, 2147483647, -186549139, -1027546790, -62138681, -929558225, 540862823, 2147483647, -1), 稻鵳꽉싻ﱰ⸛吪妉挌㝋걕뗸䋭槅㡐㺃덓렭ژ⋌喆会覻萯ᮢ缤슨ᅣ쐼写൶셌᫂憢劷﫣獲 -> List(1398093062, 1065013711, -1, -2147483648, -2147483648, 936427966, 97732379, -1232654062, 723194282, 637223073, -1707670954, 0, -1, -2147483648, -757757242, 1, 1702515433, -2147483648, -1871178901, 1), 쨒栟ᳰ鄸砗⓼�㬸 -> List(), 矎ᕏ﨟嘼携쑶㽩攰뎜먝♮ᮭ䖜崕ʳ䄎⠁䚱쬖ꅀ洸䅄㛐㗍鐐圅暩ࡀ釢쏤덶ﴨ飜蟲憦儠汴绮뙇㳔࿿ﯛ䑲᰾쀂뼷榇楰嵨蹌䒡偶곖ὲࡉ垉⊘ᴝ蕘뷣栕኱ړ -> List(-1, 360060066, 1, -1839120056, 1730645398, 1302202817, -680668627, -1, 578761858, -448097192, 1624938295, 2147483647, -2147483648, -255867692, -1, 2147483647, -1412122082, 90071257, -2147483648, 872020208, -866759831, 0, 2052183349, -2147483648, 1, -2147483648, 2147483647, -367661806, 349500865, 232169925, -1, 0, -2147483648, 880685870, 1844238616, 0, 0, -2029056218, 2147483647, -831915892, 1902137054, 1, -2147483648, -1893356730, -2147483648, 2147483647, -128839227, -2147483648, 1591739877, 0, -2147483648, -1042060151, 2147483647, -1, 937753182, -2147483648, 280698502, -1137783527, -863721954, -375856865, -2147483648, 0, -1669413638, -1166979814, 0, 0, -459500512, 747441312, 0, -770193141), 揬⵿鐝 -> List(1, -1, 1559530365, 0, -230244240), ꎊ쏪㸘﵏뫰㡋♲ᆑᥝ瘌䔾ꈩ㑙ꅳ홲걊ဒ旀્恭앑炝鑭㱳უ샂酻ꐛ헭覤뗯 -> List(379616946, -882615402, 28287247, 1612618387, -2147483648, 2147483647, -1457222674, 1275839552, 2147483647, -769225356, 0, 238898824, 1202942518, -1, -2147483648, 2147483647, 2137499006, 2023202089, -1, 446922868, -1120830683, 986093060, 2147483647, 1236642603, -1064838517, 1182418029, -1142481316, 1, -251562725, -170495557, 0, -1, -1, 1221224399, 1711185029, -2147483648, -1, 1, -1195935092, -1, 0, 912412412, 2067429443, 2147483647), 跀叶␴呂Ⱖ祥毣땭ﰋࠖ쿝͘㭭戸ॷ䝒฼뿊ᡖ졏⇏룇ᛶ쵋咂ℾ栒Ⴁ讧몝ﰈ藠䯦꺏ゞᝐ喲凍ꅻ搵޶䊓㬂ᑆ⭋钜뎼ᚅ셀 -> List(-1878126133, -2147483648, 2147483647, 0, 1, 20489079, 362028012, -1682837782, -1, 1027873290, -469957307, -1, 2147483647, -1627533773, 122665392, 1, 575152028, 1, 1006450057, 1936812428, 2147483647, 2078015550, -1964812559, -1440003381, 1642369507, 1655333045, 278856963, 2147483647, 1, -2147483648, -1300775081, 170743009, -1023409353, -1, -1624761012, -1160747684, 1611215744, -797909890, 1, 2147483647, -1293198298, 363659517, 523912584, 1, 134116512, 1023230925, -776631169, -1), 퀻뱞㟽ᮚ㒦䈀﾿龏㑨ၪ䕡ᒞᳱ乭恼ៈㄍ乨짔ꊆᚯ鈙췐宔㋆㚱ꝟ놷鍸䤿Ỹ岃樘榞荋ꠊᶎ繌ʨ锶 -> List(-225299116, -1118650746, -1, -573904622, -1, -2147483648, 0, 1, 512315646, -1434842884, -906583905, 1735155702, -1313991066, 1463674246, 2147483647, 1, 1868620970, 627633278, -1, 1, 962431237, -104045108, 1552672059, 135471812, -1966629759, -1829930360, 1, -1481088941, 0, 1, 1, 1623215841, 1523970121, -1685002046, 1805683907, 2147483647, 1, -1463635035, -1, -787595039, -2147483648, 1965579179, 0, 0, 974725146, -163561132, 2147483647, -2147483648, 1, -1), 㠙'鞑읻돓ꛮ䇶﫥鉒ᄌ邍镾ꭡ齊矴⛡ -> List(-1, 353758381, 1, -1399779626, 1, 2147483647, 2147483647, -1, 0, 1831074541, 2147483647, 2147483647, -2147483648, 2020931732, 0, 0, -1, -2147483648, 1, -78095621, 0, 2131289753, -1757355163, -1, 2147483647, 1802868945, -587724690, 2147483647, 1144435907, -1023712277, -1642792467, 1625852274, 2147483647, -2147483648, 0, 1271853620, 2147483647, -1, -1, 2147483647, 0, -501945601, 2144435990, 440299843, -143558226, -604245355, 1, -1596649095, -315780481, -2147483648), 倦Ŷ崴뵫耙얋ꔎ읕祰锳㑏것㺯叆桖ᫍ࿎ݒ秫ﯶ譛聂⍉峷⻱챿귒댖偑戠舘テ豃⸎뭥ᦈ삃脱ꖳ伜鿋ᶧꕫ崼㱆륉ŋ⊜輅嚬 -> List(-1, -2147483648, -1), 理䊎✥⌌羳紛ݰ㸆陙뫆쥶ꁝ蝹ዾ峹萌ⴎ帅麯㹪蚂툴턮䰳꒐왚ꦝ퉛慓媌떜벂㐀渞ꦯ⥳ﬥल⍵㑤퉰쇐ﳱङ抝㱗ꥮ㪏䳓恿彬ʨܟ묇﫜 -> List(-1938438413, 2147483647, 1, 1, -1758809507, -1, -36098943, -730441590, -1744175377, -68280266, 730472388, 1, 1, 2147483647, -194561435, -1737051746, -1385138790, -2147483648, -1303285493, 1698268402, -1685457410, -807093166, 1, -1, 1847579092, 1, -2147483648, 1675757994, 2147483647, 838288463, 2147483647, 1, 2147483647, 1, -1462457049, -288801477, 1731183691, -2147483648, -353575128, 2147483647, 1125595720, -2147483648, 506374841, -646182294, 850856075, -1823950441, 784547857, 983076700, -702492667, 0, -1), -> List(-1895093391, 0, 1, 979947740, 268315315, -2147483648, -2147483648, 0, 0, 1, -546080133, 1039694075, -1775847010, 1354688718, -309352358, -1725920766, -2147483648, 1088510378, -1048208898, 570749615, -1699342256, -1, -1696091901, -1, -195742114, 2147483647, -221861087, 0, -1, -1244971035, 2032764916, -1, -1767296831, 2007501787, -2011684237, 1, -5405042, 561831424, 2147483647, -1565827660, 1820462194, 494970156, 2147483647, 883894341), 败ࠈ䆫㏏뾼ꆗ罹ℭ镱閛퐭턨뫾ᄠ㜃§燢擾螺⁎蘌橜斜 -> List(1, -1, 1580538178, 0, 1, -1, 0, -1, 2147483647, -2095350589, -1009340135, 817701955, -2147483648, -2041745427, -1791573075, -432331911, 0, 2147483647, -1365257288, 1082198683, -133210452, -952248974, -1, -2147483648, 80608289, 604167220, 1, 1195778733, -2147483648, 0, 2147483647, -231181082, 1261341890, 0, 1, -2147483648, 1232237814, 1495587445, 1, 977453025, -2147483648, 2147483647, 1753937570, 1, 0, 2105878379, 1, -2147483648, 2147483647, 1065374698, -1329363162, 1885278228, 961774629, -1251345189, -325346601, 0, 492942708, 680887371, 0, -1501853196, -1322791486, -2147483648, -2147483648, -2147483648, 2147483647, -1, 2092454228, 571652194, -1), 曡깴ዹ靥垘ࣝ졯Ⰳ뒗楣滑ﻂ锂ึ⪃⌰ื䌴䁹遉Ṿ鼬側漌烘⋡呏ᝈ吏充䂯⬟阇媹뢁豘깶⼌஛檓層ጛዅ룎ඦ맾⍫㉰牐଼ŀᘴ㛉鵵ꤌ뫶쳶ᅬጪﱰೈꓖ㥔情ꎗ褳굾冤 -> List(0, 1, -2147483648, -398477512, -2147483648, 944132555, 1, -2147483648, 0, 1, -2147483648, 0, 1, -2147483648, 2075997359, -14837846, 1897132912, 0, -741777782, 0, -1067472474, -623697760, 0, 0, 1, -1, -1266417459, 2147483647, 2034361222, 233820000, 1, 762616927, 1, 0, 0, 1, 0), 쨗뮹諈ⷀ齜䖺㰙슭ꅚž᩻칛㝣ᇋ傩퓅ʼ逤궅‒㋳皺╾깧◩ﱀ쉎ꕂ១浚䖗☯눺멥몸魳定謯Ꝝ젿㪸㠧Å蜄 -> List(-2147483648, 0, -2147483648, 2147483647, 1504476250, -1028977074, 1, 1, -1775609571, -1, -2147483648, -2147483648, 187476823, 0, 0, 964793815, 1, -1351973748, -2055877541, -1, 1801306593, 2147483647, 2147483647, -2147483648, 0, 2147483647, -2147483648, -2147483648, 1721173414, 733260405, -2147483648, 1, -329063688, -1, 1, -1451858535, -1289807719, -1946481633, 1, 0, 920482766, -2132971960, 1981463380, -2147483648, 862809787, 2147483647, -579540797, -1533351918, 0, -1580233968, -2147483648, 2147483647, 0, -1854078333, 1, 2147483647, -78228226, 0, -1802284757, 1132081621, -1673996453, 1975657807, 1276869012, 2147483647, -1859311982, 1, 2147483647, 459258677, -591232232, 1, -2147483648, -1, -1765633944, 0, -1, 1, 1817870007, 0, 1629945818, -2147483648, -707579476, -955062138, -1703906481, 1073080213, 123949393, 1), 貣풳曋ಓ뗞界ᩙ䱕噖莍裆罯䫧ក徝᧖쒨喻쪺醄㛬⭦ჹภ猲垗븈䝄풇☷ሜ胊 -> List(949340548, -1354828675, -204717360, -1810663866, -993902719, -1400104640, 1, -1872652050, -1591873163, 1, 1, 1, 0, 1, 1, 1132184972, 0, 1613447529, -1927103654, 118930122, -1662224071, -1864883732, 0, -1245053331, -1960408619, 942805798), ﳭ镃᦬字ᓧ켞鲫ꔛ䥦稥뵘땋䌬ण㼟බᰧ⦻ݚꐮ悃숳䯎럫갥ꞷ㟥牓䌤袕삑ᑆ쁕私苨﫵䚖櫮꣒겳뜁䶾哯샶艷ꨆ㗜ꞻ벉䒤唖疱㯓啧龍坆 -> List(167608034, 1, 1608659026, 277464274, 1430734721, -2147483648, 45843352), f▊눥ꤵ鸡店湵䉱舫뺆ꬻ犈窵왁鱳쾝丳鰰݌菳졽角䭘谩覂挥ꤵ₊⊅ꮿቤ㉑粚ﱀ爸㳼얥含쬜Ўᦆ䧘ᇊ盠ஊ⶞㢝疈䥜ۄℜ盐梴䬈蝲੾镼 -> List(-2136121175, -1944834500, -1255048256, -2147483648, -423246017, 1814036067, 2147483647, -2057673413, 1, -1315817083, -1844536255), ㎉䅵┗ꖼ㚴펹䥢쐄㔨췖궑櫚援೫◑ꊏᙲ닀잰荆Ⴭ䳩ᦟ畕㧥⨡쀂氰嫐䆻訚渨≬婔ꃅ䑶覶维�銉爵㯴೘뭯뱛襑輧ꮨࣼⶉ̈́넉נꮙ蛦⟔厱૙姝ᛛ᏶∃궞ે㺐誧읐㧭֋⶗㱓鸕뀼쥝揌砼졡舯㏭同头 -> List(2147483647, -434353674, 1984641631, 1, 2147483647, 1, 1, -249658040, 2147483647, -1, 1829927981, 2147483647, 1, -2147483648, 901257019, 1316770298, -416144375, 0, 2008325518, 0, 1, 1183765625, -1, -1901535172, -1, -259749948, 1044889728, 1, 1398828764, 1700222019, 2147483647), ɀ涉䰳峜題州꽏方쭜꼲 -> List(1, 1, -783927460, 839026557, -2147483648, 1151685233, -1, -2147483648, 1649615011, 1571400122, -1, -90590517, 913356850, 1945050676, 1, -1293241805, -1863365548, 1855370696, -2147483648, -1, 1701796162, -2147483648, 479604905, 1522635087, 576053557, 9109504, 0, -1212764966, 2147483647, 1146861279, -1, 1607846929, 1849217026, 1, -1, -2147483648, 1551460479, 1039006043, 1120510520, -1, 1434815954, 2147483647, 1, -2147483648, 490632383, -2147483648, -463040935, 2147483647, -1536199081, 636219742, -2147483648, 1383192053, -745004850, -770131929, -2147483648, 2147483647, 290201221, 0, -2147483648, 1), ᙡ澺ꜱﮔ毲诂ⳓ⭧ꃞۄ솖扠苶恍픭ࣟꉂ鏿崇轍쬄櫫섰伵̽影㏌眃㩠낷䛸礸鿝樈햗ꂵȺআꕟ컝럚ⱛ㶽獅萤꓈늜 -> List(2146795402, 2097732147, 275044195, 2077810683, -1170574008, -2147483648, 2147483647, -1, -1842190106, -1, -413402472, 87777837, -131764363, 0, -1, -1, -389965888, 0, -2147483648, 1, -1661807613, 1, -322808007, 1, 1, 1404912083, -2147483648, -909839756, 2147483647, 1, -1498938096, 2147483647, -977407865, 2147483647, 1, 2147483647, -1434636556, 1195529499, 1, 0, 1576565863, 2147483647, -1, -1893389103, 549305196, 0, -1, -1642680761, -1627764001, -104714084, -1, -1, -1166085912, -1, 2147483647, 274784377, -2147483648, 321895931, 31693545, 1114876937, -581653478, -873158665, 0, -403721324, 2147483647, 1956977741, 2147483647, 1393263257, 1, 0, 323850385, -2147483648, 1, 2147483647, 0, 1, 433270148, 464568061, -1, 2147483647, 0, -1090193875, 1, 190295903), ⎬嗧흟쩩๲顏句賡鵈猛㪭熅餶睔ᅾ피箕ﱥ뀶柸팎骃【ꥡ⫡叭భ镟ﴲ袋궫囌駬ᴲ恰⋣者ꫩ鼟䊧ꒉÈ삏ꙁ썼䧼௤烝☕踩㑑梶㥝柆擝ጣꖾⴀ顩诉艬㔊ꎎҰ蒘嶝䣋牔࿭掗ാ쌫ỡ䄎ꠁ䁦ﵣ㓜땦晳ۇ䊂 -> List(1978433879, -1, 1, 1, -1, 2147483647, 1, -1817958431, -1950234689, -369925485, 1598207349, 1946468883, -2147483648, -2147483648, -1, 1, -2147483648, -274704476, 1774249889, -235524648, -1958613766, 2017826136, 0, 1, 2147483647, -1284564382, -775862894, 355725714, -338781304, 1302983742, -602434267, -2147483648, -1, -1095079251, -2147483648, -596178079, 1645009079, 0, -1550408117, 1489629954, 2147483647, 1509741402, -2147483648, 0, -2147483648, -2147483648, 1861438767, -2147483648), ⊚ට홟ᣛꘞ濜בֿ쑕オ숥퉀螬䕻꬛鎊ﴴᮣ峒䦈懜ﺼ몰㴼뤉愶몙㮳᝗䌥며纃ᡓụ퍄ㄵꐐ㯵걮쬹곉胼୮⭏뾍㇞䲚ῇ킅跟̷褗↡꒰耭虲嘇灃蒇䖃䧷 -> List(1947248824, -1000018136, 2147483647, 796446795, 1941052477, -373647028, 376376820, -1, 0, -2147483648, 2147483647, 1641182963, 0, 2147483647, -1410581603, 1929297981, 1655481537, 2147483647, 1057575921, -1, -1651768414, -760077725, 596049547, -355106418, 746907542, -1, 405220936, 0, 244939565, 1640410768, -1, -732896242, 2147483647, 0, 0, 2147483647, -2147483648, 1, -1335992512, 0, -712255530, -1, 2116396095, 594270728, 2038622076, 1387867961, 0, -1222232317, 2147483647, -538765126, 2147483647, 1424665603, -873885985, -2147483648, 1, -1, 538979550, -685932896, -1330125732, 8721706, -791221108, 1, -1, -1, 1739922470, 0, -1306708031, -1, -1, -2147483648, 2147483647, 1249026903), 롡翧⚩앰₄汱汑粫껣䀰쫗湷쑎馞탡浃짣誫ͯ䒿;鴽攳┄ꂣ﹌䊇ꬷ备カᢐ躑࿜謲猃꛰ਐ㦔爟奃♢獔ཌྷ塮嬹⬁ꈡꎬ掅ü딪苇ڏˎ䜌ටک墳 -> List(470384262, 1, -1800264926, 0, -1, 0, 348322687, 2147483647, -2147483648, 430193372, -2147483648, -2147483648, 2147483647, -682252130, -1, 519087597, -2147483648, -1, -2147483648, 2147483647, 75252599, 1439960130, 1827524793, -1, -1172866203, -2147483648, 56850682, 1649328184, 1126427066, 2147483647, 589640642, 0, 1, -1680258535, -1, -1554605529, 1, -1366438178, -1479150523, -2147483648, -1753715511, 0, -624730493, 2147483647, 1, -1314565800, -1, -1458663141, -1, -1273789894, 1564189357, -839550456, 0, 1, -1832653013, -714320420, 2147483647, 2147483647, 0, -1, -374750949, -1, 230819797, -1876895697, 1811220160, 1, 355915533, -2147483648, 1283650289, 214381842, 0, 1, 1, 243259973, 0, -2064291282, 1534502664, -1150934623, 1489588841, -2147483648, 251680389), 葎既逝ﲑ歙냴巚낫淗䑆ㅁ뱃䈚䩚ꑎ숴䭗竢䝤ꐧ -> List(-1838165051, -1, 0, -1, -2147483648, -948597267, -131005939, -2075718581, -1, 2147483647, -2147483648, -2147483648, 2147483647, 532805476, -935733082, -2147483648, -1223890219, -1953346958, 2033390630, 1286505265, 1, 320586217, 1132445189, -1, -1, -1, 2147483647, -2147483648, 850644801), ꎔ嘓윷騾克섫延䈈佝熨䵊ꄕĮ킚迍ᴞ줍죉䊚 -> List(0, 2147483647, -829593000, 2147483647, -698346901, 1, 104306663, 0, -2147483648, 1, 578438804, 2147483647, 2147483647, -54909464, 0, -471680566, -1263395579, -1219707462, 1, 2147483647, 2147483647, 1, -2129420698, 2147483647, 1436596017, 1627137623, 1146195464, 2147483647, -1929742961, 82586272, 802004250, 2147483647, 0, 1683819006, 2147483647, -2147483648, 22895936, -734025863, 873947, -621331037, -570346121, 1777861787, 147491139, -2147483648, 1537353664, 1192431230, 748176731, 2147483647, 2147483647, 977968063, 2147483647, 2147483647, 574862330, 1075651226, 2147483647, -2147483648, 0, 2147483647, 1290442719, 0, -1, 1884500972, -1443150248, -1, 420069498, -1815679978, -1130129304, 0, 0), 唑術㿝䖃狲瞮뙰穈쮮홐䄶孷吝࿒檉՛鹻窴贾ᗘ続욺㨰槰镯㟛笖⩲쾱ᨿ᫓秃맣喬鑗賖烬홉ჼ溆䷑ᏹ⟛흿㳽Ꮑꋓ웬쐈↼勽ⴠ笔뷜퐙㰜ɝ漡民ᅍ憠껕ஜ篛츹ឩ칥秝踈悈숯‑窭錥骟楀撮Ἂ⣣说 -> List(-343664147, -773455633, 0, -1, 656635795, -2147483648, 1113358154, -1881924120, -576580101, 2147483647, 0, -2147483648, -290901090, -941056744, 449424144, -1, 2147483647, -2147483648, 1222460678, -1), Ꮛ惕켅麡羶极깚꯲鱢㓹鍩旲ꨊ䩲﯅﫤⁸溱㷸绽瘅룥僕ࠍꞗ썋ꋠ韏髬륎߱ꕊ勃ౠ̄爼曺精桂⾟Ʉ휀ㅊ먦˽쑟⩯潜堾赩芮뻀䛳㼳膿ލ胹褻꒒쨋蘆 -> List(575821508, -342335801, -508580167, -129408759, -1, -2147483648, 2147483647, 1, 2147483647, -139418024, 418531302, -98785938, 1, -1672356448), 㟱心᠇軹᳄뻩傺烹⻆햅ﮞተ첗㍮黑഍楆閛穩ᬻ逿赗킪䪿뛘盛ﵻ㠝ʐዡ攫茶ꑠ⼘䳠졐油덾搜펠뵙ﳂ裏쇻䩦躈氱멱 -> List(1, 2147483647, 1, -1484270635, 0, -1, 409132478, -2034135815), ꬳ쓊햚晟頝萟먗ኵ볭ꒄ⿭䫨ර夑뺥셣柂腂⋂ԾꞦ툷橴鍤庝궭鱘ᡞ㪓ꖇ氌␖鱬䏏鏩㊚듕팚꺼손佗໻䤷뀱㥏⯁긌졔♎냗탲薇ꄂ敭衲䄌켡㸄ﰿ꩒켂觟쇎뵼ᇯᆀј筂 -> List(-2147483648, 298875148, -1, -2141072940, 0, -1, 1347947525, -896364664, 2147483647, -1440050231, 2147483647, -1739108575, -1, 2147483647, 0, 0, 2035488956, -1, 1, -2147483648, 1549997918, 0, -1, -2144153716, -249976380, 1755239464, 1664977993, -2147483648, -1, -2147483648, 2147483647, 35285481, 0, -765946086, -1775695158, 1, -2119799309, -1425128841, -2147483648, -635297818), 휽ᔤǡꞴݩ蠌粒ጞ駅쳚﬊鞂嚓瓔ꤑ咙꺪껑⿏荰⍯㐡놵Ⅷퟒฅ滍䜄◅⤬킒阾上ᆺⴤᎡ䜐ⶣ遲䂱쟰鵍્‖橏ꠉ頷冉헜봟㑯宜䝧횎᤭봷 -> List(1099296681, 2097240062, 0, 0, -388014178, 0, -1, 1, -1514018793, 2147483647, 354033524, -845620187, 0, 1533039593, 2147483647, -887687519, 0, -1443861658, -82676869, -751482034, -370018114, 2147483647, 0, -1665361473, -864803813, 2147483647, 1321124298, 1315031444, -1, 2147483647, -2147483648, 1134783279, 2147483647, 1, -902014253, 0), 쩍㦋쏱⼣뎡姣ゑ뽖㸗镮洿鎢ဧဧ긩福ꅖ஀㽈ᦂ稧ᦸልi湛ჴ내⿑趿鹔⤀㐤릗﫜湇湺㏥뫬손緺瓣빷㙦띁叾궊㾂먹�⡄芹淶껤隤펔䌱䢷̗ꦤ琖ꊸ䇣뭌詮뱲슒鶠䭰㮇븛ल뻙䕊 -> List(-1399646084, 0, -1943679732, -670914844, 0, -626422146, -457337027, -761155368, 1, -1, -349677059, -2147483648, -1276449135, -2147483648, 1840304130, 711681998, -2096725981, -1, 1, -1, 1, 2147483647, -809384650, 1, 2147483647, 2147483647, 1820647987, 691200246, 0, -1252035705, 2147483647, -1, 1, 0, -1, -749521843, -1, -1, 0, -1629669434, 2147483647, 0, -2147483648, -1019245739, 0, 2147483647, 2147483647, 2147483647, -1184917698, -683738444, 1, 2147483647, -2147483648, 2147483647), 쓙᫸잜糸ൕ駕卡ꧾ멋맪널훮鏌쎂馐䬲鎭꽾ᇙ瓨ꗠ帬澖㛸ﭡ괈㵨죋뷙䩇鿷杞蓩糳揭騾킁焦ﻐ䆊罨펯㲵╱섛쏯甤춏 -> List(2147483647, 1367513524, 1, 1410967425, 392985479, 1971787554, 1, 289449372, 1996287154, 2147483647, -1, 2147483647, 1040680080, -1418461179, -465995607, -341180397, 1, -2147483648, -1, -1993225419, 271366752, -401283227, 0, 373659088, -1691252453, -587755811, -1, -1884130870, 1, 1212462831, 813286928, 0), 篮䌸㠒蘁趷⶯翸״貌ꍿ⃙잫녵氯뚞팱鲽淄玼㬜⻆ೈ៯荊₳襜侾㻿䔈꧃闑斟顟੆̟熯㓖붱쨶븊ᣮ덢눦堲鹵频驯ꕪ휏蟜疸잶᱖꧎䓫끡뫡⨘UᒋዅŞ惰퓚檳飰⌢탄㒼퀢聕 -> List(2147483647, -2147483648, 0), 橳ꏶ䄺枈䵳ᆹ趖뀉ϟ䨄伃哙䙎㨬稽徕笭㶜 -> List(389768717, -166264686, 1448701345, 1591128842, -1678584985, -1), ⶔ坛謢Ꝉ곕쏽绉퍤螺暫ࣥح瀲旚迶聣훬刜낃㟣ꤰ騋⪚㉼숚轪䝨᱕ㄺ℮힋뗆烺既ἥ儧碓⅗ﲈꆑ䊣㲺单샔厇잴腭挟⎃ -> List(-953051899, -1695336250, -1852418721, 0, 1, -1332979726, 1867498250, 952962161, 309446659, 1, 832858887, -1, 510537037, -960110433, -1629137782, 0, 288831374, -1, -1, 1, 1, -52270485, 0, -647249788, -1, 1762806662, -2147483648, -1440974511, 859471816, 0, -156881312, 2012686329, 287297944, -1, 1), 잹㰒嚀ᆩ煌䌂⎒⋘騞蜱㣫ⰻﺊ锩惛듧␝ -> List(-1, 411427694, 800382237, 1940898571, -1, -1, 0, 1, 1221871599, -1914908904, -1873854981, 1, -322816536, -1746109889, -1, 0, -1067776584, 2147483647, 784253362, 972186844, 1853860138, -1611500160, -1583977845, -1661310897, 1261396087, 1868984713, 0, 86496154, 0, -1, -1, -2134038118, -885930776, -1, -221410077, -1, 2147483647, -1227726982, 0, -1, -2147483648, 1154644276, 2135365599, 1, 521170442, 1163058453, 1678112189, -2147483648, 531435880, 1, 0, 1, -761157994, 1, -2147483648, 0, 0, -2147483648, 0, -1, 0, 0, -1, -1, 2147483647, -2147483648, 1737339095, 614005035, -1, 0, 1, -2064527822, -348112018, -1), 奨䬚쓓差婶ᷥ㇋麛婡ﹴ䯯踻탾⓰埙箋◁벉颉녁偤魯㹼兏飋奞饕粺ㆈ톾롁╦뷍쎴ⷢ氝粈 -> List(2147483647, -751939565, -1223777619, 438732324, -2147483648, -2147483648, 1191225867, -2147483648, 2021535860, 82734883, 0, 269389264, -2147483648, -1, 2147483647, 127968122, -354415217, 166705539, 2147483647, 259857609, -480931522, -1631806477, -54179969, -805836108, 1, 507038292, -1645911512, -775458878, -1, 471169327, -2147483648, 0, -2147483648, -1721341141, -1947100180, -1586928470, -1, 1, 2147483647, -1761150304, 2023079767, 1, -402441153, -83843424, -995257768, -1, 1502804094, -2147483648, 1855636846, 2147483647), 썚ȱ꼽卜퓅➃ᝁ叻䊙ﱑὶ೟턷뮌ᔎ앝ɔ缈럒짿ग㯠딁鳃ᥬ二춒鍃ﻛឳ沴痹඘힨ꬂ㴷浓S궵⤛R脘㫄둈秫죉⊞篚茶ﶃ뻐ꇫ牺㮎虲㇌鿂桄젍岙硹䏬Ꮠ⭫￉츷᝔讍ꜿ -> List(2147483647, -2009914947, -1, -1521149300, -1857215322, -2147483648, 1998575632, 1, 1339842807, 0, 1, 0, 2147483647, 0, -1044959011, 2147483647, 0, 1, 0, 1270602100, 1770430468, 987096636, 0, 1067680009, 634015732, -1507160760, 123437943, -1, 1563529999, 1, -2147483648, 0, -1, 2080863401, 917080443, -2147483648, -1821212665, 1, -2147483648, 2147483647, -1, 1939682493, 2147483647, 1, -759364057, 1, 0, 1188038676, 1, 1046517684, 1, -1, 1, 737262221, -1, -776986352, -1416332098, 84918392, 1, 1703768042, -1, -722589359, -76786128, 2147483647, 2147483647, 2147483647, 898862412, -2147483648, -74663935, -1, 2147483647, 2147483647, -1460798080, -1, 1232381669, 2147483647, -2147483648, 1337493025, 0, -2147483648, -1, -622312875, 0, 1886873322, 851665635, 1, 471604084, 2147483647), 䃢㝸뒞잛ೞ⁝হ켨㸑噜ⴅ䵷⇔ -> List(-1453869683, 343306150, 517066194, 2101717006, -1, 1, -1346867123, -2147483648, -2040596095, 1579980496, 1, -1, 45411989, 1, -1, -1692718984, 2147483647, -895661584, -1, -2147483648, 1, 0, 2147483647, 1137567879, 1400333998, 2113402592, 480811737, 0, 1, 0, 2023394720, -2090653129, -1180496708, -2147483648, -2083063813, 2147483647, 406301305, -1101468420, -1267725147, -2147483648, 852068045, -2147483648, -2147483648, 1416219987, 0, 0, -1, 0, 2147483647, -1), ᴓ욐식䶩뉢鿈冠洎뛣꘼볖嵣↨ -> List(2147483647, -2147483648, -1, 2089292417, -1713126449, 1095143739, 1227761227, -1879794715, -2147483648, 1998475050, -2147483648, -1909853860, -2147483648, 1480691951, 1284962651, 1243311578, 1597815498, -1, -1, 2147483647, 1, 195137495, -2147483648, -1787650463, -1, -1, -1, -2147483648, -1522787185, 2147483647, 2100308888, 711412775, 1, -1852438745, 1, 2102523194, -2147483648, 1169388460, -1978843812, 1181101239, -2035067100, 1, 352761450, -400215928, 1, -476125026), 㨅邔넴䐞ﹲ秸㭶妾쐪꼐︮㠍탅抟傋ꪓ埬뎢ꅳ೼ -> List(-2147483648, 593443721, -789215080, 199955910, -793797567, -1, 416478067, 233793101, 0, 325868705, -2143719893, 1029414977, 0, 1, 0, 0, -1, -490216070, -1379278193, 0, 0, -1273709351, 1, 2034784465, 1, -890056078, 0, -2147483648, 1356877435, -355666033, -2147483648, 0, 0, -1889900605, 2147483647, -1, 463757294, -1, -692274666, 377816189, 399027293, 0, -1209394065, -930777385, 0, 0, -874571014, -1281557724, -1704468069, 796140323, 0, -91616623, -2147483648, 336837889, 0, 508443684, 681021307, 0, 472921878, 2100310198, 0, -1075314894, -2135331729, -351332867, 1088833216, -1, -337346754), 㕣ẛ䡧뙩웓빘軨䧲組뿓涍憂밶ᔇᇑ㕋ዺ툧削靻轺䮤퇋Ᏽ -> List(0, -1, 943785293, 2147483647, 1890900848, 0, -421108173, 1317016024, -1, -1, -1732055175, 1673399097, 0, 0, -994279530, 2147483647, -2147483648, 0, 1337789759, 219968629, 0, -2147483648, -1762083594, 1671448214, -2147483648, 1654151152, -1, 0, 1, -767977674, -1874767759, -467555320, -1693072989, -391863790, 0, 271819319, 193155273, -2147483648, 527643071, -1, 161068146, 977109498, 1, -1, 376784796, 0))`

@dseer0
Copy link

dseer0 commented Mar 16, 2022

in my opinion there is a problem with keys starting with whitespace
tested with input:
Map("1" -> List(), "\n55" -> List(), "4" -> List())

it seems like JVM parser (JawnParser.parse) sorts this with whitespaces at beggining
the output is:
{"\n55" : [],"1" : [],"4" : []}

with JS parser (convertJsToJson(JSON.parse(input))) it outputs:
{"1" : [],"4" : [],"\n55" : []}

its the same for '\t', ' ', '', '\n'

@armanbilge
Copy link
Contributor

armanbilge commented Mar 16, 2022

@dseer0 If you want/need identical semantics, you can use the Jawn parser on JS.

@dseer0
Copy link

dseer0 commented Mar 16, 2022

@armanbilge is there any reason jawn isnt the default parser on JS? or there's just no point in switching to jawn?

@armanbilge
Copy link
Contributor

@dseer0 The default parser on JS is JSON.parse which the JS runtime can provide a high-performance (native) implementation of.

Using Jawn on JS cannot be as performant because it will compile to pure JavaScript. It will also increase the size of your final JS bundle. I haven't measured these, so it may or may not be a big deal.

So, it's a trade-off. The native JSON.parse works well for most cases, but if you need identical semantics or custom configuration or streaming JSON parsing then the Jawn parser will work better for you.

@armanbilge
Copy link
Contributor

@dseer0 we finally got some benchmarks for Jawn vs JSON.parse on JS, and it turns out that Jawn is quite competitive actually. I think you are right, and we should make Jawn the default on JS as well.

isomarcte added a commit to isomarcte/circe that referenced this issue Jul 11, 2022
Fixes circe#1911

The `JSON.parse` call on native JS automatically and always sorts the keys when parsing, but slightly differently than the ordering prescribed by `Order[String]`. This causes tests on the sorted printers to fail under certain circumstances.

The fix for this is to use Jawn on JS to get consistent parsing. If we switch to Jawn in general for both JS and the JVM then we can undo this.

Note, the issue has never been with the printing, but always with the parsing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants