• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moonbitlang / core / 1455
92%

Build:
DEFAULT BRANCH: main
Ran 05 Oct 2025 05:05AM UTC
Jobs 1
Files 255
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Oct 2025 05:04AM UTC coverage: 89.187% (-0.004%) from 89.191%
1455

push

github

bobzhang
refactor(immut/sorted_set): Change Compare implementation to compare by size first

BREAKING CHANGE: The Compare trait implementation for SortedSet now compares
sets by size first before comparing elements lexicographically. This is a
semantic change from the previous behavior.

Previous behavior:
- Compared sets element-by-element lexicographically
- {1,2} > {3} because 3 > 2 (compared until one iterator exhausted)

New behavior:
- Compares by size first, then by elements if sizes are equal
- {1,2} > {3} because size(2) > size(1)
- Only compares elements lexicographically when sizes are equal

Rationale:
- More intuitive: larger sets are "greater than" smaller sets
- Performance: Size comparison is O(1), avoids unnecessary element iteration
- Consistency: Matches common set comparison semantics in other languages

Changes:
- Refactored iterator-based Eq and Compare implementations to generic.mbt
- Extracted InorderIterator to external_iterator.mbt
- Added comprehensive tests for both same-size and different-size comparisons
- Both implementations now use the external iterator for element traversal

Request for review:
This is a breaking change that affects anyone using Compare/ordering operations
on SortedSet. Please review whether this new semantic is acceptable.

24 of 24 new or added lines in 2 files covered. (100.0%)

9271 of 10395 relevant lines covered (89.19%)

193662.05 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1455.1 05 Oct 2025 05:05AM UTC 256
89.22
GitHub Action Run
Source Files on build 1455
  • Tree
  • List 255
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • c8eae561 on github
  • Prev Build on main (#1453)
  • Next Build on main (#1457)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc