Commit Graph
70 Commits
Author SHA1 Message Date
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
cyqsimon f8c700027e Add os-release syntax mapping 2023-06-01 13:17:22 +08:00
cyqsimon b6b9d3a629 Disable completion of cache subcommand (#2399)
* Disable completion of `cache` subcommand

* Fully removed completion code for `cache`

* Add to changelog
2022-12-18 11:46:43 +01:00
cyqsimon 3ae05333b0 Add mapping for Unix mail spool (#2156) 2022-04-27 22:51:10 +02:00
cyqsimonandMartin Nordholts 14ddda0a8b Recognize files in $XDG_CONFIG_HOME/git/ and $HOME/.config/git/ better (#2067)
* git global config - lookup $XDG_CONFIG_HOME faithfully

* Use `bool::then`

* Cover both `$XDG_CONFIG_HOME` & `$HOME/.config`

* Remove unused import

* Global git config tests

* Added trailing newline

* Fix git config test

* Wrote to changelog

* Revert change of `Result::ok` to `Result::unwrap`

* Apply suggestions from code review

Co-authored-by: Martin Nordholts <enselic@gmail.com>

* Guard against empty `$HOME`

Co-authored-by: Martin Nordholts <enselic@gmail.com>
2022-02-26 17:01:00 +01:00
cyqsimon b60225051d Add empty rustfmt to enfore default formatter settings 2022-02-10 07:01:31 +01:00