appcache appcache appcache

17 views
Skip to first unread message

Shawn Brown

unread,
Aug 3, 2010, 6:23:44 PM8/3/10
to gwt-mobile-...@googlegroups.com
Hi,

Can I ask about appcache.

After defining and adding it to my project manifest, I compiled but
see three errors:

1)
Invoking Linker AppCache
Attempting to optimize JS
[ERROR] Failed to link
java.lang.Error: Unresolved compilation problem:
Type mismatch: cannot convert from Collection<EmittedArtifact> to
EmittedArtifact

at com.google.code.gwt.appcache.linker.IFrameAppCacheLinker.emitPermutationArtifacts(IFrameAppCacheLinker.java:208)
at com.google.code.gwt.appcache.linker.IFrameAppCacheLinker.link(IFrameAppCacheLinker.java:69)
at com.google.gwt.core.ext.linker.impl.StandardLinkerContext.invokeLink(StandardLinkerContext.java:408)
at com.google.gwt.dev.Link.doLink(Link.java:194)
at com.google.gwt.dev.Link.link(Link.java:151)
at com.google.gwt.dev.Compiler.run(Compiler.java:228)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:152)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:87)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:81)
at com.google.gwt.dev.Compiler.main(Compiler.java:159)

2-3)
Also, there are two more errors in rebindTypeByInheritedModule.
The method isApplicable(TreeLogger, StandardGeneratorContext, String)
in the type Rule is not applicable for the arguments (TreeLogger,
GeneratorContext, String)
I'm not sure whether to cast or change the method....


Anyway, what is the status of this project. I have my own linker
(primitive by your standards) to generate the manifest but as your
project points out -- maybe I am caching all the versions
unnecessarily. I'm not so clever and don't have an extensive but do
want to get this to work.

Shawn

Bart Guijt

unread,
Aug 4, 2010, 5:51:51 AM8/4/10
to gwt-mobile-...@googlegroups.com
Hi Shawn,

This project was conceived in the GWT 1.6 era - before the GWT.runAsync() forced a change in the Linkers. That's why you have compilation errors.

Beyond that, I couldn't achieve my goals of creating and attaching an application manifest to the host HTML page(s) due to lack of context, and a lot of guessing didn't work too well.

The upcoming GWT 2.1 release will make creating a manifest much simpler due to the Soft Permutations compiler option (see http://code.google.com/p/google-web-toolkit/wiki/SoftPermutations). By then I will re-visit this very important HTML5 feature :-)

Cheers!
Bart



--
You received this message because you are subscribed to the Google Groups "gwt-mobile-webkit-users" group.
To post to this group, send email to gwt-mobile-...@googlegroups.com.
To unsubscribe from this group, send email to gwt-mobile-webkit...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-mobile-webkit-users?hl=en.




--
Bart Guijt
GSM: 06-30408987


"ceterum censeo Apple regulam faciendam"

Shawn Brown

unread,
Aug 4, 2010, 6:08:52 PM8/4/10
to gwt-mobile-...@googlegroups.com
Hi Bart,

> Beyond that, I couldn't achieve my goals of creating and attaching an
> application manifest to the host HTML page(s) due to lack of context, and a
> lot of guessing didn't work too well.
>
> The upcoming GWT 2.1 release will make creating a manifest much simpler due
> to the Soft Permutations compiler option (see
> http://code.google.com/p/google-web-toolkit/wiki/SoftPermutations). By then
> I will re-visit this very important HTML5 feature :-)

SoftPermutations seem intended to reduce the number of permutations.
I can see how that might make knowing which permutation is for which
user agent but...

Can we identify which files are for which user agent now? The reports
generated by GWT know. You can see it using the -compileReport flag.

Since the incoming request for the manifest file tells us what it's
looking for, why can't we just serve an appropriate manifest depending
on which user agent and locale are being requested? Alls I need to do
is prepare one manifest for each permutation. Since GWT can do that
for reports, why can't we just do a similar thing in our linker.

Example:
"GET /myCache.manifest HTTP/1.1" 200 1120 - "Mozilla/5.0 (Linux; U;
Android 2.1-update1; en-us; HTC Magic Build/EPE54B) AppleWebKit/530.17
(KHTML, like Gecko) Version/4.0 Mobile Safari/530.17,gzip(gfe)"

So now in my servlet filter I can see this and return the English
version for Mozilla/5.0 which won't include all the files for the
other permutations for other user agents.

Why wouldn't this work? Is it that difficult in a linker to make a
list of which permutation is using which file. Honestly, I don't know
how to do that ... but you are much more knowledgeable and clever than
I so I'm kinda hoping you can give me a hint.

Seeing my android handset trying to download and cache (well that's
ok) 12 versions of my application and the retrieve it from cache
(which is really slow and painful) is just too much for my eyes. Well
actually only chrome dev tools shows me what is being download for the
cache, but I know my phone is going through the same thing.

Shawn

Bart Guijt

unread,
Aug 5, 2010, 2:53:11 AM8/5/10
to gwt-mobile-...@googlegroups.com

Shawn

--
You received this message because you are subscribed to the Google Groups "gwt-mobile-webkit-users" group.
To post to this group, send email to gwt-mobile-...@googlegroups.com.
To unsubscribe from this group, send email to gwt-mobile-webkit...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-mobile-webkit-users?hl=en.


Ah, I see your point. You want to figure out *server-side* what appcache manifest to serve depending on some permutation ID.

Well, that could actually work. The GWT Linker (the final step of the GWT compiler) knows about all resources to put on the filesystem as compilation result, and the permutations which are spit out along the ride.

Unfortunately I am *really* pressed for a project at a client right now, so I can't work on this until maybe September!

Shawn Brown

unread,
Aug 5, 2010, 4:26:56 AM8/5/10
to gwt-mobile-...@googlegroups.com
> Ah, I see your point. You want to figure out *server-side* what appcache
> manifest to serve depending on some permutation ID.

Exactly.

> Well, that could actually work. The GWT Linker (the final step of the GWT

> compiler) knows about ... the permutations which are spit out along the ride.

For the time being, I'll can just compile for my phone ...
<set-property name="user.agent" value="safari"/>
and limit the permutations I need to load. It'll be long after
September before it's usable anyway. I'm really slow ...

Thanks for your feedback. It really helped!

Shawn

Bart Guijt

unread,
Aug 5, 2010, 4:33:09 AM8/5/10
to gwt-mobile-...@googlegroups.com

You're welcome :-)
 

 
Shawn

Reply all
Reply to author
Forward
0 new messages