-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for versions after 0.29 #100
Conversation
If you are interested I already fixed this in my fork of this project. I don't think anyone is answering here anymore. I only started the fork because I wanted more stuff to be merged and added, but I'm determined to keep adding stuff and accepting merges for a long time. |
Looks nice @Numkil. You should talk to the maintainer of the Silver Search and get the README updated to point at your repository. |
Not sure if it's ready yet (mainly AgFile doens't work as it should yet) and I don't want to rule out the work done here. I will when I don't get any other responses here for the next month or so. Thanks btw, if you end up using it and encounter some bugs, do not hesitate to create an issue. I'm active daily on github. |
I'm around (maintainer), but sparse at the moment. I'll try to find some time in the coming weeks to clean up the PRs in this project. Thanks for your hard work! |
@losingkeys, That's great. I haven't made a pull request for the asynchronous feature because it triggered so many other small changes everywhere that's it is become a huge change. But if you take a look at it and decide You would like it in this official repository I will split it up in several smaller pull requests for you |
@epmatsw nice catch, and thanks for the pull! What do you think about changing the regex to Also I think there's another PR that introduces tests. This seems like a good candidate for that. I'll try to update this PR w/more info once I figure that out. |
That was my initial fix. However, that check incorrectly passes for 0.20.0. That may not be a big deal, but it's the reason I had the two separate conditions.
|
@epmatsw ahh, good catch. Thanks again for the work and the paitence 😄 |
Fix for versions after 0.29
I think, that more robust way would be to discard all older versions, because their format is already well-known, then trying to guess all possible future formats.
|
The regex used to check if the version is > 0.25 breaks for versions with format 0.AB.X where A > 2 and B < 5. This means that with the latest version of ag (0.30.0), the result formatting gets messed up.
The check is using [2-9][5-9] to check the middle number, so:
0.19.0 - fail
0.20.0 - fail
0.25.0 - pass
0.30.0 - fail (current version :()
0.31.0 - fail
0.35.0 - pass
0.40.0 - fail
The new regex is a little more complicated, but uses (2[5-9])|([3-9][0-9]).
0.19.0 - fail
0.20.0 - fail
0.25.0 - pass
0.30.0 - pass (current version :D)
0.31.0 - pass
0.35.0 - pass
0.40.0 - pass