Commit Graph

24 Commits

Author SHA1 Message Date
John Turner
0d40608404 compare versions as strings rather than parsing them to ints
Parsing version numbers to u64s could cause an panic on int overflow
with very large versions.
2025-11-19 05:04:40 +00:00
John Turner
16fdd27e9a compare letters before suffixes, and having a letter is greater than none 2025-11-19 01:17:18 +00:00
John Turner
c75a38f615 allow slot to be only :* := :slot/sub= or :slot 2025-11-18 04:15:53 +00:00
John Turner
2dc5df6112 support portage build-id extension 2025-11-18 03:21:44 +00:00
John Turner
78398b7ebe support ::repo syntax 2025-11-18 01:44:45 +00:00
John Turner
db02762ee1 version wildcard comes after the version expression 2025-11-18 01:27:29 +00:00
John Turner
0436fbc770 fix clippy lints 2025-11-15 01:55:19 +00:00
John Turner
dfaad015b9 impl conversion methods for Atom and Cp 2025-11-15 00:10:55 +00:00
John Turner
9c7d38f82c having more components, even if zeros, make an atom greater 2025-11-14 23:16:25 +00:00
John Turner
5a793bebe8 check if a OR b has leading zeros, and if so, strip and do ascii cmp 2025-11-14 23:15:01 +00:00
John Turner
07d1823f0f compare version letter in version cmp algo 2025-11-14 23:13:19 +00:00
John Turner
29af7572a0 remove leftover dbgs! 2025-11-14 22:27:58 +00:00
John Turner
36bdbbd8bc allow Cpv type to have a slot 2025-11-13 19:57:28 +00:00
John Turner
0448a52926 impl Cp type 2025-11-13 19:49:22 +00:00
John Turner
1882ce3137 impl Cpv type 2025-11-13 18:03:34 +00:00
John Turner
f4a45717d2 impl version comparison algorithm 2025-11-13 18:00:15 +00:00
John Turner
b147d967d4 put version and version operator in the same Option in the Atom struct
All atoms must either have a version with a version operator, or have
no version and no version operator. Putting these in the same Option
helps encode that into the type system.
2025-11-08 22:13:14 +00:00
John Turner
b54616a6dd impl Parseable trait 2025-10-28 09:47:41 +00:00
John Turner
ee1d15f983 use deref getters where needed 2025-10-27 22:09:30 -04:00
John Turner
990aa475ab fix lints 2025-10-26 01:52:50 -04:00
John Turner
4d69986e18 impl fmt::Display for Atom 2025-10-26 01:23:45 -04:00
John Turner
680ead0504 support "=" version operator 2025-10-25 01:19:35 -04:00
John Turner
d75266f967 support atoms with empty slot 2025-10-24 21:32:41 -04:00
John Turner
2e7d8cfbb9 impl atom parsing 2025-10-23 21:19:47 -04:00