[kepler-dev] [Bug 4974] ant run and ant force-ptolemy fail to compile an updated file

bugzilla-daemon at ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Wed Jan 11 10:59:50 PST 2012


http://bugzilla.ecoinformatics.org/show_bug.cgi?id=4974

Christopher Brooks <cxh at eecs.berkeley.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
       Hours Worked|                            |1.0
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #1 from Christopher Brooks <cxh at eecs.berkeley.edu> 2012-01-11 10:59:50 PST ---
d. hogan prompted me to look again at this bug.
The initial issue was that
cd build-area
touch ../ptolemy/src/ptolemy/actor/parameters/ParameterPort.java 
ant run

would fail to compile ParameterPort.

It turns out that the bug occurs if
ant update-ptolemy -Drev=stable
is first run, followed by the touch and ant run.

If
ant update-ptolemy -Drev=head 
is run first, then the problem does not occur.

Here's a complete example of the failure:
---start---
bash-3.2$ ant update-ptolemy -Drev=stable
ant update-ptolemy -Drev=stable
Buildfile: /Users/cxh/src/kepler/build-area/build.xml

update-ptolemy:
[update-ptolemy] svn update -r 62749 /Users/cxh/src/kepler/ptolemy/src
[update-ptolemy] At revision 62749.
[update-ptolemy]

BUILD SUCCESSFUL
Total time: 12 seconds
bash-3.2$ ant force-ptolemy compile
ant force-ptolemy compile
Buildfile: /Users/cxh/src/kepler/build-area/build.xml

force-ptolemy:

compile:
     [echo] Note that you may need to run "ant force-ptolemy compile" to
compile ptolemy.
  [compile] Compiling ptolemy...
  [compile] Compiling 1 source file to
/Users/cxh/src/kepler/ptolemy/target/classes
  [compile] Compiling configuration-manager...
  [compile] Compiling module-manager...
  [compile] Compiling core...
  [compile] Compiling event-state...
  [compile] Compiling util...
  [compile] Compiling component-library...
  [compile] Compiling sms...
  [compile] Compiling data-handling...
  [compile] Compiling ssh...
  [compile] Compiling io...
  [compile] Compiling job...
  [compile] Compiling repository...
  [compile] Compiling authentication...
  [compile] Compiling module-manager-gui...
  [compile] Compiling gui...
  [compile] Compiling authentication-gui...
  [compile] Compiling ecogrid...
  [compile] Compiling dataturbine...
  [compile] Compiling opendap...
  [compile] Compiling actors...
  [compile] Compiling loader...
  [compile] Compiling r...
  [compile] Compiling apple-extensions...

BUILD SUCCESSFUL
Total time: 4 seconds
bash-3.2$ touch ../ptolemy/src/ptolemy/actor/parameters/Parameter
bash-3.2$ ant compile
Buildfile: /Users/cxh/src/kepler/build-area/build.xml

compile:
     [echo] Note that you may need to run "ant force-ptolemy compile" to
compile ptolemy.
  [compile] Compiling configuration-manager...
  [compile] Compiling module-manager...
  [compile] Compiling core...
  [compile] Compiling event-state...
  [compile] Compiling util...
  [compile] Compiling component-library...
  [compile] Compiling sms...
  [compile] Compiling data-handling...
  [compile] Compiling ssh...
  [compile] Compiling io...
  [compile] Compiling job...
  [compile] Compiling repository...
  [compile] Compiling authentication...
  [compile] Compiling module-manager-gui...
  [compile] Compiling gui...
  [compile] Compiling authentication-gui...
  [compile] Compiling ecogrid...
  [compile] Compiling dataturbine...
  [compile] Compiling opendap...
  [compile] Compiling actors...
  [compile] Compiling loader...
  [compile] Compiling r...
  [compile] Compiling apple-extensions...

BUILD SUCCESSFUL
Total time: 0 seconds
---end---

In turns out that the Kepler build system uses
kepler/ptolemy-head and kepler/.ptolemy-compiled
to determine whether to compile ptolemy.

kepler/build-area/src/org/kepler/build/modules/ModulesTask.java
defines two fields:
        ptolemyCompiled = new File(basedir, ".ptolemy-compiled");
    ptolemyHead = new File(basedir, "ptolemy-head");

In looking at the compile() method in
build-area/src/org/kepler/build/CompileModules.java
     if (mn.equals(Module.PTOLEMY) || mn.matches(Module.PTOLEMY+"-\\d+\\.\\d+")
||
                        mn.matches(Module.PTOLEMY_KEPLER+"-\\d+\\.\\d+") ||
mn.startsWith(Module.PTOLEMY_FOR+"-"))
    {
            if (!this.ptolemyHead.exists())
            {
                try
                {
                    ptolemyCompiled.createNewFile();
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
        }

If "ant update-ptolemy -Drev=stable" is run, then kepler/ptolemy-head is
removed.
If "ant compile" is then run, kepler/.ptolemy-compiled is created.

The various ant targets interact with these files to determine whether to
compile ptolemy.

The bottom line is:
If you use "ant update-ptolemy -Drev=stable", then ptolemy will not necessarily
be automatically compiled for you.
If you use "ant update-ptolemy -Drev=head", then ptolemy is more likely to be
compiled for you.

Fortunately, "ant compile" now produces a message alerting the user about this:
     [echo] Note that you may need to run "ant force-ptolemy compile" to
compile ptolemy.

So, even though there is a bug where the set of commands I used with the stable
configuration failed to compile, we do warn about it now, so we can close this
bug.

See d. hogan's proposal for a fix to use dependencies at 
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5554

-- 
Configure bugmail: http://bugzilla.ecoinformatics.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the Kepler-dev mailing list