Re: Type Corruption migrating from GWT 2.6.1 => 2.7.0

2017-07-06 Thread bobbitdiddle
OK, it looks like we have two "apps" each with its own entry point, but 
they share the content of $wnd, which contains a JS Framework.  So the 
problem is that JS calls can enter either "app" and each "app" appears to 
be have it's own frame (So $wnd.frames is an array of two windows.)

As mentioned, the problem is that because because both "apps" are plugged 
into the JS Framework, one might see a GWT object created by the other, but 
type comparison of objects created in one "app" fails in the other.  This 
worked in SGWT 2.6.1, but doesn't in GWT 2.7.0.

Does that provide enough detail to answer the question?  Has handling of 
multiple apps (or "entry points") for a single browser window changed in 
GWT 2.7.0, specifically with respect to type comparison?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Type Corruption migrating from GWT 2.6.1 => 2.7.0

2017-07-05 Thread bobbitdiddle
It definitely appears to be the case that having multiple GWT window 
objects (as frames) is playing a role in the problem.  The main window has 
two frames, and some GWT JSNI runs inside each of the two frames.  When 
JSNI in one frame calls the other, the type information on the passed 
objects either is lost, or becomes inaccessible.  So type comparisons 
across the window barrier don't work - even for JavaScriptObject.

I'm not sure how the second window for GWT is created.  We have some JS 
that runs by being called from the GWT onModuleLoad() entry point, but 
other JS on the main page is triggered by scheduled timers.  We aren't 
intentionally using iframes or creating any other window objects ourselves.

Does the new linker for GWT 2.7.0 handle this situation differently?  Is 
the object inequality across the window barrier something GWT is doing, or 
something that is done by the browser?  If the browser, why isn't it a 
problem in GWT 2.6.1?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Type Corruption migrating from GWT 2.6.1 => 2.7.0

2017-07-05 Thread bobbitdiddle
We have a huge Framework so that may not be an easy task - but I'll see if 
I can get a standalone case.

Within the stack frame I was investigating, I noticed that the window 
object seemed to change across frames, so perhaps the $entry() arguments 
were stripped of some of their properties (or they got cloned) due to 
security restrictions.  However, I'm not sure why switching to GWT 2.7.0 
would've hit such security restrictions - I would have assumed that would 
depend on the browser version.

On Wednesday, July 5, 2017 at 4:32:19 PM UTC-5, Thomas Broyer wrote:
>
> Could you post a snippet reproducing the issue?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Type Corruption migrating from GWT 2.6.1 => 2.7.0

2017-07-05 Thread bobbitdiddle
We're seeing an issue in GWT 2.7.0 where if a Java Object is passed to a JS 
method that's wrapped with $entry(), then the type information is stripped 
off.  

So for example, if a LinkedMap instance is created, and passed through an 
API wrapped with $entry(), it's typeMarker$ attribute will be changed from 
a known function to a copy of that function, so that hasTypeMarker() 
returns false, and thus isJavaScriptObject() returns true - but ti's not a 
JavaScriptObject, it's a LinkedMap!

function isJavaScriptObject_0_g$(src_0_g$){
>   $clinit_Cast_0_g$();
>   return !isJavaString_0_g$(src_0_g$) && !hasTypeMarker_0_g$(src_0_g$);
> }
>
> function hasTypeMarker_0_g$(o_0_g$){
>   $clinit_Util_0_g$();
>   return o_0_g$.typeMarker$ === typeMarkerFn_0_g$;
> }
>

This worked as expected in GWT 2.6.1, but obviously not in GWT 2.7.0.  In 
the release notes for GWT 2.8.0 (RC1) here 
, I see 
this item:

"Fix instanceof for primitives & string."

but I'm not exactly sure what that is - it sounds like it may be related.  
I took a look at closed issues on Github for GWT, but I wasn't able to 
isolate any issue corresponding to that, or matching the problem I 
described.



Anyone know what might be causing the issue above?


-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


