Some notes about the build instructions

23 views
Skip to first unread message

Timo Mihaljov

unread,
Jun 30, 2013, 6:58:12 AM6/30/13
to clojured...@googlegroups.com
I got the CCW build environment working according to the instructions on
the HowToBuild page, so Laurent's instructions have now been
successfully battle-tested! :) Here are a couple of ways in which the
instructions could be improved/clarified to make the process easier for
new developers:

- The projects should be imported to Eclipse as "General -> Existing
Projects into Workspace" (not as "Maven -> Existing Maven Projects").
Importing as a Maven project results in errors and modifies the Eclipse
project files checked into the VCS. The HowToBuild page says that "You
should then install maven support through the MarketPlace client", which
to me seems to imply that the projects should be imported as Maven
projects. Maybe this sentence should be removed?

- `mvn clean initialize` should be `mvn clean install initialize`,
because `initialize` depends on artifacts installed by `install`.

- I have both `/ccw.target.e37/ccw.target.e37.target` and
`/ccw.target.e37/bin/ccw.target.e37.target`. Maybe the instructions
should be explicit that the former should be used? (I don't know if this
makes any difference, but it's a potential source of confusion.)

- The instructions don't tell how to run the built project. Selecting
ccw.core in the Package Explorer and choosing "Run -> Debug -> Eclipse
Application" from the menu seems to work.

- The instructions don't tell how to install the built project into the
developer's own Eclipse environment. I did `cd ccw.updatesite && mvn
package` on the command line and selected "Help -> Install New
Software... -> Add... -> Local... ->
'ccw/ccw.updatesite/target/repository'" from the Menu. The update site
seems to be built from the packages in the local Maven cache, so `mvn
install` needs to be run in the main ccw directory for the latest
changes to be included in the update site.

- It's strange that the latest development version is numbered
0.12.4-SNAPSHOT, while the latest version in the beta channel is
0.13.0-SNAPSHOT. This means that it's not possible to upgrade from the
beta to the development version, because Eclipse considers the beta to
be newer! I had to manually uninstall the beta before installing the
development version from my locally built update site. Maybe the
development version should also be numbered 0.13.0-SNAPSHOT with a
separate branch for v0.12 maintenance releases?

--
Timo

Laurent PETIT

unread,
Jul 1, 2013, 8:36:15 AM7/1/13
to counterclockwise
2013/6/30 Timo Mihaljov <ti...@mihaljov.info>:
> I got the CCW build environment working according to the instructions on
> the HowToBuild page, so Laurent's instructions have now been
> successfully battle-tested! :)

Great news! :-)

Here are a couple of ways in which the
> instructions could be improved/clarified to make the process easier for
> new developers:
>
> - The projects should be imported to Eclipse as "General -> Existing
> Projects into Workspace" (not as "Maven -> Existing Maven Projects").
> Importing as a Maven project results in errors and modifies the Eclipse
> project files checked into the VCS. The HowToBuild page says that "You
> should then install maven support through the MarketPlace client", which
> to me seems to imply that the projects should be imported as Maven
> projects. Maybe this sentence should be removed?

That's right, this sentence is misleading. I removed it, and enforced
the fact that currently building is done from the command line.

> - `mvn clean initialize` should be `mvn clean install initialize`,
> because `initialize` depends on artifacts installed by `install`.

It's sufficient to do `mvn clean install` (no need to add initialize
at the end) : this way, ccw.core's dependencies will be installed
before ccw.core itself is installed (and also initialized as an
implied phase, as you can see in the lifecycle reference:
http://maven.apache.org/ref/3.0.5/maven-core/lifecycles.html )

I fixed the wiki page, thank you for the report.


> - I have both `/ccw.target.e37/ccw.target.e37.target` and
> `/ccw.target.e37/bin/ccw.target.e37.target`. Maybe the instructions
> should be explicit that the former should be used? (I don't know if this
> makes any difference, but it's a potential source of confusion.)

Weird, you should not have that. Cannot reproduce here. ccw.target.e37
is not a java project (so Eclipse should not copy it into
ccw.target.e37/bin), and also it's not the usual location where maven
puts stuff.

>
> - The instructions don't tell how to run the built project. Selecting
> ccw.core in the Package Explorer and choosing "Run -> Debug -> Eclipse
> Application" from the menu seems to work.

There's a better way: I've checked in serialized launch configurations in git:

Do Run > Debug as on the following resources in your workspace:

- to debug the plugin: "ccw.core/Counterclockwise Plugin.launch"
- to debug the product: "ccw.core/Counterclockwise Product.launch"
- to launch the Junit (SWTBot) tests: "ccw.core.test/Counterclockwise
Product Tests.launch"

I added these instructions to the wiki page

> - The instructions don't tell how to install the built project into the
> developer's own Eclipse environment. I did `cd ccw.updatesite && mvn
> package` on the command line and selected "Help -> Install New
> Software... -> Add... -> Local... ->
> 'ccw/ccw.updatesite/target/repository'" from the Menu. The update site
> seems to be built from the packages in the local Maven cache, so `mvn
> install` needs to be run in the main ccw directory for the latest
> changes to be included in the update site.

Indeed.
Also, note that invoking `mvn install` in the main ccw directory will
already cause the software update site to be packaged in
ccw.updatesite/target.

I updated the wiki page again.

What do you think of the overall changes I made to the wiki page?

https://code.google.com/p/counterclockwise/wiki/HowToBuild

>
> - It's strange that the latest development version is numbered
> 0.12.4-SNAPSHOT, while the latest version in the beta channel is
> 0.13.0-SNAPSHOT. This means that it's not possible to upgrade from the
> beta to the development version, because Eclipse considers the beta to
> be newer! I had to manually uninstall the beta before installing the
> development version from my locally built update site. Maybe the
> development version should also be numbered 0.13.0-SNAPSHOT with a
> separate branch for v0.12 maintenance releases?

Indeed, I will update.

Note that the features in the beta update site reflect what's present
in the git branch 'leiningen'. Those include advanced, but not yet
finished, developments on leiningen support, as well as
(unfortunately) interesting additions that are intertwined with the
work on leiningen.

In the next days, I will find a way to either merge the two branches
and get the work on leiningen protected by a feature toggle, or
extract from the leiningen branch all the interesting bits not
directly related to it.

>
> --
> Timo
>
> --
> You received this message because you are subscribed to the Google Groups "counterclockwise" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clojuredev-dev...@googlegroups.com.
> To post to this group, send email to clojured...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojuredev-devel.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Timo Mihaljov

unread,
Jul 1, 2013, 11:41:32 AM7/1/13
to clojured...@googlegroups.com
On 01.07.2013 15:36, Laurent PETIT wrote:
>> - I have both `/ccw.target.e37/ccw.target.e37.target` and
>> `/ccw.target.e37/bin/ccw.target.e37.target`. Maybe the instructions
>> should be explicit that the former should be used? (I don't know if this
>> makes any difference, but it's a potential source of confusion.)
>
> Weird, you should not have that. Cannot reproduce here. ccw.target.e37
> is not a java project (so Eclipse should not copy it into
> ccw.target.e37/bin), and also it's not the usual location where maven
> puts stuff.

Something must have produced the directories when I tried different ways
of getting the projects imported to Eclipse. This shouldn't be an issue
now that you've updated the build instructions.

>> - The instructions don't tell how to run the built project. Selecting
>> ccw.core in the Package Explorer and choosing "Run -> Debug -> Eclipse
>> Application" from the menu seems to work.
>
> There's a better way: I've checked in serialized launch configurations in git:
>
> Do Run > Debug as on the following resources in your workspace:
>
> - to debug the plugin: "ccw.core/Counterclockwise Plugin.launch"
> - to debug the product: "ccw.core/Counterclockwise Product.launch"
> - to launch the Junit (SWTBot) tests: "ccw.core.test/Counterclockwise
> Product Tests.launch"

The launch configurations seem to give some switches to the JRE that
only work on OSX:

Unrecognized option: -Xdock:icon=../Resources/Eclipse.icns
Unrecognized option: -XstartOnFirstThread

When I remove these options, `Counterclockwise Plugin.launch` works
great. `Counterclockwise Product.launch` shows the (nice!) splash screen
but then throws the following error:
https://gist.github.com/noidi/a6cbf290cbc3e9c2a405 . `Counterclockwise
Product Tests.launch` finishes the first test but hangs on the "New
Project" wizard in both Run and Debug.

> What do you think of the overall changes I made to the wiki page?

Now the instructions seem to answer all the questions I had when reading
the previous version. Thanks!

--
Timo

Laurent PETIT

unread,
Jul 1, 2013, 11:58:58 AM7/1/13
to counterclockwise
2013/7/1 Timo Mihaljov <ti...@mihaljov.info>:
Ok, so it's far from ideal, indeed :-/

What would you suggest the "run instructions" be, then?

>
>> What do you think of the overall changes I made to the wiki page?
>
> Now the instructions seem to answer all the questions I had when reading
> the previous version. Thanks!
>
> --
> Timo
>

Laurent PETIT

unread,
Jul 1, 2013, 12:54:48 PM7/1/13
to counterclockwise
2013/7/1 Timo Mihaljov <ti...@mihaljov.info>:
I have removed this options and pushed the corrections: they are not
strictly required:

- there's now a specific "run on first thread" configuration which
makes the explicit -XstartOnFirstThread undesirable
- the -Xdock:icon option we don't care about when starting the plugin

There is indeed a problem with the unit tests, but that's to be
expected, the introduction of unit tests is recent, and will get more
love as time passes. (for instance it's weird that the tests pass OK
when launched from maven e.g. on the command line locally, or in
Travis, but not from Eclipse ...)

>
>> What do you think of the overall changes I made to the wiki page?
>
> Now the instructions seem to answer all the questions I had when reading
> the previous version. Thanks!
>
> --
> Timo
>

Timo Mihaljov

unread,
Jul 1, 2013, 1:48:29 PM7/1/13
to clojured...@googlegroups.com
On 01.07.2013 19:54, Laurent PETIT wrote:
>> The launch configurations seem to give some switches to the JRE that
>> only work on OSX:
>>
>> Unrecognized option: -Xdock:icon=../Resources/Eclipse.icns
>> Unrecognized option: -XstartOnFirstThread
>>
>> When I remove these options, `Counterclockwise Plugin.launch` works
>> great. `Counterclockwise Product.launch` shows the (nice!) splash screen
>> but then throws the following error:
>> https://gist.github.com/noidi/a6cbf290cbc3e9c2a405 . `Counterclockwise
>> Product Tests.launch` finishes the first test but hangs on the "New
>> Project" wizard in both Run and Debug.
>
> I have removed this options and pushed the corrections: they are not
> strictly required:
>
> - there's now a specific "run on first thread" configuration which
> makes the explicit -XstartOnFirstThread undesirable
> - the -Xdock:icon option we don't care about when starting the plugin
>
> There is indeed a problem with the unit tests, but that's to be
> expected, the introduction of unit tests is recent, and will get more
> love as time passes. (for instance it's weird that the tests pass OK
> when launched from maven e.g. on the command line locally, or in
> Travis, but not from Eclipse ...)

I tested your changes and now the configuration for running the plugin
(the most important one IMO) works out of the box. I'm also a bit
relieved that you can reproduce the problem with the tests. :) This
means that only the product configuration needs fixing on Linux. I'll
try and look into it tomorrow.

--
Timo
Reply all
Reply to author
Forward
0 new messages