Question to Windows users

298 views
Skip to first unread message

Thomas Broyer

unread,
Oct 17, 2014, 6:06:28 AM10/17/14
to google-web-tool...@googlegroups.com
 
Would it be a blocker if you had to use a VM (VirtualBox or boot2docker) to be able to contribute to GWT (because build tools would only work on Linux or OS X) ?
You'd still be able to use Eclipse or IntelliJ IDEA to develop, outside the VM, but actually building the project to produce JAR files would require Linux (running in a VM).

On the other hand, all you'd have to do to get things working would be to download the image with everything preinstalled (and possibly call a script too bootstrap the dev environment), with no other requirement on your machine than having VirtualBox (or boot2docker; maybe Vagrant)

Just to have an idea if we should rule out Pants as a build tool or not (Pants might support Windows in the future though).

I'm thinking that maybe we should try to come up with Docker images and/or Vagrantfile anyway to make things easier for new contributors, whether they're using Windows, Linux or OS X.

Richard Wallis

unread,
Oct 17, 2014, 6:43:13 AM10/17/14
to google-web-tool...@googlegroups.com
How big is the VM image?

--
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-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/c37dcd9e-5530-45e7-9f6b-86fd736a6a94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jens

unread,
Oct 17, 2014, 7:14:01 AM10/17/14
to google-web-tool...@googlegroups.com
How big is the VM image?

I would guess at least 300 MB.

Requiring a VM doesn't really make things simpler. Just imagine for a new contributor that is used to the usual Github flow:

- Sign up Gerrit + sign CLA (I guess that one is accepted nowadays among developers)
- Download and install VirtualBox or activate Hyper-V in Win8.1+. Might require a restart.
- Download image, 300MB+
- Mount a directory from the VM so you can directly work on the git repository inside the VM.

If I imagine I would want to fix a small bug that maybe has a workaround available I am not sure if I would go through the above. If I would plan to contribute more often then the above might be acceptable for Windows users, but for a one time contribution probably not.


-- J.

Manuel Carrasco Moñino

unread,
Oct 17, 2014, 7:14:18 AM10/17/14
to google-web-tool...@googlegroups.com
Could Pants be compiled and run in cygwin ?

Richard Wallis

unread,
Oct 17, 2014, 7:32:46 AM10/17/14
to google-web-tool...@googlegroups.com
I agree with Jens, for a person who contributes a lot to the project adding a VM to the setup is not a major problem.

But the people who just want to fix a bug every now and then are not going to go through the hassle.

It already takes me an hour and a half to checkout the repo.  Having to download a vm will add another hour or so without even considering configuration.

Thomas Broyer

unread,
Oct 17, 2014, 7:53:00 AM10/17/14
to Google Web Toolkit Contributors
…on the other hand, VirtualBox and/or boot2docker and/or Vagrant are reusable across projects, and I'd expect web developers to use VMs nowadays, if only for browser testing (e.g. testing in different versions of IE).

What if we commit IDE configurations in the repository? (and make sure they're updated each time we change the build; that would be similar to today's situation, except that the IDE config could be generated from the build scripts)
A new contributor could then work without a VM (for a small patch, running tests in the IDE should be enough), until he wants/needs to use a custom build of GWT in his projects; then he'd have to find a Linux or OS X machine (or VM) to actually build GWT.
Would that be acceptable?

Thomas Broyer

unread,
Oct 17, 2014, 8:08:19 AM10/17/14
to Google Web Toolkit Contributors
On Fri, Oct 17, 2014 at 1:14 PM, Manuel Carrasco Moñino <man...@apache.org> wrote:
Could Pants be compiled and run in cygwin ?


BTW, Pants is written in Python, so it's not a matter of "compilation" ;-)


--
Thomas Broyer
/tɔ.ma.bʁwa.je/

Jens

unread,
Oct 17, 2014, 8:47:33 AM10/17/14
to google-web-tool...@googlegroups.com
What if we commit IDE configurations in the repository? (and make sure they're updated each time we change the build; that would be similar to today's situation, except that the IDE config could be generated from the build scripts)