How to contact www.gwtproject.org Website?

2017-07-04 Thread bobbitdiddle
I looked all over that website, but either there's no contact option or 
it's hidden very well.  How do I send feedback about a problem with the 
website?

I noticed that they provide SHA1 sums for the GWT downloads, but that's 
strange because Google itself reported that SHA1 is vulnerable
https://fossbytes.com/google-broke-sha-1-encryption-hash/
https://arstechnica.com/security/2012/10/sha1-crypto-algorithm-could-fall-by-2018/
 


GWT, as well as everyone else on the web, should be using SHA256/512, not 
SHA1.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


How to determine whether you're in SuperDevMode inside (custom) linker code

2017-06-10 Thread bobbitdiddle
Inside the linker code, I can only use com.google.gwt.core.shared.GWT, so I 
can't call APIs such as GWT.getModuleBaseForStaticFiles() or 
GWT.getModuleBaseURL() (which people have used to detect SDM) and while 
GWT.create() is doc'd in com.google.gwt.core.shared.GWT, it doesn't work 
and throws a runtime exception saying I can only use in "client code" 
(which I guess excludes the linker).  So the trick involving the 
superdevmode property and deferred binding also doesn't work.

So how can I detected SDM inside the linker?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Missing Custom Linker Output Files when using GWT Eclipse Plugin

2017-05-22 Thread bobbitdiddle
I guess I didn't ask the right question.  What I really want to do is emit 
a resource from my custom linker that gets written into the "real" war 
directory that the browser is targeting - so that you don't need an 
http://localhost:9876/...  URL to retrieve it.  Is that possible?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Missing Custom Linker Output Files when using GWT Eclipse Plugin

2017-05-22 Thread bobbitdiddle
Is my issue the same as Vitaly's in this thread 

?

So I just "need to use GWT.getModuleBaseForStaticFiles() instead of 
GWT.getModuleBaseURL()."?

I'm actually not using either API right now.  I'm just creating a new 
artifact with AbstractLinker.emitString() 
,
 
supplying a file name only (e.g. foo.js) as the partialPath argument.  I 
then add that new artifact to a copy of the ArtifactSet passed into my 
custom linker's link() method, and that ArtifactSet is returned as the 
result of link().

As in the other thread, my new artifact shows up in the war/ 
directory during a command-line build of the GWT project, but not when 
running SDM mode in Eclipse.  (I can get to show up by running Classic Dev 
Mode in Eclipse because it also runs the custom linker, apparently without 
the "fake" SDM server.)

(GWT 2.7.0)

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Condition definition of property

2017-01-04 Thread bobbitdiddle
I've set up deferred binding to use a different class with SDM, which works 
fine for GWT 2.6+  






However, this causes an error with GWT 2.5.1, because "superdevmode" isn't 
defined.  So I have the following questions:

   - Is there a clause similar to  but that tolerates the 
   property being undefined?  something like ?
   - I can work around this manually by adding  at the top of my module.  However, I 
   don't want to have to do this manually.  Can this be done conditionally?  
   The  syntax allows for a  clause, but for 
   some reason that's not legal for 
   - Instead of trying to look for the potentially undefined property 
   "superdevmode", is the GWT version defined in some property inside the 
   .gwt.xml module?  Is there a gwt.version property?  Is there any way to 
   automatically get the GWT version into a property that I could then use as 
   above to control deferred binding?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Missing Custom Linker Output Files when using GWT Eclipse Plugin

2016-11-16 Thread bobbitdiddle
When using the GWT 2.7 Eclipse Plugin and a custom linker, if I create a 
new artifact, foo.js, inside the linker, it doesn't show up when I try to 
load it from the main web page of my application.  I need to create this 
file to dynamically load certain script files.  I already observed that the 
.nocache.js that's served to the browser is different from the one 
that I actually emit in the linker - so this is an attempt to work around 
that.

Is this a known limitation, that any files you create are just thrown away 
and not served back to the application?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Bogus warnings from GWT-2.8 Beta

