-
Notifications
You must be signed in to change notification settings - Fork 289
Cleanup QSCatalogEntry API. #1601
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
Conversation
|
Grrr. I made a bunch of comments on various commits, but apparently GitHub.app links to the commit under my fork where no one will ever see it. I'll try to find a recreate them here. |
|
@skurfer: I think it's better if you comment on the PR's diff ("Files changed" at the top) directly instead of individual commits. That makes it possible for me to "hide" your comment if I change the diff in some way, which is pretty nice for reviews. |
|
Also, I saw your original comments emails — though I'm not sure how, maybe they're attached to commit ids and thus are global. |
|
Comments salvaged. But please oh please don't do it again ;-). |
In retrospect, that's what I should have done. There were also a couple of things I almost commented on that were fixed in later commits. |
|
Yeah, but I just remembered that diff-comments aren't really compatible with force-pushes and rebases, so you have to be careful... |
|
After messing with 10.9 a bit last night, I rebooted and most of my catalog hadn't populated. I hit I see this in the console every 10 minutes, and every time I hit So it looks like something is getting wedged. I cleared caches and restarted and the scan finished fine, plus |
|
I actually noticed the bug you've saw while running it. I think this now works better — though it still deadlock in unexpected places, but I didn't do anything explicit to fix it, so YMMV. |
|
Can this be rebased? What's already been merged into master :/ |
|
I'm LOVING how 'modern' and 'hip' QSCatalogEntry is looking :) Awesome work Etienne. |
|
Yeah, looks so much better that before. At least now there's a clear separation between what's public and what's private. Please note that this is unfinished and not yet ready for merging, but I'll gladly bring over changes from master from time-to-time (because I'm gonna need some other stuff in other PR ;-)).
Yeah, I got myself wondering at what it's trying to really do. It's not the only place where I see that, but I think it's because there's a nil => default => something expectation, like catalog sources are enabled by default, unless explicitly disabled by the user. One of the things I'm currently contemplating is the scanQueue "problem". I'm not really fond of the "one-queue-per-entry" approach, but maybe I can keep it that way until I've cleaned up enough of QSLibrarian and QSCatalogEntry so that it's clear which is responsible for what... Right now, I have a tendency to think of QSCatalogEntries as repositories of objects generated by QSObjectSources on behalf of a request by QSLibrarian, but it just goes through loops in order to achieve that (and I gather that any us us that had to look at the threading bugs before we scan-queued the hell out of it can testify that following async code littered between two files and a handful of methods is a brain-twisting experiment ;-))... I'm more-or-less planning to only keep the index stuff and the object repository part in there, the whole scan process will get moved to QSLibrarian, with maybe a few convenience methods for easy "scan yourself, catalog entry !" fun ;-). Also, that's doesn't really belong here — at least until I start rewriting QSLibrarian — but should I try and make preset entries user-editable ? I don't think it's that hard, in fact I'm pretty sure I've spotted some commented out code that used to handle that... |
|
Is there any way we can merge a minimal amount of this into master so that we can merge #1614?
I remember when I implemented the one queue business, you wanted to use dispatch_barriers, but they were 10.7+ only. Now we've dropped 10.6 I guess we could go down that route... :)
The way things have been for a long time is that you have to duplicate them. Although I agree that this has been somewhat confusing for lots of users. I tried to rectify it recently by disabling all the editable views in the preset (#1341) |
|
Can one of the admins verify this patch? |
|
I'm working on it while keeping the IRC channel warm, in case one of you guys are around ;-). |
|
Ok to test ? |
|
Severely edited Okay, looks good to me. I tested by Anything else that looks wrong to you ? Else feel free to merge that one, then merge #1614. I'll write some appledocs so when #1614 gets merged we'll have something pretty to see ;-). |
|
Okay, here's documentation. I actually caught some weird things (mostly calling Additionally, if you wanna take a look, I pushed an catalog-appledoc branch which merges #1614 with this one so you can take a look at the docs (though I imagine you could also read the .h file, but it's less poignant ;-)). Now I'm not fond of the automatic linking |
|
I found one small problem. If you disable a preset, it’s re-enabled after a relaunch. Changes to custom entries appear to get saved correctly. Haven’t had time to dig further. |
|
Note that #1688 was merged, so if you want to handle it a different way, you’ll need to rebase. Actually, that’s probably why this is conflicting now. Whatever you do, just try not to make a liar out of me in the section I just added to the plug-in docs. 😃 Update: I also wanted to mention that I have a feeling I should have done it the other way around. That is, have requests for |
|
Heh, let's do some brainstorm since
Since you might have more experience with the plugins side-of things than me, would that be sufficient to cover all the use cases ? And I'll provide those methods you've added in the meantime. Who likes perjury anyways ;-). |
Well, there are three things I fixed in #1688:
If QSLib was exclusively responsible for knowing what’s disabled, we could re-implement the first item another way, but for the other two, wouldn’t it make more sense for the entry itself to be aware of what’s enabled/disabled?
OK, that could be used by the entry to get information about itself and handle the latter two fixes, but that wouldn’t be very obvious. Are you wanting to do it this way because the list of disabled objects is global and not technically part of a specific entry?
Since we’re mostly talking about what to do after the fact with whatever the plug-in returns (from Plug-in authors do need to be aware of, and respect user-disabled objects when populating children, third pane, etc. but that’s nothing new. It’s just something we’ve been overlooking until now. That’s what I recently documented. Speaking of…
No need to keep the same methods ( Like I said, maybe it makes more sense to have |
|
ok to test |
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.
This should return the same value as canBeIndexed, right? Or maybe we don’t even need shouldIndex. It’s only used by the NIB (under Attributes), but that could be updated to point directly to canBeIndexed.
|
On the subject of the NIB… If the |
|
One other thing to fix here: I just tried using the |
Also adds a @synchronized.
I'm not sure how it behaves with the recursion though...
Because *somehow* some observation info would end up attached at the wrong object.
2fe456a to
a1c23d6
Compare
a1c23d6 to
11f17df
Compare
|
Rebased. I think I handled most things we talked about, except :
|
|
I merged this into a copy of
|
Please note this depends on #1585, because I've needed the warning count to be low (so you'll actually see both in the diff until the other gets merged).
I got started on that because I tried to run the old
appledocbranch I got here, which raised an exception because of the_contents/contentsgetter not having the right name, and when I saw_contents/contents+ the property I just triggered cleanup mode.I still have a bunch of things to fix (since I've added some warnings), but for now I'll wait on the various other branches getting merged...