Closed rafeca closed 5 years ago
uhm, appveyor
shows failures due to python2
not being available on they vms... Investigating
Ok, I've been able to build and use fuzzy-native
locally on a Windows machine, but I found two things:
npm install
on fuzzy-finder
does not generate the correct binary on windows
. I had to run apm install
to be able to generate the correct one (for electron).I think that both issues are related with the fact that the package is not prepared for electron v2.0.
I'm not sure if this is related to the issue that's happening on AppVeyor (I don't think so).
npm install
onfuzzy-finder
does not generate the correct binary onwindows
. I had to runapm install
to be able to generate the correct one (for electron).
This is expected; apm install
should always be used for installing Atom packages.
EDIT: Oh, and the python2
error is a red herring; the fallback is at C:\Python27\python.exe
, which works.
Try adding image: Visual Studio 2015
to appveyor.yml
This is expected; apm install should always be used for installing Atom packages.
Oh interesting, I still have to learn a lot about Atom 😅
Try adding image: Visual Studio 2015 to appveyor.yml
I'm gonna try, thanks!
Ok, that fixed the issue 😄
Now the remaining issue is the one caused by these lines: https://github.com/hansonw/fuzzy-native/blob/master/lib/main.js#L10-L11
Ok, using a fork that adds support for electron v2 we're able to run the tests (only that 2 of them fail 😅), I'm gonna try to reproduce the failures on my windows machine (on OSX all of them pass)
We're making progress!
Yay! AppVeyor builds are finally passing 😄 There was a test that didn't contain correct Windows paths and it didn't work well with the path transformations that the logic for fuzzy-native
does 😅
For some reason Travis builds get queued forever: https://travis-ci.org/atom/fuzzy-finder/builds/512728958?utm_source=github_status&utm_medium=notification ... I'll check back tomorrow
I've forked fuzzy-native
to https://github.com/atom/fuzzy-native and created a @atom/fuzzy-native
package with v0.7.0 that just contains the fix for electron v2.
It seems that npm
caching logic is not super smart and the package cannot be found yet from CI systems... I'll wait some time and retrigger the build.
I'll also set up a similar CI system that the original fuzzy-native
package has (again, I cannot do it now since Travis cannot find the new GitHub project yet)
Ok, after a few retries all tests passing, I'm proceeding to merge this PR 🙏
Description of the Change
This PR does two things:
useAlternateScoring
config option to convert it to an enum calledscoringSystems
(using the same default value as before).scoringSystem
calledfast
(🤷♂️) which usesfuzzy-native
to dramatically improve filtering times on large projects.Alternate Designs
A few other options have been considered:
nuclide-prebuilt-libs
package instead offuzzy-native
.fuzzy-native
filtering logic executed in a background thread.At the end, this solution is what IMHO gives more benefits and less tradeoffs per unit of effort 😅
For more information about benefits/tradeoffs, check out the discussion on the applicable issue.
Benefits
Drastically faster filtering for large projects, which are now usable.
native-fuzzy
For the benchmark I've configured
native-fuzzy
to use a single thread. When using 4 threads the time to filter improves by ~2-3X on large projects but stays almost the same for medium/small.Possible Drawbacks
Yet a new scoring system added. As a follow-up we may decided to remove the
standard
scoring system, which was superseeded by thealternate
one 3 years ago.Applicable Issues
https://github.com/atom/fuzzy-finder/issues/370