Would be ok, although personally I wouldn't prefer it as IDEs tend to modify these files every now and then because of any kind of plugin in the IDE or whatever. I generally try to keep IDE configuration out of DVCS and let the IDE figure out how to configure itself based on the build file. What about Netbeans + Pants?

 
A new contributor could then work without a VM (for a small patch, running tests in the IDE should be enough), until he wants/needs to use a custom build of GWT in his projects; then he'd have to find a Linux or OS X machine (or VM) to actually build GWT.
Would that be acceptable?

I would think so. As GWT now has SNAPSHOT builds a contributor could also use these after his patch has landed. The linux/unix requirement would then only hit people who apply custom patches on top of GWT or who don't use a dependency management tool that understands maven coordinates and prefer a SDK zip. Maybe we should publish such a snapshot SDK zip at gwtproject.org as well.

-- J.

Grzegorz Nowak

unread,
Oct 17, 2014, 8:55:07 AM10/17/14
to google-web-tool...@googlegroups.com
Hi

In my opinion contribution to an open source project should be as easy as possible - the easier it is, higher the chance somebody will contribute. As Jens mentioned there are already several steps which are required to setup working environment. Downloading VM software, VM image and additional tools adds some overhead to the process.

Another thing is the choice of the build tool. I'm not sure if it's a good idea to base the whole build process on such a new tool (Pants - v0.1). I would lean toward some well known tools. I know Maven is out of the picture. Until now Ant was used for building GWT but it's not too good for modularized projects and the plan is to make monolithic gwt-user/dev/servlet split into smaller modules. At some point Buck was one of the options, but I didn't hear any news about using it. Maybe Gradle? I think some build tool matrix would help in making the decision.

Regards,
Greg

Rene Hangstrup Møller

unread,
Oct 17, 2014, 11:11:10 AM10/17/14
to google-web-tool...@googlegroups.com
I am just going to repeat my reply from google+ here:

If you want to encourage contributions from the community, you should work on lowering the barriers to entry. Pick standard tools that work on a variety of platforms.

What went wrong with the conversion to gradle? Why do you need some obscure build system where first sentence on the install page is "As of September 2014, alas, Pants is not something you can just install and use."

BTW: I am a linux user, but I still think you should go for a more standard build tool.

/Rene

Thomas Broyer

unread,
Oct 17, 2014, 6:04:05 PM10/17/14
to google-web-tool...@googlegroups.com


On Friday, October 17, 2014 5:11:10 PM UTC+2, Rene Hangstrup Møller wrote:
I am just going to repeat my reply from google+ here:

If you want to encourage contributions from the community, you should work on lowering the barriers to entry. Pick standard tools that work on a variety of platforms.

What went wrong with the conversion to gradle?

Nothing went "wrong", but handling external dependencies still requires that you "svn co" and "svn up" the gwt-tools repo, and Gradle will most likely impact how we'd later modularize GWT (not necessarily a bad thing, but something to be aware of).
I'll make a comparison matrix of Gradle vs. Buck vs. Pants when I find time.
 
Why do you need some obscure build system where first sentence on the install page is "As of September 2014, alas, Pants is not something you can just install and use."

It also says that “Once it’s set up, most folks should be able to use the Pants Conceptual Overview and not worry about these things.”, i.e. “pants goal idea” or “pants goal eclipse” to setup your IDE, “pants goal jar” and “pants goal test” for everyday use, “pants goal publish” or “pants goal bundle” to build GWT in order to use it in your projects (deploy it in a Maven repo, or create a ZIP with all needed JARs)
Note: I haven't tried Pants yet, so this is all from the docs.
Existing repositories seem to have a bunch of scripts in them so you can just “git clone” and run “./pants” and Pants will download itself, just like Gradle with ./gradlew. And BUILD files are easy to read and self-explanatory.

Brandon Donnelson

unread,
Oct 18, 2014, 1:25:30 PM10/18/14
to google-web-tool...@googlegroups.com
Setting up an images seems ideal to me to get going with less steps. 

