Page MenuHomePhabricator

eio: add method for determining if a monitor is using the fallback mechanism
ClosedPublic

Authored by zmike on Jun 26 2018, 3:32 PM.

Details

Summary

the fallback method of calling stat() on the monitored paths does not allow
for various eio events to be emitted, meaning that any application which relies
on those events can never receive them

this provides a method for checking a monitor to determine which functionality
is available, and also provides more explicit documentation regarding events
that are not provided by fallback monitoring

this method is marked as beta

@feature

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zmike created this revision.Jun 26 2018, 3:32 PM
zmike requested review of this revision.Jun 26 2018, 3:32 PM
ManMower accepted this revision.Jun 27 2018, 10:28 AM

Ouch! I can't see any way to resolve this without adding the new API.

This revision is now accepted and ready to land.Jun 27 2018, 10:28 AM

I am completly fine with this in general, however, could we keep this API as beta or something like this ?

Having a API showing internals like fallback backends is somehow not ideal in my mind ... :)

stephenmhouston accepted this revision.EditedJun 28 2018, 7:17 AM

This looks good to me and I think is a necessary evil to add API. We can consider @bu5hm4n proposal to mark the API as beta... but... it is an api that legacy itself needs and if this could potentially be the last stable release for legacy (who knows how we decide to move forward with the efl branch once interfaces are stable)... then the api does not need to be beta in its last stable release. We could subsequently follow up a 1.21 where it is beta with a 1.21.1 where it isn't, but to plan on that seems like a lot of work for a necessary api, a trivial fix that works and tests fine, and is somewhat of a corner case.

I think that's a really good point... I suppose what would make more sense is querying for the missing capabilities?
How many apps would even do that, though?

Can this be beta API for now with a proper fix to come in the next release? It's an ugly problem - we want the tests to be thorough, but we don't want to make any long term API promises at this point...

@ManMower yes exactly thats what i was thinking about :)

zmike requested review of this revision.Jun 28 2018, 8:04 AM
zmike updated this revision to Diff 15345.Jun 28 2018, 8:05 AM
zmike edited the summary of this revision. (Show Details)
bu5hm4n accepted this revision.Jun 28 2018, 8:13 AM
This revision is now accepted and ready to land.Jun 28 2018, 8:13 AM
zmike added a comment.Jun 28 2018, 8:33 AM

Hold up, I'm getting a crash now...

bu5hm4n updated this revision to Diff 15350.EditedJun 28 2018, 8:59 AM
bu5hm4n edited the summary of this revision. (Show Details)

This fixes the crash

Closed by commit rEFL7ed4b407e7ee: eio: add method for determining if a monitor is using the fallback mechanism (authored by zmike, committed by Marcel Hollerbach <mail@marcel-hollerbach.de>). · Explain WhyJun 28 2018, 9:12 AM
This revision was automatically updated to reflect the committed changes.