2016-02-25 Thread bobbitdiddle
If we define a class Foo in GWT with a JSNI method:

 private native void logStuff() /*-{
$wnd.myLog("This object has class" + 
th...@java.lang.Object::getClass()());
 }-*/;

then we getting a spurious warning:

[WARN] JSNI method Foo.logStuff()V calls method 
> java.lang.Object.getClass()Ljava/lang/Class;. Instance java.lang.Object 
> methods should not be called on String, Array or JSO instances.
>

In this case, "this" is an object of type Foo, not a String, Array, or JSO 
instance.  Why can't I treat it as an Object?  (Actually, why can't I treat 
a String and Array as Objects, since that's what they are, while we're at 
it?) 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Download link for GWT 2.8 SNAPSHOT SDK?

2015-08-06 Thread bobbitdiddle
I'm using GWT via ant on the command-line, not Eclipse.  I guess building 
it from the GitHub source is the simplest route.

On Thursday, August 6, 2015 at 1:32:05 PM UTC-5, Jens wrote:
>
> GWT only publishes SNAPSHOT Maven artifacts. If you want a full SDK then 
> you have to build it yourself. 
>
> If you want a SDK so you can add it to Eclipse then it might also work to 
> download the individual jars from Maven and put them into the same folder. 
> Then you should be able to add that folder as GWT SDK into Eclipse.
>
>
> https://oss.sonatype.org/content/repositories/google-snapshots/com/google/gwt/
>
> -- J.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Download link for GWT 2.8 SNAPSHOT SDK?

2015-08-06 Thread bobbitdiddle
My Google-Fu must be weak, but I can't seem to find a download link for GWT 
2.8 SNAPSHOT (I know this is a pre release build).  So the file I'm looking 
for will likely be named gwt-2.8.0-SNAPSHOT.zip.  I was able to find the 
released SDKs, the GWT GitHub Repository, and some links to maven-related 
files.  However, I'm not using maven and don't want to build from GitHub 
source.  (The "released" files on GitHub are only for GWT 2.7 and earlier.)

Anyone have a link so I can download the SDK?  Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Problems Remote Debugging with SourceMaps in SuperDevMode

2015-07-01 Thread bobbitdiddle
Looking over on GitHub for existing issues, I saw that someone else 
reported an issue with DNS resolution.  With that in mind, I modified by 
client machine's host file to include a binding for the fully qualified 
name of my host machine, and when I reloaded hte page, source maps were 
there!

This is even though (or because?) I was accessing the server page via IP 
address rather than name.  it never crossed my mind that anything on the 
client would resolve that address to a name, but then fail when trying to 
reverse it back to an IP address.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Problems Remote Debugging with SourceMaps in SuperDevMode

2015-07-01 Thread bobbitdiddle
Using Chrome, I've got SDM working locally - reloading the page trips the 
CodeServer I have running in Eclipse, and the sourcemaps are accessible in 
Chrome via 127.0.0.1:9876 in the sources tab.

However, I wanted to try access from another machine.  So I made the 
changes to my setup that are mentioned on the web:

   - I added "-bindAddress 0.0.0.0" to the SuperDevMode launch program 
   arguments.
   - I added http://.*"; /> to the GWT Project and rebuilt it
   - I tried opening http://application-server:port/?superdevmode=ip:port 
   rather than simply http://application-server:port (though this one didn't 
   seem to make a difference)

With the above approach, I am able to run the CodeServer remotely.  I see 
CodeServer run in Eclipse on the host machine, and the page loads on the 
client machine and appears to work fine.  *However, there are no sourcemaps 
available in Chrome on the remote machine (or any other browser).  *I tried 
disabling the firewall with no change.


Host machine: OpenSUSE 13.1, Chrome 43.0.2357.65
Client machine Windows 7 SP1 x64, 43.0.2357.130

Can anyone else confirm this is broken?  If so I will file an issue on 
GitHub.

