[gwt-contrib] Utils

2016-11-10 Thread Colin Alworth
I've spent a little time over the last week trying again to tease apart GWT 
into smaller modules and working out dependencies between them. This is in 
part to see about a not-ant build system, and in part to see why a minimal 
GWT app is surprisingly big. The target here isn't the user lib, but the 
compiler and associated other pieces that are all compiled together: 
emulation, internal annotations, the generator/linker api, commandline 
tools, testing infrastructure, etc.

Along the way, the biggest snarl I've run into so far is Util, and its 
siblings, Utility and StringUtils. "A smattering of useful methods" indeed.

Utility has the benefit of depending on very little outside the JRE, but 
gets used all over the place (in Util, the compiler, dev mode, linkers, 
generators, command-line tools...) - not such a big deal by itself, just 
need to make sure it is in one of the core modules so that everything else 
can lean on it. StringUtils likewise depends on nothing and is used all 
over with one additional usecase: servlets.

Util on the other hand depends on the generator types 
(treelogger, UnableToCompleteException), on SpeedTracer (what is the status 
of SpeedTracer these days?), and on the org.w3c.dom library. It also gets 
used pretty much everywhere, which adds transitive dependencies to the 
above: the compiler, dev mode, generators, linkers, command line tools. It 
also has this confusing Javadoc:

> Methods in this class are candidates for being moved to {@link 
com.google.gwt.util.tools.Utility} if they would be generally useful to 
tool writers, and don't involve TreeLogger.

Only six methods (out of dozens) take either the logger or throw that 
UnableToCompleteException

I'd tend to say that all generators shouldn't depend on org.w3c.dom or 
SpeedTracer to be on their classpath just to compile including any 
ResourceGenerator for ClientBundle (and yes, admittedly, Generators and 
Linkers are going away when GWT3 starts showing up, but until then...), the 
Link.main() likely doesn't need to depend on generators, etc.

To that end, I'm looking at teasing apart some of these into distinct 
classes, purpose-built for where they are used, and only with the 
dependencies they need. Any objections to this that would prevent it 
getting merged into master?

It is just over 1000 lines long (plus another 350 for Utility), and the 
first cut appears to be taking out org.w3c.dom. This slices out just over 
10%, and at no real cost that I've noticed yet - all the methods were 
private, and at least ant dist-dev passes without them, I'll be running a 
longer build soon.

Thoughts?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/617fd0e4-1604-458e-88fe-da686ab6d31d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: Newbie - not able to add patch

2016-11-10 Thread Thomas Broyer
Hi there,

Actually, the GitHub repo is only a mirror; 
in http://www.gwtproject.org/makinggwtbetter.html#workingoncode we point to 
the "real" repo.
As you already cloned the repo, you can "fix" this using:
$ git remote set-url origin https://gwt.googlesource.com/gwt

A few notes based on your screenshot even before you try again to upload 
your patch:
I see you downloaded the commit-msg hook, but you might have done it "too 
late", as it didn't apply to your commit message (oh well, that window 
doesn't show the change being indexed/staged, so maybe you hadn't committed 
yet?). Amending your commit (from the Git GUI, check "amend previous 
commit", then commit again) should fix this.
Your commit message will be a bit cryptic when looked at a few 
weeks/months/years from now; I'd suggest something like:
   Remove coercion to null in Element#getPropertyObject

   Now that Boolean and Doubles are never boxed, the coercion to null
   meant that getPropertyObject will actually coerce a boolean false or
   number 0 or NaN to null rather than returning a java.lang.Boolean or
   java.lang.Double respectively.
   There's a small breaking change for empty-string values that would
   no longer be coerced to null.

   Bug: #9455
   Bug-Link: https://github.com/gwtproject/gwt/issues/9455

(note: I'm not extra-sure about the note on empty strings; do you think you 
could test this to confirm?)

Last, but not least, do you think you could add some tests to the 
ElementTest#testProperties? (using setPropertyObject/getPropertyObject with 
boolean true and false, double 0, NaN and a non-zero value –e.g. 42–, and 
an empty and non-empty strings)
If you don't find/know how to actually run the test, don't worry: push in 
the change, add a comment to the review (you'll get the direct link in the 
console after you push) that you didn't run the test, and I'll take care of 
verifying it.

On Thursday, November 10, 2016 at 1:32:05 PM UTC+1, Kiran Sringeri wrote:
>
> I have to add a patch to https://github.com/gwtproject/gwt.
>
> I tried to follow the steps mentioned in 
> http://www.gwtproject.org/makinggwtbetter.html#submittingpatches.
>
> But when I try to push my changes, I get the below error:
>
> remote: Permission to gwtproject/gwt.git denied to MyLifeIsJava.
> fatal: unable to access 'https://github.com/gwtproject/gwt/': The 
> requested URL returned error: 403
> Pushing to https://github.com/gwtproject/gwt
>
>
> 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/ff8aad7d-5dce-46e7-b7f2-a7335fa9bfec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: Newbie - not able to add patch

2016-11-10 Thread Jens
GWT is hosted at https://gwt.googlesource.com/gwt and only mirrored 
(read-only) to Github.

If you want to contribute you must push your patch to 
https://gwt.googlesource.com/gwt . To do so you need to signup to Gerrit, 
sign a CLA, obtain and install a HTTP password and finally install Gerrit's 
commit hook.

http://www.gwtproject.org/makinggwtbetter.html#checkingout
http://www.gwtproject.org/makinggwtbetter.html#submittingpatches

-- J.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/3d02dfc4-ab8c-4e99-b5e2-2c0e1935b245%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Newbie - not able to add patch

2016-11-10 Thread Kiran Sringeri
I have to add a patch to https://github.com/gwtproject/gwt.

I tried to follow the steps mentioned in 
http://www.gwtproject.org/makinggwtbetter.html#submittingpatches.

But when I try to push my changes, I get the below error:

remote: Permission to gwtproject/gwt.git denied to MyLifeIsJava.
fatal: unable to access 'https://github.com/gwtproject/gwt/': The requested 
URL returned error: 403
Pushing to https://github.com/gwtproject/gwt




-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/4c9ac7fe-f07a-4588-aea0-31e53885a5cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.