100 Commits
Author SHA1 Message Date
cyqsimon b511b928f4 Write changelog 2026-03-25 15:58:58 +08:00
cyqsimon 3e789f5241 Imprv: cleanup matcher glob parsing logic
- Data flow is now strictly linear from `RawMatcher` to `Matcher`
  - I've also hoisted `RawMatcher` in front of `Matcher` to signal this
- Re-type `RawMatcher.case_sensitive` from `bool` to `Option<bool>`
  - This moves all parser logic away from `RawMatcher`, making it a more faithful representation of the data
- Favour default consts in `Matcher::try_from<RawMatcher>` to `Default` impl on `Case`
  - Because the default choice of casing is a design decision of the logic, not an intrinsic property of the type
2026-03-25 15:58:45 +08:00
cyqsimon 015cafdbdc Write changelog 2025-11-13 13:50:53 +08:00
cyqsimon f5a934c213 Update quadlet syntax mapping to include *.{build,pod} files 2025-11-13 13:44:24 +08:00
cyqsimon 555933315d Only start offload worker thread when there's more than 1 core (#2956)
* Only start offload worker thread when there's more than 1 core

* Write changelog
2025-07-15 05:21:00 +02:00
cyqsimon 68df079c0e Add improvement note on parse + unparse 2025-07-10 23:31:12 +03:00
cyqsimon 563c4c290d Consistent spaces in quote! invocations 2025-07-10 23:31:12 +03:00
cyqsimon ffbcfd53f9 Write changelog 2025-07-10 23:31:12 +03:00
cyqsimon fd12328293 Build script: replace string-based codegen with quote-based codegen 2025-07-10 23:31:12 +03:00
cyqsimon 360d43dd4d Write changelog 2025-07-08 23:33:41 +03:00
cyqsimon e0165a2d6a Add syntax mapping for certbot certificate configuration 2025-07-08 23:33:41 +03:00
cyqsimon cf7631d469 CICD: replace windows-2019 runners with windows-2025 (#3339)
* CICD: replace windows-2019 runners with windows-2025

See https://github.com/actions/runner-images/issues/12045

* Write changelog
2025-07-08 12:37:06 +02:00
cyqsimon 5dc3d8c936 Write changelog 2025-05-20 15:33:57 +08:00
cyqsimon a4ffe2fdbf Update quadlet syntax mapping rules to cover quadlets in subdirectories 2025-05-20 15:22:55 +08:00
cyqsimon dd9dc4f76b Write changelog 2025-01-24 23:02:57 +02:00
cyqsimon 94f49fd99b Add syntax mapping for paru configuration 2025-01-24 23:02:57 +02:00
cyqsimon 319b8868fc Write changelog 2024-07-26 23:39:27 +08:00
cyqsimon 7bd6cdbebc Add syntax mapping for kubernetes config files 2024-07-26 23:23:58 +08:00
cyqsimon 1a11ba11e3 Write changelog 2024-07-26 16:18:16 +08:00
cyqsimon c34bdb5e66 Bump time to 0.3.36 (fixes #3043) 2024-07-26 16:10:17 +08:00
cyqsimon f82487daf8 Write changelog 2024-05-15 14:35:47 +08:00
cyqsimon 3a9d574770 Add syntax mapping for /etc/pacman.conf 2024-05-15 14:31:25 +08:00
cyqsimon 071874ea8f Write changelog 2024-02-29 14:34:00 +08:00
cyqsimon 46a2c004a2 Add syntax mapping for Wireguard config 2024-02-29 14:25:20 +08:00
cyqsimon 26ac179548 Add note on thread synchronization 2024-02-26 11:31:30 +08:00
cyqsimon c7bce46622 Write changelog 2024-02-21 15:24:36 +08:00
cyqsimon 2b4339663c Builtin glob matchers build offload, v2 2024-02-21 14:56:37 +08:00
cyqsimon 6a6b02117b Apply clippy fixes (#2864)
* Apply clippy fixes

* Write changelog
2024-02-20 19:39:22 +01:00
cyqsimon 511cd30105 Write changelog 2024-02-21 00:26:23 +08:00
cyqsimon 92915e22e7 Map containers .conf files to TOML syntax 2024-02-21 00:25:06 +08:00
cyqsimon d499191b0a Write changelog 2024-02-20 14:54:43 +08:00
cyqsimon 152d69fe98 Add syntax mapping for podman quadlets 2024-02-20 14:49:12 +08:00
cyqsimon 81aa24310c Write changelog 2024-02-20 14:33:02 +08:00
cyqsimon 75cdabaf13 Relax syntax mapping rule restrictions to allow brace expansion 2024-02-20 14:24:51 +08:00
cyqsimon 55e02e101d Apply review suggestions to benchmark script 2024-01-22 00:25:23 +08:00
cyqsimon 230abfd2bc Merge branch 'master' into syntax-mapping-refactor 2024-01-19 15:18:48 +08:00
cyqsimon c0f2d6f934 Add note on subdirectory's irrelevance to ordering 2024-01-18 23:26:00 +08:00
cyqsimon 9f36a7a284 Minor codestyle improvements 2024-01-18 23:07:11 +08:00
cyqsimon e4d637a3d8 Reverse precedence of syntax mappings specified on CLI 2024-01-18 22:41:57 +08:00
cyqsimon 15ab4478c9 Reduce unnecessary build deps 2023-12-22 19:55:49 +08:00
cyqsimon f0a6fe216d Benchmark prototype 2023-12-11 10:38:59 +08:00
cyqsimon d792dc5804 Move rusty-fork to dev-dependencies 2023-12-11 10:21:07 +08:00
cyqsimon 8a08025091 Disable builtin_mappings_are_lazily_evaluated for ARM builds 2023-12-11 10:21:06 +08:00
cyqsimon 586c804b1e Add test: builtin_mappings_are_lazily_evaluated 2023-12-11 10:21:06 +08:00
cyqsimon e30161ac3c Add test: builtin_mappings_matcher_only_compile_once 2023-12-11 10:21:06 +08:00
cyqsimon 3865908439 Add test: custom_mappings_precedence 2023-12-11 10:21:06 +08:00
cyqsimon 9474b4cf8b Rename & sort syntax mapping tests 2023-12-11 10:21:06 +08:00
cyqsimon b48bda21a3 Add test: all_fixed_builtin_mappings_can_compile 2023-12-11 10:21:06 +08:00
cyqsimon daf33709a0 Additional sanity check for matcher parser 2023-12-11 10:21:06 +08:00
cyqsimon 36073a3d95 Document another rule ignore condition 2023-12-11 10:21:06 +08:00
cyqsimon 12fa2cb1eb - is not a legal character in variable name 2023-12-11 10:21:06 +08:00
cyqsimon 1f10d846a3 Fix tests
1. for override test, test for something in `common`
2. move git mappings to `common`
2023-12-11 10:21:05 +08:00
cyqsimon 22531eab90 Port all mappings to new system 2023-12-11 10:21:05 +08:00
cyqsimon 0c1b80faab Impl per-target syntax mappings 2023-12-11 10:21:05 +08:00
cyqsimon 2c9bf229e1 Add doc comment for BUILTIN_MAPPINGS 2023-12-11 10:21:05 +08:00
cyqsimon 822e81bb24 Suppress clippy warning for MappingTarget in build script 2023-12-11 10:21:05 +08:00
cyqsimon ad628c0471 Fix iterator lifetime incompatibility 2023-12-11 10:21:05 +08:00
cyqsimon f483d2df42 Lazily compile GlobMatchers 2023-12-11 10:21:05 +08:00
cyqsimon 4ad3002543 s/Lazy<GlobMatcher>/Lazy<Option<GlobMatcher>>/ 2023-12-11 10:21:05 +08:00
cyqsimon cfd622d6e1 Migrate SyntaxMapping impl to new system
Most existing builtins are removed but not yet ported, so the test
`user_can_override_builtin_mappings` should fail. It should pass once the old
rules have been ported.
2023-12-11 10:21:05 +08:00
cyqsimon 1c7c9a6b6d Split syntax_mapping/builtin.rs 2023-12-11 10:21:05 +08:00
cyqsimon 0c93ca80f4 Guard against duplicate matchers in build script 2023-12-11 10:21:04 +08:00
cyqsimon de6d418d42 Remove BuiltinMatcher enum
Explanation added as comments in code
Using plain `Lazy<Option<GlobMatcher>>` is just better
2023-12-11 10:21:04 +08:00
cyqsimon c016b462c0 STATIC_RULES => BUILTIN_MAPPINGS 2023-12-11 10:21:04 +08:00
cyqsimon 7e1fbcfe95 Fix visibility for SyntaxMapping::get_syntax_for
This change was made in 31fb708, but then was reverted (I assume incorrectly)
in 6246485.
2023-12-11 10:21:04 +08:00
cyqsimon 4815b6155e Write changelog 2023-12-11 10:21:03 +08:00
cyqsimon 075b5b288a Matcher parser errors when empty 2023-12-11 10:20:12 +08:00
cyqsimon 7cfd1e0d78 Rerun build script only when necessary 2023-12-11 10:20:12 +08:00
cyqsimon 9f7d70f642 Use regex for matcher parsing
- Somewhat better maintainability I think
2023-12-11 10:20:12 +08:00
cyqsimon 0fea82cff9 Minor improvement of variable naming accuracy 2023-12-11 10:20:11 +08:00
cyqsimon 64840fbbae join_segments -> build_glob_string
- this is a more descriptive name
2023-12-11 10:20:11 +08:00
cyqsimon 827b3eca2f Add unset *.conf example 2023-12-11 10:20:11 +08:00
cyqsimon 9478d2dfe8 Isolate variables at compile time 2023-12-11 10:20:11 +08:00
cyqsimon d24501ab5e include! generated mappings in source 2023-12-11 10:20:11 +08:00
cyqsimon 9f4259721a Fix codegen type declaration 2023-12-11 10:20:11 +08:00
cyqsimon 77e491161c Ensure lexicographical ordering 2023-12-11 10:20:10 +08:00
cyqsimon 97780f987e MappingDefModel::into_mapping_list returns MappingList 2023-12-11 10:20:10 +08:00
cyqsimon d1bc0ef0d4 Build script codegen initial impl 2023-12-11 10:20:10 +08:00
cyqsimon 52f94b4623 Clarify syntax selection algorithm behaviour 2023-12-11 10:20:10 +08:00
cyqsimon 37fd050100 Describe filename ordering more accurately 2023-12-11 10:20:10 +08:00
cyqsimon 83286975ff Add ordering prefix to git-config example 2023-12-11 10:20:10 +08:00
cyqsimon f705fcb984 Add global git-config example 2023-12-11 10:20:10 +08:00
cyqsimon 9ca1f20f43 Add specification draft 2023-12-11 10:20:10 +08:00
cyqsimon 748e2a681f Add columns=3 to repology badge 2023-12-01 21:39:25 +01:00
cyqsimon 51203ff750 Use GitHub API to get correct PR submitter (#2791) 2023-12-01 11:18:10 +00:00
cyqsimon 491ae70aa9 Write changelog 2023-11-06 06:02:59 +01:00
cyqsimon d64c568196 Allow overriding {WARMUP,RUN}_COUNT using env 2023-11-06 06:02:59 +01:00
cyqsimon b5982a6174 Allow setting number of runs in run-benchmarks.sh 2023-11-06 06:02:59 +01:00
cyqsimon bcc2de86b4 CI: add changelog check (#2766)
* Added changelog item check

Fetch the base branch and diff correctly

- See: https://github.com/actions/checkout/issues/160

Improve organisation

Add some echo for easier debugging

Fix bad variable syntax

Clarify the double-print in the success case

* Write to changelog

* Don't block dependabot PRs
2023-11-03 08:53:29 +01:00
cyqsimon 1296aea836 Write changelog for #2756
- I always forget to write changelog.
2023-11-03 06:25:18 +01:00
cyqsimon 5498c24c33 Rerun build script only when necessary 2023-11-02 17:54:57 +01:00
cyqsimon 79a03b4299 Reorganise build script into modules 2023-11-02 17:54:57 +01:00
cyqsimon f3a5e9a73c Use implicit format string capture syntax 2023-11-02 17:54:57 +01:00
cyqsimon 2710a19ecb Immutably construct variables map 2023-11-02 17:54:57 +01:00
cyqsimon 6d0ef259f6 Read env in build script at runtime 2023-11-02 17:54:57 +01:00
cyqsimon b1577cc083 Reorganise functions in build script 2023-11-02 17:54:57 +01:00
cyqsimon 28d947fd8b Use anyhow in build script 2023-11-02 17:54:57 +01:00
cyqsimon b000db8f32 Remove old completion generation code 2023-11-02 17:54:57 +01:00
cyqsimon 4b33093f9e Bump edition to 2021 (#2748) 2023-10-31 04:54:06 +01:00
cyqsimon 8e866babfc Write changelog 2023-06-01 13:25:02 +08:00