Closed Bug 1313502 Opened 8 years ago Closed 7 years ago

Deduplicate the Calendar files

Categories

(Calendar :: Build Config, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Paenglab, Assigned: Paenglab)

Details

Attachments

(1 file, 3 obsolete files)

Bug 1303184 errors now the builds when duplicated files exists. This bug is to deduplicate the Calendar files.
Attached patch unDupeCalendar.patch (obsolete) — — Splinter Review
This patch deduplicates all CSS and images through adding a LF or reordering the rules in Linux directory.

Images which are the same on platforms are moved to common.

The only duplicate calendar files remaining with this patch are

extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calFilter.js
extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome/calendar/content/calendar/calFilter.js
extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/calendar-js/calUtils.js
extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome/calendar/content/calendar/calUtils.js

Philip, do you have a solution how this files could be deduplicated?
Assignee: nobody → richard.marti
Status: NEW → ASSIGNED
Attachment #8805269 - Flags: review?(philipp)
I'd much prefer a solution that allows adding exceptions to whatever produces that error. calUtils is used both in content and in the backend, so it will be hard to get rid of this entirely without a lot of work.

I have some work in progress code that splits up calUtils and moves all functions from calUtils.js to calUtils.jsm or respective specialized modules, but this is not ready yet and will be quite a chunk of code.

I don't know about calFilter yet, it may be easier to remove either content or backend usage of that file.

It would also be nice to deduplicate the theme files in some other way, relying on switched lines is bound to shoot someone in the foot in the future. I don't have a good solution at the moment though.
(In reply to Philipp Kewisch [:Fallen] from comment #2)
> It would also be nice to deduplicate the theme files in some other way,
> relying on switched lines is bound to shoot someone in the foot in the
> future. I don't have a good solution at the moment though.

The problem is Linux and Windows are the same and OS X has different rules. If we had media queries for Linux or OS X then it would be possible to use only one file for all platforms.

So we have to look how we can add our duplicate files to ALLOWED_DUPES. But some changes of the patch in this bug can then still be used to reduce the duplicated files.
Attached patch unDupeCalendar.patch v2 (obsolete) — — Splinter Review
I leave with this patch the duplicated CSS files and treat only the images.
Attachment #8805269 - Attachment is obsolete: true
Attachment #8805269 - Flags: review?(philipp)
Attachment #8807272 - Flags: review?(philipp)
Attached patch unDupeCalendar.patch v3 (obsolete) — — Splinter Review
This one works better and removes all images from dupes list.

I'm asking for approval c-a when it can't land before merge. I'd like to have it in 5.4 to have it easier for future changes if backporting is needed.
Attachment #8807272 - Attachment is obsolete: true
Attachment #8807272 - Flags: review?(philipp)
Attachment #8810161 - Flags: review?(philipp)
Attachment #8810161 - Flags: approval-calendar-aurora?(philipp)
Attached patch unDupeCalendar.patch v4 — — Splinter Review
This patch moves all image files to common except calendar-occurrence-prompt.png. This file is used on Linux and XP. Because XP will be removed and we can then remove the XP file, I decided to optimize on Linux to undupe it.

If this patch gets approval‑calendar‑aurora I need to create a special patch for allowed-dupes.mn because the packaging of calendar is different.
Attachment #8810161 - Attachment is obsolete: true
Attachment #8810161 - Flags: review?(philipp)
Attachment #8810161 - Flags: approval-calendar-aurora?(philipp)
Attachment #8812580 - Flags: review?(philipp)
Attachment #8812580 - Flags: approval-calendar-aurora?(philipp)
Attachment #8812580 - Flags: review?(philipp)
Attachment #8812580 - Flags: review+
Attachment #8812580 - Flags: approval-calendar-aurora?(philipp)
Attachment #8812580 - Flags: approval-calendar-aurora+
https://hg.mozilla.org/comm-central/rev/d43b66230d14c4d52bb4ea2946e49d957b8b5c35
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → 5.5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: