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