David

unread,
Oct 19, 2014, 2:28:45 PM10/19/14
to google-web-tool...@googlegroups.com
Sounds like a hasle to require a VM... unless that VM would include everything to get started.

Just setting up eclipse to be inline with the coding guidelines in GWT and setting up all the libraries etc are really painful and you need to follow the steps very carefully (and hopefully no dependency has been changed since the document was written).

What we do (in an enterprise environment) is to just have a zip or machine image ready to be installed on a new machine. After 30 minutes or so a new developer is ready to code.


--
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-co...@googlegroups.com.

Thomas Broyer

unread,
Oct 20, 2014, 5:47:08 AM10/20/14
to google-web-tool...@googlegroups.com


On Sunday, October 19, 2014 8:28:45 PM UTC+2, stuckagain wrote:
Sounds like a hasle to require a VM... unless that VM would include everything to get started.

Just setting up eclipse to be inline with the coding guidelines in GWT and setting up all the libraries etc are really painful

This is what the move to another build tool is also supposed to make easier (but it's not the main goal, at least not from my point of view); to begin with by having IDE configurations generated from the build scripts (and/or using Gradle integration in IDEs) rather than maintained in parallel (and generally forgotten, so they become out-of-date).
I'm also looking for a build tool that can download external dependencies so you don't have to "svn checkout" the gwt-tools; but we need to be able to download from gwt-tools, at least for a transition period (and guess what: Gradle can't do that actually)

and you need to follow the steps very carefully (and hopefully no dependency has been changed since the document was written).

I'm curious, which dependencies are you talking about?
 

What we do (in an enterprise environment) is to just have a zip or machine image ready to be installed on a new machine. After 30 minutes or so a new developer is ready to code.

In an "Enterprise" environment, you want to "control" the development environment so you don't give many choices to the developers.
Here, we want to support different IDEs, we don't want to force you to use Eclipse or IntelliJ IDEA or whatever other IDE. Maintaining those ZIPs or images is also going to be a hassle I believe.
I would like to have scripts to help setup the environment, and maybe we could have a script that downloads and configure Eclipse for instance (I doubt it though); we should have a script to setup the Gerrit commit-msg hook without the need for the contributor to think about it (just run "setup.sh" or "setup.bat" and it does the right thing; I fear it wouldn't be that easy on Windows though; on Linux, where every tool is an apt-get or yum call away, things are much easier, not to mention that distributions come with many tools pre-installed: I think every distro comes with Python pre-installed because it's needed by other tools already, it might also be the case on OS X; but everything seems complicated on Windows, with installers that you need to go look for, download, run, answer the questions –i.e. click "next" and "OK"– then reboot the machine if you're unlucky; n ow maybe I'm overly pessimistic and the needed tools come bundled with "Git for Windows", but I know some people won't even install that and instead use the JGit integrated within their IDE – and that won't work for us because IIRC JGit doesn't run git hooks).
Imagine that I could just ask you to have Vagrant installed on your machine; the steps to contribute would be "git clone" and "vagrant up" (we could even do the "git clone" from within the VM, but I'm not sure it's worth it; the VM would setup the commit-msg hook though), then you can "vagrant ssh" into the VM to launch any build tool that GWT uses, and use "vagrant halt" or even "vagrant destroy" when you're done. As for the IDE, launch a command to generate IDE configuration files (depending on your IDE) that you can open (and when the project changes, just run the command again and refresh the project in your IDE to get the modifications); I'm not talking about running the IDE within the VM, we want you to keep with your habits and use the IDE you like, the way you like it; you should only have to configure the code style, and for that I believe we could provide files that you can just import (this is already the case for Eclipse).
On Linux or OS X (or BSD, etc.), you could run scripts directly on your machine so wouldn't even need Vagrant, unless you want to keep your machine clean.

Note: this is all speculative at this point! I was just taking the temperature.

Rene Hangstrup Møller

unread,
Oct 20, 2014, 9:23:15 AM10/20/14
to google-web-tool...@googlegroups.com

I'm also looking for a build tool that can download external dependencies so you don't have to "svn checkout" the gwt-tools; but we need to be able to download from gwt-tools, at least for a transition period (and guess what: Gradle can't do that actually)

Gradle works brilliantly with maven repositories, so hopefully most dependencies can be fetched from a publicly available maven repository

The non-standard dependencies have to be taken from gwt-tools for now. Gradle can use ant tasks, so I hope it can be done with one of the svn task extensions for ant or by using svnkit.





Thomas Broyer

unread,
Oct 20, 2014, 9:33:03 AM10/20/14
to Google Web Toolkit Contributors
It's more a problem that you have to download them to "somewhere" before you can use them as dependencies with file(). That "somewhere" has to be documented so people can go delete files in the event that the download created corrupted files, but you probably don't want it cleaned when you do a "./gradlew clean". I know it's feasible with Gradle (it's Groovy, so anything is doable), but it's not built-in; kind of a shame when you're bragging that you can adapt to any situation and use any kind of dependencies from file() to Maven and Ivy… just not plain HTTP URLs.
Hopefully we can eventually sort it out and only use things that are deployed to a Maven repo (even if we need to deploy them ourselves), but that hinders the migration. Definitely not a blocker though.


--
Thomas Broyer
/tɔ.ma.bʁwa.je/

Jens

unread,
Oct 20, 2014, 9:50:13 AM10/20/14
to google-web-tool...@googlegroups.com
kind of a shame when you're bragging that you can adapt to any situation and use any kind of dependencies from file() to Maven and Ivy… just not plain HTTP URLs.

Well Gradle allows you to set a custom repository pattern as it is based on ivy. See section "51.6.9. More about Ivy resolvers" in http://www.gradle.org/docs/current/userguide/dependency_management.html

Although the doc does not show it but maybe these patterns can be defined per repository. That way we might be able to use the direct download links of the svn repo at code.google.com.

-- J.

Jonathon Lamon

unread,
Oct 20, 2014, 12:47:23 PM10/20/14
to google-web-tool...@googlegroups.com
Ivy has a specific URL resolver (https://ant.apache.org/ivy/history/latest-milestone/resolver/url.html).   Each URL resolver can have its own pattern and even multiple patterns.  Ivy is a very powerful dependency management, way more powerful, imo, than maven, but as such it can be confusing.  I setup a custom set of build scripts in ant/ivy that we use cross project that basically do everything we need to do and allow us to have a common process. You can even make ivy deploy maven compatible poms, so that you get both maven and ivy support in your dependency repo.  If you wanted to use ivy for publishing or retrieving dependencies, I would be glad to help/provide advice.

Rene Hangstrup Møller

unread,
Oct 20, 2014, 5:35:05 PM10/20/14
to google-web-tool...@googlegroups.com
This is the simplest I could come up with for fetching dependencies from gwt tools

https://gist.github.com/rhmoller/7985bfdc2eac42598ee2

Thomas Broyer

unread,
Oct 20, 2014, 5:58:01 PM10/20/14
to google-web-tool...@googlegroups.com

Awesome! Will try when I find a computer and, more importantly, time ;-)

--
You received this message because you are subscribed to a topic in the Google Groups "GWT Contributors" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit-contributors/qStHSjew0Os/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/c155af71-a8e7-4cc9-bd68-1aaad21a90e8%40googlegroups.com.

Jens

unread,
Oct 20, 2014, 6:12:29 PM10/20/14
to google-web-tool...@googlegroups.com

This is the simplest I could come up with for fetching dependencies from gwt tools

https://gist.github.com/rhmoller/7985bfdc2eac42598ee2

Cool! Exactly what I was thinking about. Thanks for sharing.

-- J. 

David

unread,
Oct 21, 2014, 10:11:35 AM10/21/14
to google-web-tool...@googlegroups.com
On Mon, Oct 20, 2014 at 11:47 AM, Thomas Broyer <t.br...@gmail.com> wrote:

and you need to follow the steps very carefully (and hopefully no dependency has been changed since the document was written).

I'm curious, which dependencies are you talking about?

In my case it was the checkstyle plugin for eclipse that was not compatible with a newer eclipse version. But I gave up shortly afterwards.
 
 

What we do (in an enterprise environment) is to just have a zip or machine image ready to be installed on a new machine. After 30 minutes or so a new developer is ready to code.

In an "Enterprise" environment, you want to "control" the development environment so you don't give many choices to the developers.

We always have some rogue developers who use vi or IntelliJ, but indeed we can be very enforcing on what developers have to use. On the other hand, requiring a VM for development is also a very heavy requirement. I've had to do such things on a Linux box (with windows in a virtual box) but that kept on breaking with every update of the linux kernel. But I am not an Linux expert. I stopped using it a very long time ago (95 or so)
 
Here, we want to support different IDEs, we don't want to force you to use Eclipse or IntelliJ IDEA or whatever other IDE. Maintaining those ZIPs or images is also going to be a hassle I believe.
I would like to have scripts to help setup the environment, and maybe we could have a script that downloads and configure Eclipse for instance (I doubt it though); we should have a script to setup the Gerrit commit-msg hook without the

Well one nice tool (from Google if I am not mistaken) is to use the workspace mechanic. We use that mostly to keep all our eclipse installations inline with our rules. Maybe that is an idea to make it easier.
 
need for the contributor to think about it (just run "setup.sh" or "setup.bat" and it does the right thing; I fear it wouldn't be that easy on Windows though; on Linux, where every tool is an apt-get or yum call away, things are much easier, not to mention that distributions come with many tools pre-installed: I think every distro comes with Python pre-installed because it's needed by other tools already, it might also be the case on OS X; but everything seems complicated on Windows, with installers that you need to go look for, download, run, answer the questions –i.e. click "next" and "OK"– then reboot the machine if you're unlucky; n ow maybe I'm overly pessimistic and the needed tools come bundled with "Git for Windows", but I know some people won't even install that and instead use the JGit integrated within their IDE – and that won't work for us because IIRC JGit doesn't run git hooks).

I recently had to customize Bootstrap.css to be used in GWT (without GWT wrappers) and that was really a painful process. It was nearly impossible to get it working in the enterprise environment. I finally did it on my Mac at home. But I really hate the fact that nowadays everything seems to be using their own build systems. Sure ant is crappy and even maven is not great in many ways ... but boy I was surprised at how many newer things are available. Always new commands to learn, waste of memory cycles and confusion when switching between projects.
 
Anyway, you guys asked for some feedback, there you have it from my point of view, feel free to do with it what you like :-)

Thomas Broyer

unread,
Oct 21, 2014, 12:14:14 PM10/21/14
to Google Web Toolkit Contributors
On Tue, Oct 21, 2014 at 4:10 PM, David <david...@gmail.com> wrote:

On Mon, Oct 20, 2014 at 11:47 AM, Thomas Broyer <t.br...@gmail.com> wrote:

and you need to follow the steps very carefully (and hopefully no dependency has been changed since the document was written).

I'm curious, which dependencies are you talking about?

In my case it was the checkstyle plugin for eclipse that was not compatible with a newer eclipse version. But I gave up shortly afterwards.

Ah yes. But nobody forces you to run Checkstyle in the IDE (I don't; when I tried it some years ago it slowed Eclipse down to being almost unusable).
Maybe we should make things clearer in the doc that it's just a tool and what matters is that the code is compliant with the style guides, not how you make sure it's compliant ("ant checkstyle" works too; in my case, I must confess I don't even run checkstyle on my machine because the rules are common-sense to me and I rarely violate them – and if I do, then the checks in Gerrit/Jenkins will slap me in the face)

(note: we since removed our custom checkstyle checks which freed us from Checkstyle 4.x and have thus been able to upgrade to Checkstyle 5.x)


--
Thomas Broyer
/tɔ.ma.bʁwa.je/
Reply all
Reply to author
Forward
0 new messages