(Note: I am planning to post a separate thread regarding SDM not working 
locally in Firefox, so please limit discussion here to remote access 
issues.)





-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to rescue Classic Dev Mode?

2015-06-22 Thread bobbitdiddle
The GWT team might want to survey existing users of their product before 
breaking backcompat.  A normal company wants to keep customers happy, and 
provide updates that don't break existing code bases.  However, I suppose a 
company with a huge market share and endless resources can act with 
impunity and disregard what customers want.

On Monday, June 22, 2015 at 3:54:53 PM UTC-5, Wesley.JUNG wrote:
>
> I'd like to see completely renovated GWT 3.0, even some other name rather 
> than GWT will welcome.
> Whoever want to use current Widget library better stay at GWT 2.8..
>
> On Sunday, June 21, 2015 at 12:38:13 PM UTC-4, Lukas Glowania wrote:
>>
>> Hi,
>>
>> like many people i think Super Dev Mode is quite a pain. Of course SDM 
>> and its IDE support is getting better and better, but i guess it will 
>> always feel workaroundish compared to Dev Mode.
>>
>> So what could be done to make modern Browsers work with Dev Mode? Dev 
>> Mode works with NPAPI, that was removed from Chrome and Firefox. Would it 
>> be possible to change the NPAPI dependence to an alternative e.g. 
>> communication through WebSockets like in SDM? What are the options? Or are 
>> there compelling reasons to not even try that?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to rescue Classic Dev Mode?

2015-06-22 Thread bobbitdiddle
On Monday, June 22, 2015 at 6:19:27 AM UTC-5, Jens wrote:
>
> Say WHAT!?  JSNI is going to be removed!?  They realize that's going to 
>> break a bunch of existing code, right? 
>>
>
> It only breaks if you upgrade to GWT 3.0 and GWT 3.0 is expected to be a 
> very breaking upgrade. So a lot of code will simply stay at GWT 2.8.
>
> -- J.
>

That seems like a strange policy.  Microsoft always provides backward 
compatibility when releasing a new version of Windows, and you don't expect 
existing Linux software to break when you upgrade.  Browser upgrades that 
bump JS/ECMAScript versions typically  preserve existing behavior as well.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: How to rescue Classic Dev Mode?

2015-06-22 Thread bobbitdiddle
On Sunday, June 21, 2015 at 3:20:51 PM UTC-5, Thomas Broyer wrote:

