-
-
Notifications
You must be signed in to change notification settings - Fork 51
feat: add option for custom compare function #71
feat: add option for custom compare function #71
Conversation
Codecov Report
@@ Coverage Diff @@
## master #71 +/- ##
==========================================
- Coverage 58.13% 57.25% -0.89%
==========================================
Files 2 2
Lines 129 131 +2
Branches 20 20
==========================================
Hits 75 75
- Misses 46 48 +2
Partials 8 8
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #71 +/- ##
==========================================
- Coverage 57.81% 56.92% -0.89%
==========================================
Files 2 2
Lines 128 130 +2
Branches 20 20
==========================================
Hits 74 74
- Misses 46 48 +2
Partials 8 8
Continue to review full report at Codecov.
|
0c10211
to
4dcc600
Compare
/cc @mistic |
👍 |
4dcc600
to
a82b370
Compare
We have discovered why the mtime is unreliable in our environment: By default, some tools (like So, I've updated the default Once this PR is merged, I would be happy to create another PR that exposes a |
@lellimecnar I think removing the miliseconds part should not be the default, what happens if while developing there are 2 different changes to the same file within the same second? I think we should open 2 different PRs, one for simply provide a configurable compare function that receives 2 times and a second one to change the precision of the times passed to the compare function. The default should be the entire time with miliseconds too What do u think @evilebottnawi ? |
I can see that @mistic. I'll make that change, and start the other PR. |
a82b370
to
2429fb1
Compare
@mistic this PR has been updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I think we should add tests
@lellimecnar also can you solve the conflicts and merge with master please? |
It's not always reliable to use `mtime`, so allowing for a `compare` function to be passed makes it possible for custom logic to be used. (ie. hashing)
2429fb1
to
66f90c7
Compare
Closed as it will be merged through #71 with tests. |
It's not always reliable to use
mtime
, so allowing for acompare
function to be passed makes it possible for custom logic to be used. (ie. hashing)This PR contains a:
Motivation / Use-Case
In our CI environment, the
mtime
doesn't always match when it probably should, so we'd like to use something else (like file hashing). This is a simple update to expose acompare
option that can be used to provide custom logic.It's been mentioned before (#34 #41 #29)
Breaking Changes
No breaking changes
Additional Info
I started writing some tests, but I'm not sure how best to test this update...