Skip to content

Commit b031759

Browse files
authored
Merge pull request #3 from mendelsshop/parser_based_history
moving to use Parser based history
2 parents 5c5d349 + 4ae2cbc commit b031759

File tree

6 files changed

+399
-349
lines changed

6 files changed

+399
-349
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# ![Custom badge](https://img.shields.io/endpoint?color=green&url=https%3A%2F%2Fraw.githubusercontent.com%2Fmendelsshop%2Fgit_function_history%2Fstats%2Floc.json) ![Custom badge](https://img.shields.io/endpoint?color=green&url=https%3A%2F%2Fraw.githubusercontent.com%2Fmendelsshop%2Fgit_function_history%2Fstats%2Fdownloads.json)
22

33
# git function history
4+
5+
Parser (main) vs Regex approach benchmarks:
6+
| approach| expensive| relative| date-range |
7+
| --- | --- | --- | --- |
8+
|regex| 313 second(s) | 22 second(s) | 8 second(s) |
9+
|parser| 22 second(s) | 21 second(s)| 1 second(s) |

git-function-history-lib/Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,5 @@ description = "show function history from git"
1010
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1111

1212
[dependencies]
13-
lazy_static = "1.4.0"
14-
fancy-regex = "0.10.0"
15-
regex = "1.6.0"
16-
chrono = "0.4"
13+
chrono = "0.4"
14+
ra_ap_syntax = "0.0.129"

git-function-history-lib/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,3 @@
66
Show the git history of a function or method.
77
Use the latest (beta) version by putting `"git_function_history" = { git = 'https://github.com/mendelsshop/git_function_history' }` in your cargo.toml under `[dependencies]` section.
88
Use the latest [crates.io](https://crates.io/crates/git_function_history) (also beta) by putting `git_function_history = "0.5.4"` in your cargo.toml under `[dependencies]` section.
9-
10-
## Todo/ideas
11-
12-
- [ ] for version 7.0: use [rust analyzer parser](https://crates.io/crates/ra_ap_syntax) or the like to parse the code and find the function/method definition etc. instead of using regexes.

0 commit comments

Comments
 (0)