>
> On Sunday, June 21, 2015 at 9:35:35 PM UTC+2, Lukas Glowania wrote:
>>
>> Which announcements in particular would make it to a dead end?
>>
>
> The new compiler, JSNI (removed) vs. JsInterop (doesn't work in DevMode). 
> That would require rewriting a whole lot of DevMode for GWT 3.0.
>

Say WHAT!?  JSNI is going to be removed!?  They realize that's going to 
break a bunch of existing code, right? 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT 2.7.0 Custom Linker Problem - .nocache.js Artifact content mismatches file

2015-06-15 Thread bobbitdiddle
To solve an issue with our particular use of GWT, we implement our own 
"post" Linker for GWT.  This post linker appends a block of JS code to the 
end of .nocache.js, by detecting the nocache.js file when it's 
passed to the link() command in the ArtifactSet, and replacing it with a 
new Artifact that's actually the original Artifact with our code appended.  
This works fine in production mode, and our appended code shows up in 
.nocache.js in the file system.

However, when Eclipse is used to run the server on port  with GWT 2.7.0 
in SuperDevMode, all heck breaks loose:  Our post linker still sees the 
original content in the .nocache.js file (i.e., the same content we 
see for production mode).  However*, this content is not then present in 
the .nocache.js file in the file system. * Instead, that file 
contains totally different content.  In particular, there's a comment:



*** * This startup script is used when we run superdevmode from an app 
server. */*

Needless to say, since the linker is not ever served this content in any 
Artifact, we can't append anything to it.  So the questions arise:

   - Why are the post-linkers fed misleading content for the 
   .nocache.js file Artifact that doesn't represent what will be the 
   file system content of that file?
   - Is there any way to gain access to the Artifact that *actually 
   contains* the "fake" app server JS code that is written into 
   .nocache.js so it can be modified?
   - How do I control the order of my post linker within the set of other 
   post linkers?  I set it as a post linker with a pragma, but say I want it 
   to be the* last* post linker?

If there is some alternate means to hook loading of .nocache.js, 
that would also work for our application, as long as it's synchronously 
executed (as is JS code appended to .nocache.js).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Avoiding Copying "Public Artifacts" during every Incremental Recompile in SuperDevMode

2015-05-26 Thread bobbitdiddle
If you have a GWT Module with public artifacts specified,  then for every 
Java tweak, the incremental recompile in SDM will recopy ALL of the public 
artifacts (typically from a JAR to an output directory).  This seems to run 
after the last linker:

 Invoking Linker RPC log linker
 Invoking Linker Export CompilationResult symbol maps
 Invoking Linker Emit compile report artifacts
 Linking Public artifacts into 
/tmp/gwt-codeserver-6638507619440723950.tmp/com.test.HelloWorld/compile-2/war
   Emitting resource 08154E1BC13667F9667D8C3CC28891C3.cache.js
   Emitting resource clear.cache.gif
   Emitting resource compilation-mappings.txt
   :
(thousands of files)

I'm aware of a PrecompressLinker that can be inherited, but that actually 
may make things worse.  In this situation the server is local, so I don't 
care about optimizing files for the web server or transmission during 
browsing - I want to avoid the copying overhead during the incremental 
recompile.

Is there any solution to this built in to GWT?  Some linker setting?  The 
only option I see is for me to zip up the artifacts myself before the 
dependency jar is created, and then add a post-linker to unzip the files 
(only if the jar date has changed let's say).  I'm not sure however if I 
can get a linker to run after the "linking public artifacts" stage.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Module Inheritance and path excludes

2015-01-16 Thread bobbitdiddle
Just as the "excludes" seems to be too powerful and exclude the files 
*everywhere*, regardless of the inheritance topology, the "skips" seems to 
be* too weak*.  In my tests, if I convert the *Excluder* Module to use 
skips, it appears to do *nothing* when included by Module *B* as I 
described above - the resources are still there in the WAR.  Note that in 
my design, Module *A* picks up the resources via a dependency on Module* 
ImageResources*, where* A* and* ImageResources* may not even have the same 
(Java) package/path.  I then want to define Module* B* as inheriting* A* 
and *Excluder*, and have *Excluder* exclude those resources. Using "skips" 
this fails - *Excluder* does nothing.

What I need is a way to delete file resources from a module that were 
picked up by it inheriting another module, without losing the capability to 
have a third module add them back after inheriting the first.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Module Inheritance and path excludes

2015-01-16 Thread bobbitdiddle
Suppose we define a GWT Module *ImageResources* that includes certain 
resources in its default public directory, and then we define a Module 
*Excluder* that specifically excludes those resources via something like:





Then we can define a Module* A* that includes the resources via:


  :
   (stuff)
  :



and another Module *B* that's just like *A* except it excludes those same 
resources via:






That is, in the WAR file created by GWT compile for Module *B*, the files 
under imageResources will be missing.  (This works.)

--

Now the problem.  I want to allow a Module* C* to be defined as such:






but it doesn't appear to work.  That is, although *B* is derived from *A* 
by removing certain resources, I want to allow them to be added back by an 
overriding inherits declaration.  (Note that we're inheriting B, so 
overriding that decision at the "closer" local level seems logically 
plausible.)

Is there a fix?  Of course, another solution is to move the "meat" from 
Module *A*'s definition into Module *B* so that we never need to use 
*Excluder*, but that's not the solution I was hoping for.


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Calling getVersion() to get the GWT version from a Linker

2014-12-30 Thread bobbitdiddle
I'd like to get the GWT version from inside a linker (say the link() 
method) which in client code can be done via GWT.getVersionI(), however, 
nothing I've tried appears to work.  You can't use the client version of 
GWT as that leads to a runtime Java exception since the method getVersion() 
cannot be found:

java.lang.UnsatisfiedLinkError: 
com.google.gwt.core.client.GWT.getVersion0()Ljava/lang/String;
 [java] at com.google.gwt.core.client.GWT.getVersion0(Native Method)
 [java] at com.google.gwt.core.client.GWT.getVersion(GWT.java:191)
   :

which is understandable since we're not in client code, but I also can't 
use the ServerGwtBridge via something like: 
ServerGwtBridge.getInstance().getVersion(), as that just returns the string 
"unknown".  Indeed it's hardcoded as "unknown" in the source so I'm not 
sure what good it is - unless something else is supposed to inject a valid 
version string.  Finally, if I import the class 
com.google.gwt.core.*shared*.GWT 
and call GWt.getVersion() on that, then it will run (unlike when you try to 
refer to the "client" package), but the result is null.  Nice, right?

All I can think of at this point is using something like System.getenv() to 
try to read GWT_HOME, but that seems wrong.  Is there no working 
getVersion() I can call?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Finding out what Primary Linker is Active, inside a "Post" Linker

2014-12-28 Thread bobbitdiddle
Maybe I'm missing something, but looking at the code briefly, I see that 
StandardLinkerContext()'s constructor takes the ModuleDef, and the 
ModuleDef is passed around throughout the linking process, so I'm guessing 
a strong reference to the ModuleDef would persist throughout the linking 
process, thus ensuring it didn't get removed from the table in 
ModuleDefLoader.  Isn't the ModuleDef needed during the linking process?
 
On Sunday, December 28, 2014 5:59:30 PM UTC-6, Jens wrote:
>
> What if someone has written a custom primary linker that is unknown to 
> you? Would your linker still work? Basically you might not be able assume 
> that one of the linkers that are shipped with GWT are actually used by an 
> app.
>
> Maybe it is a better approach to create a sane abstract class of your 
> non-primary linker and then provide matching sub classes for all primary 
> linkers GWT provides. Then the developer must add the correct non-primary 
> linker of yours that matches their primary linker or have to sub class your 
> abstract linker.
>
> Not sure if your reflection "hack" will work. Although the method in 
> question is static and might be callable through reflection it only 
> operates on a cache which uses weak references. Thus the data you need 
> might not be in the cache anymore if the JVM has memory pressure and has 
> GC'd some cache contents between module parsing/compilation and finally 
> linking. I would not use that approach.
>
> Maybe it is worth creating a feature request so that LinkerContext has 
> more information about the primary linker in the future.
>
> -- J.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Finding out what Primary Linker is Active, inside a "Post" Linker

2014-12-28 Thread bobbitdiddle
I'm trying to solve a problem.  I've written a custom "post" (non-primary) 
linker extending AbstractLinker, but I want it to have different behavior 
depending on what the primary linker is.  For example, the primary linker 
could be the "standard" linker or the xsiframe linker. I could attempt to 
guess by using GWT.getVersion() in conjunction with the 
ConfigurationProperty set passed to the linker, but I want something more 
robust.  (I say "guess" because the linker setting doesn't show up in the 
ConfigurationProperty set passed into link() unless you set it in your 
module definition, so if it's not present, presumably you have to use 
GWT.getVersion() to guess what the primary linker is.)

Now, I've found from the source that ModuleDef defines an API 
getActivePrimaryLinker(), but I'm not sure how to get the ModuleDef (for 
the module active when link() on my "post" linker is called).  The only 
idea I have right now is to use Java Reflection to invoke the private 
method ModuleDefLoader.tryGetLoadedModule().  (Since the linker is "real" 
Java and won't be compiled to JS, I assume Reflection will work.)

Obviously this is a huge hack.  How should I be checking the primary linker?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.