Closed Bug 1606284 Opened 3 months ago Closed 3 months ago

Remove the Mork address book code, leaving only enough to migrate existing address books

Categories

(MailNews Core :: Address Book, task)

task
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 73.0

People

(Reporter: darktrojan, Assigned: darktrojan)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

There's a lot of effectively dead code in the address book now. It's still possible to create a Mork address book but it will not survive the next program start-up without being migrated. This bug is about removing the dead code, leaving only the parts needed for migration.

Blocks: 1606285

Part 1/3: Remove nsAbMDBDirectory and friends. Some of these changes get destroyed in a later part anyway, but I did this in a way that each of these parts could land separately.

Attachment #9118015 - Flags: review?(mkmelin+mozilla)

Part 2/3: Remove the database announcer/listener. This is unused since we're making the database read-only.

Attachment #9118016 - Flags: review?(mkmelin+mozilla)

Part 3/3: Make the database read-only. There's some weirdness here with Mork being in a funny state at clean-up time and failing an assertion. (Seems like a bug in Mork – now there's a surprise!) I've left behind the minimum code needed to prevent that.

Attachment #9118017 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9118015 [details] [diff] [review]
1606284-part1-remove-mdb-provider-1.diff

Review of attachment 9118015 [details] [diff] [review]:
-----------------------------------------------------------------

::: mailnews/addrbook/test/unit/test_uid.js
@@ -1,2 @@
> -/*
> - * Test to check that pre-existing cards are given a UID,

Hmm, should all of this file go?
Attachment #9118015 - Flags: review?(mkmelin+mozilla) → review+
Attachment #9118016 - Flags: review?(mkmelin+mozilla) → review+
Attachment #9118017 - Flags: review?(mkmelin+mozilla) → review+

(In reply to Magnus Melin [:mkmelin] from comment #4)

Hmm, should all of this file go?

Well, it was specific to Mork as it dealt with updating old contacts to ensure they are given UIDs. Everything still relevant is tested elsewhere, except creating a new contact with a specific UID. I'll move that into test_jsaddrbook.js.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/63c80dbc24de
Remove the Mork address book provider; r=mkmelin
https://hg.mozilla.org/comm-central/rev/20abf751b302
Remove nsIAddrDBAnnouncer and nsIAddrDBListener; r=mkmelin
https://hg.mozilla.org/comm-central/rev/5a245657c149
Remove non-needed parts of nsAddrDatabase, making it read-only; r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 73.0

[task 2019-12-31T12:24:24.534Z] 12:24:24 INFO - z:/build/build/src/comm/mailnews/addrbook/src/nsAddrDatabase.cpp(763,31): error: function declared 'stdcall' here was previously declared without calling convention
[task 2019-12-31T12:24:24.534Z] 12:24:24 INFO - NS_IMETHODIMP nsAddrDatabase::InitCardFromRow(nsIAbCard *newCard,
[task 2019-12-31T12:24:24.534Z] 12:24:24 INFO - ^
[task 2019-12-31T12:24:24.534Z] 12:24:24 INFO - z:/build/build/src/comm/mailnews/addrbook/src/nsAddrDatabase.h(79,12): note: previous declaration is here
[task 2019-12-31T12:24:24.535Z] 12:24:24 INFO - nsresult InitCardFromRow(nsIAbCard *aNewCard, nsIMdbRow *aCardRow);
[task 2019-12-31T12:24:24.535Z] 12:24:24 INFO - ^
[task 2019-12-31T12:24:24.535Z] 12:24:24 INFO - 1 error generated.

Looks like you need to remove nsresult InitCardFromRow(nsIAbCard *aNewCard, nsIMdbRow *aCardRow); from the include file.

EDIT: No, the other way around, fix the type in the C++ file.

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/b46422dd28c4
Follow-up: Fix type of InitCardFromRow(). r=me DONTBUILD
You need to log in before you can comment on or make changes to this bug.