Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

appcache manifests

45 views
Skip to first unread message

Fabrice Desré

unread,
Mar 28, 2012, 12:33:28 PM3/28/12
to Mozilla B2G mailing list
As part of the big migration to one domain per app and offline cache,
we made the manifests be generated by the gaia Makefile. This was for
two reasons:
1) They were improperly maintained
2) They are used by offline-cache.js to populate the cache.

I understand that some dislike the idea of generating these files from
the Makefile, and moreover having a 1 <-> 1 relationship between the
manifest.appcache and what we preload in the offline cache is not ideal.
We want all resources preloaded, but some should not be referenced by
default in the manifest: video samples, images, and fonts for instance.

So my proposal is as follows:
1) instead of generating manifest.appcache from the Makefile, generate
manifest.preload. Add these to .gitignore and update offline-cache.js to
use theses.
2) Prune manually the existing manifest.appcache to remove unwanted or
unnedded entries.
3) Be really careful when reviewing gaia code to update the manifests
when an app is in a new useful state and we want to push this change on
gaiamobile.org

Fabrice
--
Fabrice Desré
b2g Team
Mozilla Corporation

Timothy Chien

unread,
Mar 29, 2012, 7:02:29 AM3/29/12
to Fabrice Desré, Mozilla B2G mailing list
Your proposal looks reasonable.

May I suggest an idea to combat (3), that is to compare the actual file
lists with the manifest, and output some warning during the make
process. It's not bulletproof but it would be hard to ignore.

It could also add some checks for code committer to add some comment to
the manifest to states the reason of a specific file exclusion, and to
suppress the warning.

Policy-wise, we would also need to draft a principle on what kind of
files can/must/should be excluded in the manifest.


Tim

David Flanagan

unread,
Mar 29, 2012, 1:06:10 PM3/29/12
to dev...@lists.mozilla.org
On 3/28/12 9:33 AM, Fabrice Desré wrote:
> As part of the big migration to one domain per app and offline cache,
> we made the manifests be generated by the gaia Makefile. This was for
> two reasons:
> 1) They were improperly maintained
> 2) They are used by offline-cache.js to populate the cache.
>
> I understand that some dislike the idea of generating these files from
> the Makefile, and moreover having a 1 <-> 1 relationship between the
> manifest.appcache and what we preload in the offline cache is not
> ideal. We want all resources preloaded, but some should not be
> referenced by default in the manifest: video samples, images, and
> fonts for instance.
>
> So my proposal is as follows:
> 1) instead of generating manifest.appcache from the Makefile, generate
> manifest.preload. Add these to .gitignore and update offline-cache.js
> to use theses.
> 2) Prune manually the existing manifest.appcache to remove unwanted or
> unnedded entries.
> 3) Be really careful when reviewing gaia code to update the manifests
> when an app is in a new useful state and we want to push this change
> on gaiamobile.org
>
> Fabrice
As I see it, the problems with the current setup are:

1) the manifest.appcache generation is done by a very simple shell
script in the Makefile that doesn't know how to exclude files that are
not in the repo or that are listed in .gitignore.

2) the manifest.appcache files are fully automatic, but are also checked
in to the repo.

I'd suggest that the ideal solution would look like this:

1) We write a smart script (in python or node, maybe) for more
intelligently generating manifests. This script would include
hard-coded lines from manifest.appcache.in (by analogy to Makefile.in,
but we could call this something different). This allows apps to define
custom lines for their manifest, but does not require them to do anything.

2) manifest.appcache.in would be checked in to the repo, but the
generated manifests would not be: they would be generated automatically
when an app was being deployed to a web server or pre-installed in an
offline cache.

David
0 new messages