Skip to content

Fix expected hashmap key order in joy-test.janet#115

Open
veqqq wants to merge 1 commit intojoy-framework:masterfrom
veqqq:patch-2
Open

Fix expected hashmap key order in joy-test.janet#115
veqqq wants to merge 1 commit intojoy-framework:masterfrom
veqqq:patch-2

Conversation

@veqqq
Copy link
Copy Markdown
Contributor

@veqqq veqqq commented Apr 24, 2026

The keys are in the wrong order, causing the test to fail. It's fairly brittle, as a random change to Janet internals could change the output order again - but hashmaps don't care about order, so this is just kicking the bucket down the road.

@sarna
Copy link
Copy Markdown

sarna commented Apr 25, 2026

I've been thinking - maybe it'd be better to use an object that serializes predictably, ie all objects must have at most one key? For example, {:array [{:name "value"} {:number 1}]} would always end up as {"array": [{"name": "value"}, {"number": 1}]}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants