Skip to content
This repository
Browse code

Sanity for build.xml: exscriptus&positus delendus est.

Reduced copy/pasting to the best of my antabilities.
The next person to duplicate anything without written
permission will be sentenced to a week in xmhell.

While I was at it, made sure that layering is respected.
The quick phase exclusively uses the locker compiler for building.

The jar task will fail when trying to create an empty jar.

Replaced the crazy if/unless/depends constructs by if/then/else.
Version suffix computation should now be comprehensible.
I threw in some validation to make sure the various suffixes are consistent.

Also, no more init/pre-foo tasks unless absolutely necessary.

Introduced a couple of macros to capture the essence of staged compilation.

Notes:
  - remove lib.extra, standardize on aux.libs
  - collapse *.javac.path and *.build.path
  - rename starr.classpath to starr.compiler.path
  - only repl needs jline, locker.compiler.path = locker.comp.build.path + forkjoin
  - more uniform build.paths (compiler = reflect + library)
    - uniformity means slightly bigger classpaths
      (e.g. forkjoin is only used in library,  but inherited by compiler)
    - pruned: some spurious dependencies removed
    - compilerpathref = compiler build path
  - silence test.osgi, by hook or by crook
  - centralized clean tasks
  - reduce duplication in property usage
  - fix pack.xml to pack scaladoc/partest instead of scaladoc/scala-partest
  - TODO: -XDignore.symbol.file necessary for library? only needed for forkjoin?
  - document usage from jenkins, fix typo: partest.scalac*_*opts

New targets:
 - quick-opt
 - strap-opt
 - test.bc
 - test.osgi
 - test.osgi.comp
 - test.osgi.init
 - test.stability-opt

Removed/replaced targets:
 - asm.clean asm.lib asm.start
 - bc.run
 - dist.latest dist.latest.unix dist.latest.win dist.start
 - docs.all docs.manmaker docs.pre-comp docs.pre-continuations-plugin
 - docs.pre-jline docs.pre-lib docs.pre-man docs.pre-partest docs.pre-scalap
 - forkjoin.clean forkjoin.lib forkjoin.pack forkjoin.start
 - graph.clean
 - init.build.nopatch.release init.build.patch.release init.build.release
 - init.build.snapshot init.build.suffix.done init.extra.tasks
 - init.fail.bad.jdk init.hasbuildnum init.hasmavensuffix init.jars
 - init.jars.check init.maven.jars init.maven.tasks init.osgi.suffix
 - init.osgi.suffix.final init.osgi.suffix.snapshot init.testjava6
 - init.version.done init.version.git init.version.release init.version.snapshot
 - init.warn.jdk7 locker.pre-comp locker.pre-lib locker.pre-reflect
 - locker.unlock.comp locker.unlock.lib locker.unlock.pre-comp
 - locker.unlock.pre-lib locker.unlock.pre-reflect locker.unlock.reflect
 - osgi.clean osgi.test osgi.test.comp osgi.test.init
 - pack.clean pack.pre-bin pack.pre-comp pack.pre-lib pack.pre-partest
 - pack.pre-plugins pack.pre-reflect pack.pre-scalap pack.start
 - palo.comp palo.lib palo.pre-bin palo.pre-comp palo.pre-lib palo.pre-reflect
 - palo.reflect palo.start quick.pre-bin
 - quick.pre-comp quick.pre-interactive quick.pre-lib quick.pre-partest
 - quick.pre-plugins quick.pre-reflect quick.pre-repl quick.pre-scalacheck
 - quick.pre-scaladoc quick.pre-scalap
 - sbt.clean sbt.compile sbt.done sbt.libs sbt.start
 - starr.clean
 - strap.clean strap.pre-comp strap.pre-lib strap.pre-reflect strap.start
 - test.debug test.pre-run
  • Loading branch information...
commit e3b5e0ba40447970d621cfeed5cc1770df69884f 1 parent 52adf13
Adriaan Moors authored March 22, 2013
3,753  build.xml
1292 additions, 2461 deletions not shown
18  src/build/pack.xml
@@ -179,41 +179,41 @@ MAIN DISTRIBUTION PACKAGING
179 179
 
180 180
   <target name="pack-maven.srcs" depends="pack-maven.libs">
181 181
     <!-- Add missing src jars. -->
182  
-    <jar destfile="${dists.dir}/maven/${version.number}/jline/jline-src.jar"
  182
+    <jar whenmanifestonly="fail" destfile="${dists.dir}/maven/${version.number}/jline/jline-src.jar"
183 183
          basedir="${src.dir}/jline/src/main/java">
184 184
       <include name="**/*"/>
185 185
     </jar>
186 186
 
187 187
 
188 188
     <!-- Continuations plugin -->
189  
-    <jar destfile="${dists.dir}/maven/${version.number}/plugins/continuations/continuations-src.jar"
  189
+    <jar whenmanifestonly="fail" destfile="${dists.dir}/maven/${version.number}/plugins/continuations/continuations-src.jar"
190 190
          basedir="${src.dir}/continuations/plugin">
191 191
       <include name="**/*"/>
192 192
     </jar>
193 193
   </target>
194 194
 
195 195
   <target name="pack-maven.docs" depends="pack-maven.libs, pack-maven.plugins">
196  
-    <jar destfile="${dists.dir}/maven/${version.number}/jline/jline-docs.jar"
  196
+    <jar whenmanifestonly="fail" destfile="${dists.dir}/maven/${version.number}/jline/jline-docs.jar"
197 197
          basedir="${build-docs.dir}/jline">
198 198
       <include name="**/*"/>
199 199
     </jar>
200  
-    <jar destfile="${dists.dir}/maven/${version.number}/scala-library/scala-library-docs.jar"
  200
+    <jar whenmanifestonly="fail" destfile="${dists.dir}/maven/${version.number}/scala-library/scala-library-docs.jar"
201 201
          basedir="${build-docs.dir}/library">
202 202
       <include name="**/*"/>
203 203
     </jar>
204  
-    <jar destfile="${dists.dir}/maven/${version.number}/scala-compiler/scala-compiler-docs.jar"
  204
+    <jar whenmanifestonly="fail" destfile="${dists.dir}/maven/${version.number}/scala-compiler/scala-compiler-docs.jar"
205 205
          basedir="${build-docs.dir}/compiler">
206 206
       <include name="**/*"/>
207 207
     </jar>
208  
-    <jar destfile="${dists.dir}/maven/${version.number}/scalap/scalap-docs.jar"
  208
+    <jar whenmanifestonly="fail" destfile="${dists.dir}/maven/${version.number}/scalap/scalap-docs.jar"
209 209
          basedir="${build-docs.dir}/scalap">
210 210
       <include name="**/*"/>
211 211
     </jar>
212  
-    <jar destfile="${dists.dir}/maven/${version.number}/scala-partest/scala-partest-docs.jar"
213  
-         basedir="${build-docs.dir}/scala-partest">
  212
+    <jar whenmanifestonly="fail" destfile="${dists.dir}/maven/${version.number}/scala-partest/scala-partest-docs.jar"
  213
+         basedir="${build-docs.dir}/partest">
214 214
       <include name="**/*"/>
215 215
     </jar>
216  
-    <jar destfile="${dists.dir}/maven/${version.number}/plugins/continuations/continuations-docs.jar"
  216
+    <jar whenmanifestonly="fail" destfile="${dists.dir}/maven/${version.number}/plugins/continuations/continuations-docs.jar"
217 217
          basedir="${build-docs.dir}/continuations-plugin">
218 218
       <include name="**/*"/>
219 219
     </jar>
0  test/debug/OBSOLETE
No changes.
29  tools/stability-test.sh
... ...
@@ -0,0 +1,29 @@
  1
+#!/usr/bin/env bash
  2
+#
  3
+
  4
+declare failed
  5
+
  6
+echo "Comparing build/quick/classes and build/strap/classes"
  7
+for dir in library reflect compiler; do
  8
+  # feel free to replace by a more elegant approach -- don't know how
  9
+  if diff -rw -x '*.css' \
  10
+              -x '*.custom' \
  11
+              -x '*.gif' \
  12
+              -x '*.js' \
  13
+              -x '*.layout' \
  14
+              -x '*.png' \
  15
+              -x '*.properties' \
  16
+              -x '*.tmpl' \
  17
+              -x '*.tooltip' \
  18
+              -x '*.txt' \
  19
+              -x '*.xml' \
  20
+              build/{quick,strap}/classes/$dir
  21
+  then
  22
+    classes=$(find build/quick/classes/$dir -name '*.class' | wc -l)
  23
+    printf "%8s: %5d classfiles verified identical\n" $dir $classes
  24
+  else
  25
+    failed=true
  26
+  fi
  27
+done
  28
+
  29
+[[ -z $failed ]] || exit 127

0 notes on commit e3b5e0b

Please sign in to comment.
Something went wrong with that request. Please try again.