Browse files

Merge branch '2.10.x' into develop

  • Loading branch information...
2 parents a50011f + ec4a9fb commit 0e505e5f9432ce0a39e7f577df95387d64a2f841 @xeno-by xeno-by committed Aug 4, 2012
Showing with 13,093 additions and 7,292 deletions.
  1. +4 −0 META-INF/MANIFEST.MF
  2. +253 −135 build.xml
  3. +0 −12 classpath.SAMPLE
  4. +1 −1 lib/ant/ant-contrib.jar.desired.sha1
  5. +1 −1 lib/ant/ant-dotnet-1.0.jar.desired.sha1
  6. +1 −1 lib/ant/ant.jar.desired.sha1
  7. +1 −1 lib/ant/maven-ant-tasks-2.1.1.jar.desired.sha1
  8. +1 −1 lib/ant/vizant.jar.desired.sha1
  9. +1 −1 lib/fjbg.jar.desired.sha1
  10. +1 −1 lib/forkjoin.jar.desired.sha1
  11. +1 −1 lib/jline.jar.desired.sha1
  12. +1 −1 lib/msil.jar.desired.sha1
  13. +1 −0 lib/scala-compiler-src.jar.desired.sha1
  14. +1 −1 lib/scala-compiler.jar.desired.sha1
  15. +1 −1 lib/scala-library-src.jar.desired.sha1
  16. +1 −1 lib/scala-library.jar.desired.sha1
  17. +1 −0 lib/scala-reflect-src.jar.desired.sha1
  18. +1 −1 lib/scala-reflect.jar.desired.sha1
  19. +41 −239 project/Build.scala
  20. +129 −0 project/Packaging.scala
  21. +21 −6 project/Release.scala
  22. +53 −0 project/RemoteDependencies.scala
  23. +0 −3 project/Sametest.scala
  24. +18 −17 project/ScalaBuildKeys.scala
  25. +21 −0 project/ScalaToolRunner.scala
  26. +49 −21 project/ShaResolve.scala
  27. +41 −0 project/Testing.scala
  28. +1 −0 src/actors-migration/scala/actors/Pattern.scala
  29. +1 −0 src/actors-migration/scala/actors/StashingActor.scala
  30. +1 −0 src/actors-migration/scala/actors/Timeout.scala
  31. +2 −1 src/actors/scala/actors/AbstractActor.scala
  32. +1 −2 src/actors/scala/actors/Actor.scala
  33. +2 −1 src/actors/scala/actors/CanReply.scala
  34. +2 −0 src/actors/scala/actors/Combinators.scala
  35. +1 −1 src/actors/scala/actors/MQueue.scala
  36. +1 −0 src/actors/scala/actors/Reactor.scala
  37. +2 −2 src/build/maven/scala-library-pom.xml
  38. +1 −1 src/compiler/scala/reflect/{makro → macros}/runtime/AbortMacroException.scala
  39. +1 −1 src/compiler/scala/reflect/{makro → macros}/runtime/Aliases.scala
  40. +1 −1 src/compiler/scala/reflect/{makro → macros}/runtime/CapturedVariables.scala
  41. +3 −4 src/compiler/scala/reflect/{makro → macros}/runtime/Context.scala
  42. +1 −2 src/compiler/scala/reflect/{makro → macros}/runtime/Enclosures.scala
  43. +1 −1 src/compiler/scala/reflect/{makro → macros}/runtime/Evals.scala
  44. +2 −2 src/compiler/scala/reflect/{makro → macros}/runtime/ExprUtils.scala
  45. +1 −1 src/compiler/scala/reflect/{makro → macros}/runtime/Exprs.scala
  46. +1 −1 src/compiler/scala/reflect/{makro → macros}/runtime/FrontEnds.scala
  47. +1 −1 src/compiler/scala/reflect/{makro → macros}/runtime/Infrastructure.scala
  48. +1 −1 src/compiler/scala/reflect/{makro → macros}/runtime/Names.scala
  49. +1 −1 src/compiler/scala/reflect/{makro → macros}/runtime/Parsers.scala
  50. +1 −1 src/compiler/scala/reflect/{makro → macros}/runtime/Reifiers.scala
  51. +1 −1 src/compiler/scala/reflect/{makro → macros}/runtime/Settings.scala
  52. +1 −1 src/compiler/scala/reflect/{makro → macros}/runtime/Traces.scala
  53. +1 −1 src/compiler/scala/reflect/{makro → macros}/runtime/TypeTags.scala
  54. +13 −20 src/compiler/scala/reflect/{makro → macros}/runtime/Typers.scala
  55. +1 −1 src/compiler/scala/reflect/{makro → macros}/util/Traces.scala
  56. +0 −26 src/compiler/scala/reflect/makro/runtime/ContextReifiers.scala
  57. +0 −40 src/compiler/scala/reflect/makro/runtime/Mirrors.scala
  58. +2 −7 src/compiler/scala/reflect/reify/Errors.scala
  59. +3 −17 src/compiler/scala/reflect/reify/Reifier.scala
  60. +32 −33 src/compiler/scala/reflect/reify/Taggers.scala
  61. +36 −8 src/compiler/scala/reflect/reify/codegen/GenSymbols.scala
  62. +4 −6 src/compiler/scala/reflect/reify/codegen/GenTrees.scala
  63. +9 −13 src/compiler/scala/reflect/reify/codegen/GenTypes.scala
  64. +3 −4 src/compiler/scala/reflect/reify/package.scala
  65. +5 −27 src/compiler/scala/reflect/reify/utils/Extractors.scala
  66. +3 −38 src/compiler/scala/reflect/reify/utils/NodePrinters.scala
  67. +1 −1 src/compiler/scala/tools/ant/FastScalac.scala
  68. +1 −1 src/compiler/scala/tools/ant/Scalac.scala
  69. +29 −8 src/compiler/scala/tools/ant/Scaladoc.scala
  70. +0 −1 src/compiler/scala/tools/cmd/CommandLine.scala
  71. +2 −2 src/compiler/scala/tools/cmd/FromString.scala
  72. +4 −0 src/compiler/scala/tools/cmd/package.scala
  73. +1 −1 src/compiler/scala/tools/nsc/CompileServer.scala
  74. +4 −2 src/compiler/scala/tools/nsc/Driver.scala
  75. +12 −9 src/compiler/scala/tools/nsc/Global.scala
  76. +2 −4 src/compiler/scala/tools/nsc/Main.scala
  77. +48 −0 src/compiler/scala/tools/nsc/MainBench.scala
  78. +1 −1 src/compiler/scala/tools/nsc/ObjectRunner.scala
  79. +2 −1 src/compiler/scala/tools/nsc/ScalaDoc.scala
  80. +1 −1 src/compiler/scala/tools/nsc/ScriptRunner.scala
  81. +53 −36 src/compiler/scala/tools/nsc/ast/DocComments.scala
  82. +1 −1 src/compiler/scala/tools/nsc/ast/NodePrinters.scala
  83. +3 −3 src/compiler/scala/tools/nsc/ast/{TreePrinters.scala → Printers.scala}
  84. +1 −1 src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala
  85. +9 −14 src/compiler/scala/tools/nsc/ast/TreeGen.scala
  86. +7 −6 src/compiler/scala/tools/nsc/ast/Trees.scala
  87. +19 −3 src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
  88. +5 −1 src/compiler/scala/tools/nsc/ast/parser/Scanners.scala
  89. +1 −1 src/compiler/scala/tools/nsc/backend/JavaPlatform.scala
  90. +85 −36 src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
  91. +121 −31 src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala
  92. +7 −5 src/compiler/scala/tools/nsc/backend/icode/Repository.scala
  93. +60 −116 src/compiler/scala/tools/nsc/backend/icode/analysis/TypeFlowAnalysis.scala
  94. +3,332 −3,287 src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
  95. +11 −5 src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
  96. +25 −1 src/compiler/scala/tools/nsc/backend/opt/DeadCodeElimination.scala
  97. +345 −167 src/compiler/scala/tools/nsc/backend/opt/Inliners.scala
  98. +11 −8 src/compiler/scala/tools/nsc/doc/DocFactory.scala
  99. +103 −16 src/compiler/scala/tools/nsc/doc/Settings.scala
  100. +22 −3 src/compiler/scala/tools/nsc/doc/html/HtmlFactory.scala
  101. +44 −19 src/compiler/scala/tools/nsc/doc/html/HtmlPage.scala
  102. +32 −24 src/compiler/scala/tools/nsc/doc/html/Page.scala
  103. +5 −3 src/compiler/scala/tools/nsc/doc/html/page/Index.scala
  104. +6 −10 src/compiler/scala/tools/nsc/doc/html/page/IndexScript.scala
  105. +1 −1 src/compiler/scala/tools/nsc/doc/html/page/ReferenceIndex.scala
  106. +179 −90 src/compiler/scala/tools/nsc/doc/html/page/Template.scala
  107. +53 −0 src/compiler/scala/tools/nsc/doc/html/page/diagram/DiagramGenerator.scala
  108. +66 −0 src/compiler/scala/tools/nsc/doc/html/page/diagram/DiagramStats.scala
  109. +511 −0 src/compiler/scala/tools/nsc/doc/html/page/diagram/DotDiagramGenerator.scala
  110. +228 −0 src/compiler/scala/tools/nsc/doc/html/page/diagram/DotRunner.scala
  111. BIN src/compiler/scala/tools/nsc/doc/html/resource/lib/class_diagram.png
  112. +143 −0 src/compiler/scala/tools/nsc/doc/html/resource/lib/diagrams.css
  113. +324 −0 src/compiler/scala/tools/nsc/doc/html/resource/lib/diagrams.js
  114. +25 −23 src/compiler/scala/tools/nsc/doc/html/resource/lib/index.js
  115. +4 −0 src/compiler/scala/tools/nsc/doc/html/resource/lib/modernizr.custom.js
  116. BIN src/compiler/scala/tools/nsc/doc/html/resource/lib/object_diagram.png
  117. BIN src/compiler/scala/tools/nsc/doc/html/resource/lib/object_to_type_big.png
  118. +10 −0 src/compiler/scala/tools/nsc/doc/html/resource/lib/raphael-min.js
  119. +32 −11 src/compiler/scala/tools/nsc/doc/html/resource/lib/template.css
  120. +111 −42 src/compiler/scala/tools/nsc/doc/html/resource/lib/template.js
  121. BIN src/compiler/scala/tools/nsc/doc/html/resource/lib/trait_diagram.png
  122. BIN src/compiler/scala/tools/nsc/doc/html/resource/lib/type.png
  123. BIN src/compiler/scala/tools/nsc/doc/html/resource/lib/type_big.png
  124. BIN src/compiler/scala/tools/nsc/doc/html/resource/lib/type_diagram.png
  125. BIN src/compiler/scala/tools/nsc/doc/html/resource/lib/type_to_object_big.png
  126. +158 −52 src/compiler/scala/tools/nsc/doc/model/Entity.scala
  127. +1 −7 src/compiler/scala/tools/nsc/doc/model/IndexModelFactory.scala
  128. +24 −0 src/compiler/scala/tools/nsc/doc/model/LinkTo.scala
  129. +187 −0 src/compiler/scala/tools/nsc/doc/model/MemberLookup.scala
  130. +701 −356 src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala
  131. +198 −107 src/compiler/scala/tools/nsc/doc/model/ModelFactoryImplicitSupport.scala
  132. +323 −0 src/compiler/scala/tools/nsc/doc/model/ModelFactoryTypeSupport.scala
  133. +1 −1 src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala
  134. +1 −3 src/compiler/scala/tools/nsc/doc/model/TypeEntity.scala
  135. +5 −2 src/compiler/scala/tools/nsc/doc/model/comment/Body.scala
  136. +18 −0 src/compiler/scala/tools/nsc/doc/model/comment/Comment.scala
  137. +146 −81 src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala
  138. +146 −0 src/compiler/scala/tools/nsc/doc/model/diagram/Diagram.scala
  139. +262 −0 src/compiler/scala/tools/nsc/doc/model/diagram/DiagramDirectiveParser.scala
  140. +256 −0 src/compiler/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala
  141. +14 −1 src/compiler/scala/tools/nsc/interactive/CompilerControl.scala
  142. +29 −12 src/compiler/scala/tools/nsc/interactive/Global.scala
  143. +1 −1 src/compiler/scala/tools/nsc/interactive/PresentationCompilerThread.scala
  144. +9 −4 src/compiler/scala/tools/nsc/interactive/REPL.scala
  145. +21 −27 src/compiler/scala/tools/nsc/interactive/RangePositions.scala
  146. +9 −3 src/compiler/scala/tools/nsc/interactive/ScratchPadMaker.scala
  147. +9 −5 src/compiler/scala/tools/nsc/interactive/tests/InteractiveTest.scala
  148. +6 −3 src/compiler/scala/tools/nsc/interactive/tests/InteractiveTestSettings.scala
  149. +6 −3 src/compiler/scala/tools/nsc/interactive/tests/core/PresentationCompilerInstance.scala
  150. +1 −1 src/compiler/scala/tools/nsc/interpreter/ILoop.scala
  151. +1 −1 src/compiler/scala/tools/nsc/interpreter/ILoopInit.scala
  152. +3 −3 src/compiler/scala/tools/nsc/interpreter/IMain.scala
  153. +1 −1 src/compiler/scala/tools/nsc/interpreter/Imports.scala
  154. +4 −4 src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala
  155. +3 −2 src/compiler/scala/tools/nsc/interpreter/MemberHandlers.scala
  156. +2 −2 src/compiler/scala/tools/nsc/interpreter/Power.scala
  157. +3 −1 src/compiler/scala/tools/nsc/interpreter/ReplConfig.scala
  158. +1 −2 src/compiler/scala/tools/nsc/interpreter/TypeStrings.scala
  159. +2 −1 src/compiler/scala/tools/nsc/javac/JavaParsers.scala
  160. +3 −3 src/compiler/scala/tools/nsc/javac/JavaScanners.scala
  161. +1 −1 src/compiler/scala/tools/nsc/matching/MatchSupport.scala
  162. +1 −1 src/compiler/scala/tools/nsc/matching/Patterns.scala
  163. +0 −55 src/compiler/scala/tools/nsc/scratchpad/Executor.scala
  164. +98 −0 src/compiler/scala/tools/nsc/scratchpad/Mixer.scala
  165. +2 −3 src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
  166. +3 −1 src/compiler/scala/tools/nsc/settings/StandardScalaSettings.scala
  167. +11 −3 src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala
  168. +33 −14 src/compiler/scala/tools/nsc/symtab/SymbolLoaders.scala
  169. +39 −25 src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
  170. +2 −2 src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala
  171. +8 −10 src/compiler/scala/tools/nsc/symtab/clr/TypeParser.scala
  172. +152 −40 src/compiler/scala/tools/nsc/transform/CleanUp.scala
  173. +6 −3 src/compiler/scala/tools/nsc/transform/Constructors.scala
  174. +66 −24 src/compiler/scala/tools/nsc/transform/Erasure.scala
  175. +32 −29 src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
  176. +13 −4 src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala
  177. +55 −30 src/compiler/scala/tools/nsc/transform/LambdaLift.scala
  178. +6 −3 src/compiler/scala/tools/nsc/transform/PostErasure.scala
  179. +101 −26 src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
  180. +15 −6 src/compiler/scala/tools/nsc/transform/TailCalls.scala
  181. +40 −32 src/compiler/scala/tools/nsc/transform/UnCurry.scala
  182. +4 −3 src/compiler/scala/tools/nsc/typechecker/Analyzer.scala
  183. +15 −7 src/compiler/scala/tools/nsc/typechecker/ContextErrors.scala
  184. +23 −11 src/compiler/scala/tools/nsc/typechecker/Contexts.scala
  185. +19 −10 src/compiler/scala/tools/nsc/typechecker/Duplicators.scala
  186. +18 −7 src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala
  187. +201 −129 src/compiler/scala/tools/nsc/typechecker/Implicits.scala
  188. +169 −59 src/compiler/scala/tools/nsc/typechecker/Infer.scala
  189. +41 −67 src/compiler/scala/tools/nsc/typechecker/Macros.scala
  190. +2 −5 src/compiler/scala/tools/nsc/typechecker/MethodSynthesis.scala
  191. +58 −83 src/compiler/scala/tools/nsc/typechecker/Namers.scala
  192. +13 −2 src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
  193. +834 −412 src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
  194. +18 −8 src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
  195. +1 −1 src/compiler/scala/tools/nsc/typechecker/StdAttachments.scala
  196. +21 −0 src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala
  197. +2 −2 src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala
  198. +1 −1 src/compiler/scala/tools/nsc/typechecker/Tags.scala
  199. +2 −2 src/compiler/scala/tools/nsc/typechecker/TreeCheckers.scala
  200. +5 −1 src/compiler/scala/tools/nsc/typechecker/TypeDiagnostics.scala
  201. +333 −180 src/compiler/scala/tools/nsc/typechecker/Typers.scala
  202. +63 −77 src/compiler/scala/tools/nsc/typechecker/Unapplies.scala
  203. +6 −0 src/compiler/scala/tools/nsc/util/DocStrings.scala
  204. +14 −2 src/compiler/scala/tools/nsc/util/InterruptReq.scala
  205. +0 −200 src/compiler/scala/tools/nsc/util/Statistics.scala
  206. +38 −0 src/compiler/scala/tools/nsc/util/StatisticsInfo.scala
  207. +6 −1 src/compiler/scala/tools/nsc/util/WorkScheduler.scala
  208. +4 −5 src/compiler/scala/tools/reflect/FastTrack.scala
  209. +149 −0 src/compiler/scala/tools/reflect/MacroImplementations.scala
  210. +6 −3 src/compiler/scala/tools/{nsc → reflect}/ReflectGlobal.scala
  211. +8 −4 src/compiler/scala/tools/{nsc → reflect}/ReflectMain.scala
  212. +5 −2 src/compiler/scala/tools/{nsc → reflect}/ReflectSetup.scala
  213. +36 −20 src/compiler/scala/tools/reflect/StdTags.scala
  214. +30 −24 src/compiler/scala/tools/reflect/ToolBox.scala
  215. +75 −50 src/compiler/scala/tools/reflect/ToolBoxFactory.scala
  216. +1 −1 src/compiler/scala/tools/util/PathResolver.scala
  217. +2 −1 src/compiler/scala/tools/util/VerifyClass.scala
  218. +3 −1 src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala
  219. +1 −1 src/continuations/plugin/scala/tools/selectivecps/CPSUtils.scala
  220. +6 −6 src/continuations/plugin/scala/tools/selectivecps/SelectiveANFTransform.scala
  221. +52 −0 src/eclipse/README.md
  222. +6 −0 src/eclipse/asm/.classpath
  223. +29 −0 src/eclipse/asm/.project
  224. +7 −0 src/eclipse/fjbg/.classpath
  225. +13 −1 project.SAMPLE → src/eclipse/fjbg/.project
  226. +14 −0 src/eclipse/partest/.classpath
  227. +35 −0 src/eclipse/partest/.project
  228. +7 −0 src/eclipse/reflect/.classpath
  229. +30 −0 src/eclipse/reflect/.project
  230. +13 −0 src/eclipse/scala-compiler/.classpath
  231. +35 −0 src/eclipse/scala-compiler/.project
  232. +7 −0 src/eclipse/scala-library/.classpath
  233. +30 −0 src/eclipse/scala-library/.project
  234. +12 −0 src/eclipse/scalap/.classpath
  235. +35 −0 src/eclipse/scalap/.project
  236. +6 −5 src/intellij/README
  237. +2 −2 src/intellij/actors.iml.SAMPLE
  238. +12 −0 src/intellij/asm.iml.SAMPLE
  239. +6 −2 src/intellij/compiler.iml.SAMPLE
  240. +12 −0 src/intellij/fjbg.iml.SAMPLE
  241. +12 −0 src/intellij/forkjoin.iml.SAMPLE
  242. +3 −3 src/intellij/library.iml.SAMPLE
  243. +1 −1 src/intellij/manual.iml.SAMPLE
  244. +24 −0 src/intellij/msil.iml.SAMPLE
  245. +3 −3 src/intellij/partest.iml.SAMPLE
  246. +3 −3 src/intellij/reflect.iml.SAMPLE
  247. +13 −17 src/intellij/scala-lang.ipr.SAMPLE
  248. +2 −1 src/intellij/scalap.iml.SAMPLE
  249. +1 −1 src/intellij/swing.iml.SAMPLE
  250. +7 −3 src/intellij/test.iml.SAMPLE
  251. +1 −0 src/library-aux/scala/AnyRef.scala
  252. +2 −2 src/library/scala/Array.scala
  253. +0 −3 src/library/scala/Double.scala
  254. +5 −2 src/library/scala/Enumeration.scala
  255. +0 −3 src/library/scala/Float.scala
  256. +4 −4 src/library/scala/Option.scala
  257. +34 −26 src/library/scala/Predef.scala
  258. +22 −38 src/library/scala/StringContext.scala
  259. +2 −3 src/library/scala/{ → annotation}/cloneable.scala
  260. +20 −0 src/library/scala/annotation/static.scala
  261. +2 −2 src/library/scala/collection/DefaultMap.scala
  262. +0 −9 src/library/scala/collection/GenTraversableLike.scala
  263. +20 −0 src/library/scala/collection/GenTraversableOnce.scala
  264. +1 −1 src/library/scala/collection/IterableViewLike.scala
  265. +3 −0 src/library/scala/collection/Iterator.scala
  266. +1 −0 src/library/scala/collection/Map.scala
  267. +20 −16 src/library/scala/collection/MapLike.scala
  268. +1 −1 src/library/scala/collection/SeqLike.scala
  269. +1 −1 src/library/scala/collection/SeqViewLike.scala
  270. +18 −1 src/library/scala/collection/SortedMap.scala
  271. +23 −0 src/library/scala/collection/SortedMapLike.scala
  272. +8 −0 src/library/scala/collection/TraversableLike.scala
  273. +13 −4 src/library/scala/collection/TraversableOnce.scala
  274. +1 −1 src/library/scala/collection/TraversableViewLike.scala
  275. +9 −5 src/library/scala/collection/concurrent/TrieMap.scala
  276. +2 −1 src/library/scala/collection/convert/Wrappers.scala
  277. +19 −17 src/library/scala/collection/generic/{FromRepr.scala → IsTraversableLike.scala}
  278. +62 −0 src/library/scala/collection/generic/IsTraversableOnce.scala
  279. +1 −7 src/library/scala/collection/generic/package.scala
  280. +1 −2 src/library/scala/collection/immutable/HashMap.scala
  281. +1 −2 src/library/scala/collection/immutable/HashSet.scala
Sorry, we could not display the entire diff because too many files (1,298) changed.
View
4 META-INF/MANIFEST.MF
@@ -40,9 +40,13 @@ Export-Package:
scala.tools.nsc.util,
scala.tools.util,
scala.reflect.internal,
+ scala.reflect.internal.pickling,
scala.reflect.internal.settings,
+ scala.reflect.internal.util,
+ scala.reflect.makro,
scala.reflect.runtime,
scala.reflect.internal.transform,
+ scala.reflect.api,
ch.epfl.lamp.compiler.msil,
ch.epfl.lamp.compiler.msil.emit,
ch.epfl.lamp.compiler.msil.util,
View
388 build.xml
@@ -55,6 +55,18 @@ END-USER TARGETS
</antcall>
</target>
+
+ <target name="partialdist" depends="dist.partial"
+ description="Makes a new distribution without documentation, so just for testing."/>
+
+ <target name="partialdist-opt"
+ description="Makes a new optimised distribution without testing it or removing partially build elements.">
+ <antcall target="partialdist">
+ <param name="scalac.args.optimise" value="-optimise"/>
+ </antcall>
+ </target>
+
+
<target name="fastdist" depends="dist.done"
description="Makes a new distribution without testing it or removing partially build elements."/>
@@ -104,6 +116,12 @@ END-USER TARGETS
<antcall target="test.done"/>
</target>
+ <target name="replacestarrwin-opt"
+ description="Creates a new Starr on Windows. Manually execute 'ant locker.clean build' first!">
+ <antcall target="replacestarrwin">
+ <param name="scalac.args.optimise" value="-optimise"/>
+ </antcall>
+ </target>
<target name="replacelocker"
description="Replaces the Locker compiler and library by fresh ones built from current sources.">
<antcall target="palo.clean"/>
@@ -123,10 +141,30 @@ END-USER TARGETS
<antcall target="palo.done"/>
</target>
- <target name="fastlocker"
+ <target name="fastlocker.lib"
+ description="Buildlocker without extra fuss">
+ <property name="fastlocker" value="true"/>
+ <antcall target="locker.unlock"/>
+ <antcall target="locker.lib"/>
+ </target>
+
+ <target name="fastlocker.reflect"
+ description="Buildlocker without extra fuss">
+ <property name="fastlocker" value="true"/>
+ <antcall target="locker.unlock"/>
+ <antcall target="locker.reflect"/>
+ </target>
+
+ <target name="fastlocker.comp"
description="Buildlocker without extra fuss">
+ <property name="fastlocker" value="true"/>
<antcall target="locker.unlock"/>
- <antcall target="locker.done"/>
+ <antcall target="locker.comp"/>
+ </target>
+
+ <target name="fastlocker"
+ description="Buildlocker without extra fuss">
+ <antcall target="fastlocker.comp"/>
</target>
<target name="buildlocker"
@@ -242,7 +280,7 @@ INITIALISATION
<!-- Resolve maven dependencies -->
<target name="init.maven.jars" depends="init.maven.tasks">
<artifact:dependencies pathId="dependency.classpath" filesetId="dependency.fileset">
- <dependency groupId="com.typesafe" artifactId="config" version="0.4.0"/>
+ <!--<dependency groupId="com.typesafe" artifactId="config" version="0.4.0"/>-->
</artifact:dependencies>
</target>
@@ -334,17 +372,32 @@ INITIALISATION
<target name="init.version.done" depends="init.version.release, init.version.snapshot"/>
<target name="init.testjava6">
- <fail message="This build requires JDK 1.6">
- <condition>
- <not>
+ <condition property="has.java6">
<equals arg1="${ant.java.version}" arg2="1.6"/>
- </not>
</condition>
- </fail>
+ <condition property="has.java7">
+ <equals arg1="${ant.java.version}" arg2="1.7"/>
+ </condition>
+ <condition property="has.unsupported.jdk">
+ <not><or>
+ <isset property="has.java7" />
+ <isset property="has.java6" />
+ </or></not>
+ </condition>
+ </target>
+
+ <target name="init.fail.bad.jdk" depends="init.testjava6">
+ <fail if="has.unsupported.jdk"
+ message="JDK ${ant.java.version} is not supported by this build!"/>
+ </target>
+ <target name="init.warn.jdk7" depends="init.testjava6" if="has.java7">
+ <echo level="warning"> You are using JDK7 for this build. While this will be able to build most of Scala, it will
+ not build the Swing project. You will be unable to create a distribution.
+ </echo>
</target>
- <target name="init" depends="init.jars, init.maven.jars, init.version.done">
- <property name="scalac.args.always" value="" />
+ <target name="init" depends="init.jars, init.maven.jars, init.version.done, init.fail.bad.jdk, init.warn.jdk7">
+ <property name="scalac.args.always" value="-Yreify-copypaste" />
<!-- scalac.args.optimise is selectively overridden in certain antcall tasks. -->
<property name="scalac.args.optimise" value=""/>
<!-- scalac.args.quickonly are added to quick.* targets but not others (particularly, locker.)
@@ -446,7 +499,7 @@ LOCAL DEPENDENCY (Adapted ASM)
destdir="${build-asm.dir}/classes"
classpath="${build-asm.dir}/classes"
includes="**/*.java"
- target="1.5" source="1.5">
+ target="1.6" source="1.5">
<compilerarg line="${javac.args} -XDignore.symbol.file"/>
</javac>
<touch file="${build-asm.dir}/asm.complete" verbose="no"/>
@@ -467,7 +520,7 @@ LOCAL DEPENDENCY (Adapted ASM)
<!-- ===========================================================================
LOCAL DEPENDENCY (FORKJOIN)
============================================================================ -->
- <target name="forkjoin.start" depends="init, init.testjava6">
+ <target name="forkjoin.start" depends="init">
<uptodate property="forkjoin.available" targetfile="${build-libs.dir}/forkjoin.complete">
<srcfiles dir="${src.dir}/forkjoin">
<include name="**/*.java"/>
@@ -477,6 +530,7 @@ LOCAL DEPENDENCY (FORKJOIN)
</target>
<target name="forkjoin.lib" depends="forkjoin.start" unless="forkjoin.available">
+ <stopwatch name="forkjoin.lib.timer"/>
<mkdir dir="${build-libs.dir}/classes/forkjoin"/>
<javac
fork="yes"
@@ -486,10 +540,11 @@ LOCAL DEPENDENCY (FORKJOIN)
classpath="${build-libs.dir}/classes/forkjoin"
includes="**/*.java"
debug="true"
- target="1.5" source="1.5">
+ target="1.6" source="1.5">
<compilerarg line="${javac.args} -XDignore.symbol.file"/>
</javac>
<touch file="${build-libs.dir}/forkjoin.complete" verbose="no"/>
+ <stopwatch name="forkjoin.lib.timer" action="total"/>
</target>
<target name="forkjoin.pack" depends="forkjoin.lib">
@@ -524,17 +579,19 @@ LOCAL DEPENDENCY (FJBG)
</target>
<target name="fjbg.lib" depends="fjbg.init" unless="fjbg.available">
+ <stopwatch name="fjbg.lib.timer" />
<mkdir dir="${build-libs.dir}/classes/fjbg"/>
<javac
srcdir="${src.dir}/fjbg"
destdir="${build-libs.dir}/classes/fjbg"
classpath="${build-libs.dir}/classes/fjbg"
includes="**/*.java"
debug="true"
- target="1.5" source="1.4">
+ target="1.6" source="1.4">
<compilerarg line="${javac.args} -XDignore.symbol.file"/>
</javac>
<touch file="${build-libs.dir}/fjbg.complete" verbose="no"/>
+ <stopwatch name="fjbg.lib.timer" action="total"/>
</target>
<target name="fjbg.pack" depends="fjbg.lib">
@@ -578,7 +635,7 @@ LOCAL REFERENCE BUILD (LOCKER)
srcdir="${src.dir}/library"
destdir="${build-locker.dir}/classes/library"
includes="**/*.java"
- target="1.5" source="1.5">
+ target="1.6" source="1.5">
<compilerarg line="${javac.args} -XDignore.symbol.file"/>
<classpath>
<path refid="forkjoin.classpath"/>
@@ -677,33 +734,43 @@ LOCAL REFERENCE BUILD (LOCKER)
<target name="locker.comp" depends="locker.pre-comp" if="locker.comp.needed">
<stopwatch name="locker.comp.timer"/>
<mkdir dir="${build-locker.dir}/classes/compiler"/>
- <!-- Compile MSIL inside of locker.... -->
- <javac
- srcdir="${src.dir}/msil"
- destdir="${build-locker.dir}/classes/compiler"
- classpath="${build-locker.dir}/classes/compiler"
- includes="**/*.java"
- excludes="**/tests/**"
- debug="true"
- target="1.5" source="1.4">
- <compilerarg line="${javac.args}"/>
- </javac>
- <scalacfork
- destdir="${build-locker.dir}/classes/compiler"
- compilerpathref="starr.classpath"
- params="${scalac.args.all}"
- srcdir="${src.dir}/msil"
- jvmargs="${scalacfork.jvmargs}">
- <include name="**/*.scala"/>
- <compilationpath>
- <pathelement location="${build-locker.dir}/classes/library"/>
- <pathelement location="${build-locker.dir}/classes/reflect"/>
- <pathelement location="${build-locker.dir}/classes/compiler"/>
- <path refid="fjbg.classpath"/>
- <path refid="aux.libs"/>
- <pathelement location="${jline.jar}"/>
- </compilationpath>
- </scalacfork>
+ <if>
+ <equals arg1="${fastlocker}" arg2="true" />
+ <then>
+ <!-- Fastlocker build: don't compile MSIL, use its starr version.... -->
+ <property name="locker.comp.msil" value="${msil.starr.jar}"/>
+ </then>
+ <else>
+ <!-- Regular build: Compile MSIL inside of locker.... -->
+ <javac
+ srcdir="${src.dir}/msil"
+ destdir="${build-locker.dir}/classes/compiler"
+ classpath="${build-locker.dir}/classes/compiler"
+ includes="**/*.java"
+ excludes="**/tests/**"
+ debug="true"
+ target="1.6" source="1.4">
+ <compilerarg line="${javac.args}"/>
+ </javac>
+ <scalacfork
+ destdir="${build-locker.dir}/classes/compiler"
+ compilerpathref="starr.classpath"
+ params="${scalac.args.all}"
+ srcdir="${src.dir}/msil"
+ jvmargs="${scalacfork.jvmargs}">
+ <include name="**/*.scala"/>
+ <compilationpath>
+ <pathelement location="${build-locker.dir}/classes/library"/>
+ <pathelement location="${build-locker.dir}/classes/reflect"/>
+ <pathelement location="${build-locker.dir}/classes/compiler"/>
+ <path refid="fjbg.classpath"/>
+ <path refid="aux.libs"/>
+ <pathelement location="${jline.jar}"/>
+ </compilationpath>
+ </scalacfork>
+ <property name="locker.comp.msil" value="${build-locker.dir}/classes/compiler"/>
+ </else>
+ </if>
<scalacfork
destdir="${build-locker.dir}/classes/compiler"
compilerpathref="starr.classpath"
@@ -718,6 +785,7 @@ LOCAL REFERENCE BUILD (LOCKER)
<path refid="fjbg.classpath"/>
<path refid="aux.libs"/>
<path refid="asm.classpath"/>
+ <pathelement location="${locker.comp.msil}" />
<pathelement location="${jline.jar}"/>
</compilationpath>
</scalacfork>
@@ -941,7 +1009,7 @@ QUICK BUILD (QUICK)
srcdir="${src.dir}/library"
destdir="${build-quick.dir}/classes/library"
includes="**/*.java"
- target="1.5" source="1.5">
+ target="1.6" source="1.5">
<compilerarg line="${javac.args} -XDignore.symbol.file"/>
<classpath>
<path refid="forkjoin.classpath"/>
@@ -952,7 +1020,7 @@ QUICK BUILD (QUICK)
srcdir="${src.dir}/actors"
destdir="${build-quick.dir}/classes/library"
includes="**/*.java"
- target="1.5" source="1.5">
+ target="1.6" source="1.5">
<compilerarg line="${javac.args}"/>
<classpath>
<path refid="forkjoin.classpath"/>
@@ -978,15 +1046,6 @@ QUICK BUILD (QUICK)
<include name="**/*.scala"/>
<compilationpath refid="quick.compilation.path"/>
</scalacfork>
- <scalacfork
- destdir="${build-quick.dir}/classes/library"
- compilerpathref="locker.classpath"
- params="${scalac.args.quick}"
- srcdir="${src.dir}/swing"
- jvmargs="${scalacfork.jvmargs}">
- <include name="**/*.scala"/>
- <compilationpath refid="quick.compilation.path"/>
- </scalacfork>
<propertyfile file="${build-quick.dir}/classes/library/library.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="maven.version.number" value="${maven.version.number}"/>
@@ -1001,12 +1060,26 @@ QUICK BUILD (QUICK)
<include name="**/*.css"/>
</fileset>
</copy>
- <touch file="${build-quick.dir}/library.complete" verbose="no"/>
- <stopwatch name="quick.lib.timer" action="total"/>
</target>
+ <target name="quick.swing" depends="quick.lib" if="has.java6" unless="quick.lib.available">
+ <scalacfork
+ destdir="${build-quick.dir}/classes/library"
+ compilerpathref="locker.classpath"
+ params="${scalac.args.quick}"
+ srcdir="${src.dir}/swing"
+ jvmargs="${scalacfork.jvmargs}">
+ <include name="**/*.scala"/>
+ <compilationpath refid="quick.compilation.path"/>
+ </scalacfork>
+ </target>
+
+ <target name="quick.lib.done" depends="quick.swing, quick.lib">
+ <stopwatch name="quick.lib.timer" action="total"/>
+ <touch file="${build-quick.dir}/library.complete" verbose="no"/>
+ </target>
- <target name="quick.pre-reflect" depends="quick.lib">
+ <target name="quick.pre-reflect" depends="quick.lib.done">
<uptodate property="quick.reflect.available" targetfile="${build-quick.dir}/reflect.complete">
<srcfiles dir="${src.dir}">
<include name="reflect/**"/>
@@ -1072,12 +1145,12 @@ QUICK BUILD (QUICK)
includes="**/*.java"
excludes="**/tests/**"
debug="true"
- target="1.5" source="1.4">
+ target="1.6" source="1.4">
<compilerarg line="${javac.args}"/>
</javac>
<scalacfork
destdir="${build-quick.dir}/classes/compiler"
- compilerpathref="starr.classpath"
+ compilerpathref="locker.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/msil"
jvmargs="${scalacfork.jvmargs}">
@@ -1221,7 +1294,7 @@ QUICK BUILD (QUICK)
<scalacfork
destdir="${build-quick.dir}/classes/scalacheck"
compilerpathref="quick.classpath"
- params="${scalac.args.quick}"
+ params="${scalac.args.quick} -nowarn"
srcdir="${src.dir}/scalacheck"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
@@ -1264,7 +1337,7 @@ QUICK BUILD (QUICK)
<stopwatch name="quick.scalap.timer" action="total"/>
</target>
- <target name="quick.pre-partest" depends="quick.scalap">
+ <target name="quick.pre-partest" depends="quick.scalap, asm.done">
<uptodate property="quick.partest.available" targetfile="${build-quick.dir}/partest.complete">
<srcfiles dir="${src.dir}/partest"/>
</uptodate>
@@ -1276,13 +1349,14 @@ QUICK BUILD (QUICK)
<javac
srcdir="${src.dir}/partest"
destdir="${build-quick.dir}/classes/partest"
- target="1.5" source="1.5">
+ target="1.6" source="1.5">
<classpath>
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/reflect"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<pathelement location="${build-quick.dir}/classes/scalap"/>
<pathelement location="${build-quick.dir}/classes/partest"/>
+ <path refid="asm.classpath"/>
</classpath>
<include name="**/*.java"/>
<compilerarg line="${javac.args}"/>
@@ -1334,6 +1408,7 @@ QUICK BUILD (QUICK)
<path refid="forkjoin.classpath"/>
<path refid="fjbg.classpath"/>
<path refid="aux.libs"/>
+ <path refid="asm.classpath"/>
<pathelement location="${jline.jar}"/>
</path>
<taskdef name="quick-bin" classname="scala.tools.ant.ScalaTool" classpathref="quick.bin.classpath"/>
@@ -1412,11 +1487,6 @@ PACKED QUICK BUILD (PACK)
</fileset>
<fileset dir="${build-libs.dir}/classes/forkjoin"/>
</jar>
- <jar destfile="${build-pack.dir}/lib/scala-swing.jar">
- <fileset dir="${build-quick.dir}/classes/library">
- <include name="scala/swing/**"/>
- </fileset>
- </jar>
<jar destfile="${build-pack.dir}/lib/scala-actors.jar">
<fileset dir="${build-quick.dir}/classes/library">
<include name="scala/actors/**"/>
@@ -1427,7 +1497,15 @@ PACKED QUICK BUILD (PACK)
</jar>
</target>
- <target name="pack.pre-reflect" depends="pack.lib">
+ <target name="pack.swing" depends="pack.lib" if="has.java6">
+ <jar destfile="${build-pack.dir}/lib/scala-swing.jar">
+ <fileset dir="${build-quick.dir}/classes/library">
+ <include name="scala/swing/**"/>
+ </fileset>
+ </jar>
+ </target>
+
+ <target name="pack.pre-reflect" depends="pack.lib, pack.swing">
<uptodate
property="pack.reflect.available"
targetfile="${build-pack.dir}/lib/scala-reflect.jar"
@@ -1498,7 +1576,14 @@ PACKED QUICK BUILD (PACK)
<target name="pack.partest" depends="pack.pre-partest" unless="pack.partest.available">
<mkdir dir="${build-pack.dir}/lib"/>
<jar destfile="${build-pack.dir}/lib/scala-partest.jar">
- <fileset dir="${build-quick.dir}/classes/partest"/>
+ <fileset dir="${build-quick.dir}/classes/partest">
+ <exclude name="scala/tools/partest/javaagent/**"/>
+ </fileset>
+ </jar>
+ <jar destfile="${build-pack.dir}/lib/scala-partest-javaagent.jar" manifest="${src.dir}/partest/scala/tools/partest/javaagent/MANIFEST.MF">
+ <fileset dir="${build-quick.dir}/classes/partest">
+ <include name="scala/tools/partest/javaagent/**"/>
+ </fileset>
</jar>
</target>
@@ -1606,7 +1691,7 @@ BOOTSTRAPPING BUILD (STRAP)
srcdir="${src.dir}/library"
destdir="${build-strap.dir}/classes/library"
includes="**/*.java"
- target="1.5" source="1.5">
+ target="1.6" source="1.5">
<compilerarg line="${javac.args} -XDignore.symbol.file"/>
<classpath>
<path refid="forkjoin.classpath"/>
@@ -1617,7 +1702,7 @@ BOOTSTRAPPING BUILD (STRAP)
srcdir="${src.dir}/actors"
destdir="${build-strap.dir}/classes/library"
includes="**/*.java"
- target="1.5" source="1.5">
+ target="1.6" source="1.5">
<compilerarg line="${javac.args}"/>
<classpath>
<path refid="forkjoin.classpath"/>
@@ -1643,15 +1728,6 @@ BOOTSTRAPPING BUILD (STRAP)
<include name="**/*.scala"/>
<compilationpath refid="strap.compilation.path"/>
</scalacfork>
- <scalacfork
- destdir="${build-strap.dir}/classes/library"
- compilerpathref="pack.classpath"
- params="${scalac.args.quick}"
- srcdir="${src.dir}/swing"
- jvmargs="${scalacfork.jvmargs}">
- <include name="**/*.scala"/>
- <compilationpath refid="strap.compilation.path"/>
- </scalacfork>
<propertyfile file="${build-strap.dir}/classes/library/library.properties">
<entry key="version.number" value="${version.number}"/>
<entry key="maven.version.number" value="${maven.version.number}"/>
@@ -1666,11 +1742,26 @@ BOOTSTRAPPING BUILD (STRAP)
<include name="**/*.css"/>
</fileset>
</copy>
+ </target>
+
+ <target name="strap.swing" if="has.java6" unless="strap.lib.available" depends="strap.lib">
+ <scalacfork
+ destdir="${build-strap.dir}/classes/library"
+ compilerpathref="pack.classpath"
+ params="${scalac.args.quick}"
+ srcdir="${src.dir}/swing"
+ jvmargs="${scalacfork.jvmargs}">
+ <include name="**/*.scala"/>
+ <compilationpath refid="strap.compilation.path"/>
+ </scalacfork>
+ </target>
+
+ <target name="strap.lib.done" depends="strap.swing, strap.lib">
<touch file="${build-strap.dir}/library.complete" verbose="no"/>
<stopwatch name="strap.lib.timer" action="total"/>
</target>
- <target name="strap.pre-reflect" depends="strap.lib">
+ <target name="strap.pre-reflect" depends="strap.lib.done">
<uptodate property="strap.reflect.available" targetfile="${build-strap.dir}/reflect.complete">
<srcfiles dir="${src.dir}/reflect"/>
</uptodate>
@@ -1735,12 +1826,12 @@ BOOTSTRAPPING BUILD (STRAP)
includes="**/*.java"
excludes="**/tests/**"
debug="true"
- target="1.5" source="1.4">
+ target="1.6" source="1.4">
<compilerarg line="${javac.args}"/>
</javac>
<scalacfork
destdir="${build-strap.dir}/classes/compiler"
- compilerpathref="starr.classpath"
+ compilerpathref="pack.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/msil"
jvmargs="${scalacfork.jvmargs}">
@@ -1851,7 +1942,7 @@ BOOTSTRAPPING BUILD (STRAP)
<scalacfork
destdir="${build-strap.dir}/classes/scalacheck"
compilerpathref="pack.classpath"
- params="${scalac.args.quick}"
+ params="${scalac.args.quick} -nowarn"
srcdir="${src.dir}/scalacheck"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
@@ -1891,7 +1982,7 @@ BOOTSTRAPPING BUILD (STRAP)
<stopwatch name="strap.scalap.timer" action="total"/>
</target>
- <target name="strap.pre-partest" depends="strap.scalap">
+ <target name="strap.pre-partest" depends="strap.scalap, asm.done">
<uptodate property="strap.partest.available" targetfile="${build-strap.dir}/partest.complete">
<srcfiles dir="${src.dir}/partest"/>
</uptodate>
@@ -1903,13 +1994,14 @@ BOOTSTRAPPING BUILD (STRAP)
<javac
srcdir="${src.dir}/partest"
destdir="${build-strap.dir}/classes/partest"
- target="1.5" source="1.5">
+ target="1.6" source="1.5">
<classpath>
<pathelement location="${build-strap.dir}/classes/library"/>
<pathelement location="${build-strap.dir}/classes/reflect"/>
<pathelement location="${build-strap.dir}/classes/compiler"/>
<pathelement location="${build-strap.dir}/classes/scalap"/>
<pathelement location="${build-strap.dir}/classes/partest"/>
+ <path refid="asm.classpath"/>
</classpath>
<include name="**/*.java"/>
<compilerarg line="${javac.args}"/>
@@ -1929,6 +2021,7 @@ BOOTSTRAPPING BUILD (STRAP)
<pathelement location="${build-strap.dir}/classes/partest"/>
<pathelement location="${ant.jar}"/>
<path refid="forkjoin.classpath"/>
+ <path refid="asm.classpath"/>
<pathelement location="${scalacheck.jar}"/>
</compilationpath>
</scalacfork>
@@ -1951,7 +2044,7 @@ BOOTSTRAPPING BUILD (STRAP)
LIBRARIES (Forkjoin, FJBG, ASM)
============================================================================ -->
-
+
<target name="libs.clean" depends="pack.clean, asm.clean">
<delete dir="${build-libs.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
@@ -1988,6 +2081,10 @@ DOCUMENTATION
<!-- Compute the URL and show it -->
<property name="scaladoc.url" value="https://github.com/scala/scala/tree/${scaladoc.git.commit}/src"/>
<echo message="Scaladoc will point to ${scaladoc.url} for source files."/>
+
+ <!-- Unless set with -Dscaladoc.<...>, these won't be activated -->
+ <property name="scaladoc.raw.output" value="no"/>
+ <property name="scaladoc.no.prefixes" value="no"/>
</target>
<target name="docs.pre-lib" depends="docs.start">
@@ -2015,7 +2112,11 @@ DOCUMENTATION
classpathref="pack.classpath"
addparams="${scalac.args.all}"
docRootContent="${src.dir}/library/rootdoc.txt"
- implicits="on" diagrams="on">
+ implicits="on"
+ diagrams="on"
+ groups="on"
+ rawOutput="${scaladoc.raw.output}"
+ noPrefixes="${scaladoc.no.prefixes}">
<src>
<files includes="${src.dir}/actors-migration"/>
<files includes="${src.dir}/actors"/>
@@ -2099,7 +2200,11 @@ DOCUMENTATION
srcdir="${src.dir}/compiler"
docRootContent="${src.dir}/compiler/rootdoc.txt"
addparams="${scalac.args.all}"
- implicits="on" diagrams="on">
+ implicits="on"
+ diagrams="on"
+ groups="on"
+ rawOutput="${scaladoc.raw.output}"
+ noPrefixes="${scaladoc.no.prefixes}">
<include name="**/*.scala"/>
</scaladoc>
<touch file="${build-docs.dir}/compiler.complete" verbose="no"/>
@@ -2121,7 +2226,11 @@ DOCUMENTATION
classpathref="pack.classpath"
srcdir="${src.dir}/jline/src/main/java"
addparams="${scalac.args.all}"
- implicits="on" diagrams="on">
+ implicits="on"
+ diagrams="on"
+ groups="on"
+ rawOutput="${scaladoc.raw.output}"
+ noPrefixes="${scaladoc.no.prefixes}">
<include name="**/*.scala"/>
<include name="**/*.java"/>
</scaladoc>
@@ -2145,7 +2254,11 @@ DOCUMENTATION
classpathref="pack.classpath"
srcdir="${src.dir}/scalap"
addparams="${scalac.args.all}"
- implicits="on" diagrams="on">
+ implicits="on"
+ diagrams="on"
+ groups="on"
+ rawOutput="${scaladoc.raw.output}"
+ noPrefixes="${scaladoc.no.prefixes}">
<include name="**/*.scala"/>
</scaladoc>
<touch file="${build-docs.dir}/scalap.complete" verbose="no"/>
@@ -2167,7 +2280,11 @@ DOCUMENTATION
classpathref="pack.classpath"
srcdir="${src.dir}/partest"
addparams="${scalac.args.all}"
- implicits="on" diagrams="on">
+ implicits="on"
+ diagrams="on"
+ groups="on"
+ rawOutput="${scaladoc.raw.output}"
+ noPrefixes="${scaladoc.no.prefixes}">
<include name="**/*.scala"/>
</scaladoc>
<touch file="${build-docs.dir}/partest.complete" verbose="no"/>
@@ -2189,7 +2306,11 @@ DOCUMENTATION
classpathref="pack.classpath"
srcdir="${src.dir}/continuations/plugin"
addparams="${scalac.args.all}"
- implicits="on" diagrams="on">
+ implicits="on"
+ diagrams="on"
+ groups="on"
+ rawOutput="${scaladoc.raw.output}"
+ noPrefixes="${scaladoc.no.prefixes}">
<include name="**/*.scala"/>
</scaladoc>
<touch file="${build-docs.dir}/continuations-plugin.complete" verbose="no"/>
@@ -2211,7 +2332,11 @@ DOCUMENTATION
classpathref="pack.classpath"
srcdir="${src.dir}/actors-migration"
addparams="${scalac.args.all}"
- implicits="on" diagrams="on">
+ implicits="on"
+ diagrams="on"
+ groups="on"
+ rawOutput="${scaladoc.raw.output}"
+ noPrefixes="${scaladoc.no.prefixes}">
<include name="**/*.scala"/>
</scaladoc>
<touch file="${build-docs.dir}/actors-migration.complete" verbose="no"/>
@@ -2307,6 +2432,9 @@ BOOTRAPING TEST AND TEST SUITE
<specializedtests dir="${partest.dir}/${partest.srcdir}/specialized">
<include name="*.scala"/>
</specializedtests>
+ <instrumentedtests dir="${partest.dir}/${partest.srcdir}/instrumented">
+ <include name="*.scala"/>
+ </instrumentedtests>
<presentationtests dir="${partest.dir}/${partest.srcdir}/presentation">
<include name="*/*.scala"/>
</presentationtests>
@@ -2348,7 +2476,7 @@ BOOTRAPING TEST AND TEST SUITE
DISTRIBUTION
============================================================================ -->
- <target name="dist.start" depends="docs.done, pack.done">
+ <target name="dist.start" depends="pack.done">
<property name="dist.name" value="scala-${version.number}"/>
<property name="dist.dir" value="${dists.dir}/${dist.name}"/>
</target>
@@ -2373,7 +2501,7 @@ DISTRIBUTION
</copy>
</target>
- <target name="dist.doc" depends="dist.base">
+ <target name="dist.doc" depends="dist.base, docs.done">
<mkdir dir="${dist.dir}/doc/scala-devel-docs"/>
<copy file="${docs.dir}/LICENSE" toDir="${dist.dir}/doc"/>
<copy file="${docs.dir}/README" toDir="${dist.dir}/doc"/>
@@ -2432,19 +2560,21 @@ DISTRIBUTION
</jar>
</target>
- <target name="dist.latest.unix" depends="dist.src" unless="os.win">
+ <target name="dist.latest.unix" depends="dist.base" unless="os.win">
<symlink link="${dists.dir}/latest" resource="${dist.name}" overwrite="yes"/>
</target>
- <target name="dist.latest.win" depends="dist.src" if="os.win">
+ <target name="dist.latest.win" depends="dist.base" if="os.win">
<copy todir="${dists.dir}/latest">
<fileset dir="${dist.dir}"/>
</copy>
</target>
<target name="dist.latest" depends="dist.latest.unix,dist.latest.win"/>
- <target name="dist.done" depends="dist.latest"/>
+ <target name="dist.partial" depends="dist.base, dist.latest"/>
+
+ <target name="dist.done" depends="dist.latest, dist.src"/>
<target name="dist.clean">
<delete dir="${dists.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
@@ -2483,65 +2613,53 @@ STABLE REFERENCE (STARR)
<delete file="${basedir}/lib/scala-reflect.jar"/>
<delete file="${basedir}/lib/scala-compiler.jar"/>
<delete file="${basedir}/lib/scala-library-src.jar"/>
+ <delete file="${basedir}/lib/scala-reflect-src.jar"/>
+ <delete file="${basedir}/lib/scala-compiler-src.jar"/>
</target>
- <target name="starr.lib" depends="starr.start">
- <jar destfile="${basedir}/lib/scala-library.jar">
- <fileset dir="${basedir}/build/quick/classes/library"/>
- </jar>
- </target>
-
- <target name="starr.reflect" depends="starr.lib">
- <jar destfile="${basedir}/lib/scala-reflect.jar">
- <fileset dir="${basedir}/build/quick/classes/reflect"/>
- </jar>
- </target>
-
- <target name="starr.comp" depends="starr.reflect">
- <jar destfile="${basedir}/lib/scala-compiler.jar">
- <fileset dir="${basedir}/build/quick/classes/compiler"/>
- </jar>
+ <target name="starr.jars" depends="starr.start">
+ <copy toDir="${basedir}/lib/" overwrite="yes">
+ <fileset dir="${build-pack.dir}/lib">
+ <include name="scala-library.jar"/>
+ <include name="scala-reflect.jar"/>
+ <include name="scala-compiler.jar"/>
+ </fileset>
+ </copy>
</target>
- <target name="starr.src" depends="starr.comp">
+ <target name="starr.src" depends="starr.jars">
<jar destfile="${basedir}/lib/scala-library-src.jar">
<fileset dir="${basedir}/src/library"/>
<fileset dir="${basedir}/src/swing"/>
<fileset dir="${basedir}/src/actors"/>
+ <fileset dir="${basedir}/src/forkjoin"/>
+ </jar>
+ <jar destfile="${basedir}/lib/scala-reflect-src.jar">
+ <fileset dir="${basedir}/src/reflect"/>
+ </jar>
+ <jar destfile="${basedir}/lib/scala-compiler-src.jar">
+ <fileset dir="${basedir}/src/compiler"/>
+ <fileset dir="${basedir}/src/asm"/>
+ <fileset dir="${basedir}/src/fjbg"/>
+ <fileset dir="${basedir}/src/msil"/>
</jar>
</target>
- <target name="starr.libs" depends="starr.src, forkjoin.done, fjbg.done">
- <!-- TODO - Do we even *need* this in starr? -->
- <copy toDir="${lib.dir}" overwrite="yes">
- <fileset dir="${build-libs.dir}">
- <include name="fjbg.jar"/>
- <include name="forkjoin.jar"/>
- </fileset>
- </copy>
- <!-- remove SHA1 files for no starr, so we don't loose artifacts. -->
- <delete>
- <fileset dir="${lib.dir}">
- <include name="fjbg.jar.desired.sha1"/>
- <include name="msil.jar.desired.sha1"/>
- <include name="forkjoin.jar.desired.sha1"/>
- </fileset>
- </delete>
- </target>
-
- <target name="starr.removesha1" depends="starr.libs">
+ <target name="starr.removesha1" depends="starr.src">
<!-- remove SHA1 files for no starr, so we don't loose artifacts. -->
<delete>
<fileset dir="${lib.dir}">
<include name="scala-compiler.jar.desired.sha1"/>
<include name="scala-reflect.jar.desired.sha1"/>
<include name="scala-library.jar.desired.sha1"/>
<include name="scala-library-src.jar.desired.sha1"/>
+ <include name="scala-reflect-src.jar.desired.sha1"/>
+ <include name="scala-compiler-src.jar.desired.sha1"/>
</fileset>
</delete>
</target>
- <target name="starr.done" depends="starr.libs, starr.removesha1"/>
+ <target name="starr.done" depends="starr.jars, starr.removesha1"/>
<!-- ===========================================================================
FORWARDED TARGETS FOR PACKAGING
View
12 classpath.SAMPLE
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/compiler"/>
- <classpathentry kind="con" path="org.scala-ide.sdt.launching.SCALA_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="lib/msil.jar"/>
- <classpathentry kind="lib" path="lib/jline.jar"/>
- <classpathentry kind="lib" path="lib/fjbg.jar"/>
- <classpathentry kind="lib" path="lib/forkjoin.jar"/>
- <classpathentry kind="lib" path="lib/ant/ant.jar"/>
- <classpathentry kind="output" path="build/quick/classes/compiler"/>
-</classpath>
View
2 lib/ant/ant-contrib.jar.desired.sha1
@@ -1 +1 @@
-943cd5c8802b2a3a64a010efb86ec19bac142e40 ?ant-contrib.jar
+943cd5c8802b2a3a64a010efb86ec19bac142e40 *ant-contrib.jar
View
2 lib/ant/ant-dotnet-1.0.jar.desired.sha1
@@ -1 +1 @@
-3fc1e35ca8c991fc3488548f7a276bd9053c179d ?ant-dotnet-1.0.jar
+3fc1e35ca8c991fc3488548f7a276bd9053c179d *ant-dotnet-1.0.jar
View
2 lib/ant/ant.jar.desired.sha1
@@ -1 +1 @@
-7b456ca6b93900f96e58cc8371f03d90a9c1c8d1 ?ant.jar
+7b456ca6b93900f96e58cc8371f03d90a9c1c8d1 *ant.jar
View
2 lib/ant/maven-ant-tasks-2.1.1.jar.desired.sha1
@@ -1 +1 @@
-7e50e3e227d834695f1e0bf018a7326e06ee4c86 ?maven-ant-tasks-2.1.1.jar
+7e50e3e227d834695f1e0bf018a7326e06ee4c86 *maven-ant-tasks-2.1.1.jar
View
2 lib/ant/vizant.jar.desired.sha1
@@ -1 +1 @@
-2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b ?vizant.jar
+2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b *vizant.jar
View
2 lib/fjbg.jar.desired.sha1
@@ -1 +1 @@
-c3f9b576c91cb9761932ad936ccc4a71f33d2ef2 ?fjbg.jar
+8acc87f222210b4a5eb2675477602fc1759e7684 *fjbg.jar
View
2 lib/forkjoin.jar.desired.sha1
@@ -1 +1 @@
-b5baf94dff8d3ca991d44a59add7bcbf6640379b ?forkjoin.jar
+f93a2525b5616d3a4bee7848fabbb2856b56f653 *forkjoin.jar
View
2 lib/jline.jar.desired.sha1
@@ -1 +1 @@
-a5261e70728c1847639e2b47d953441d0b217bcb ?jline.jar
+a5261e70728c1847639e2b47d953441d0b217bcb *jline.jar
View
2 lib/msil.jar.desired.sha1
@@ -1 +1 @@
-d48cb950ceded82a5e0ffae8ef2c68d0923ed00c ?msil.jar
+d48cb950ceded82a5e0ffae8ef2c68d0923ed00c *msil.jar
View
1 lib/scala-compiler-src.jar.desired.sha1
@@ -0,0 +1 @@
+67257bb7ce010e2ceac800d737e202cfbfc2a1f6 ?scala-compiler-src.jar
View
2 lib/scala-compiler.jar.desired.sha1
@@ -1 +1 @@
-a6cc9171d15cc36297bf2a93d8bd0bcc7c601eaa ?scala-compiler.jar
+c52277de9e76187f34a5ae073e5d2aacc592ac50 ?scala-compiler.jar
View
2 lib/scala-library-src.jar.desired.sha1
@@ -1 +1 @@
-7db4c7523f0e268ce58de2ab4ae6a3dd0e903f43 ?scala-library-src.jar
+40b9c97e0c3abea4c460b73ca178f60a3bfea242 ?scala-library-src.jar
View
2 lib/scala-library.jar.desired.sha1
@@ -1 +1 @@
-81f424c3b2d8ba2c061d65003b90096e83efddf4 ?scala-library.jar
+0a8e0e39e1e6713323a2e659aab743ccfa57c071 ?scala-library.jar
View
1 lib/scala-reflect-src.jar.desired.sha1
@@ -0,0 +1 @@
+d1abf389fbf5dfc95889a181d28f94a6779c6165 ?scala-reflect-src.jar
View
2 lib/scala-reflect.jar.desired.sha1
@@ -1 +1 @@
-3749c7d17e1f85b27d962dac524db57584e78c45 ?scala-reflect.jar
+02b44e860b9b9abd1353bbaa1004b3f0004dd0b3 ?scala-reflect.jar
View
280 project/Build.scala
@@ -1,12 +1,11 @@
import sbt._
import Keys._
import partest._
-import SameTest._
import ScalaBuildKeys._
+import Release._
-
-object ScalaBuild extends Build with Layers {
+object ScalaBuild extends Build with Layers with Packaging with Testing {
// Build wide settings:
override lazy val settings = super.settings ++ Versions.settings ++ Seq(
@@ -21,36 +20,13 @@ object ScalaBuild extends Build with Layers {
),
organization := "org.scala-lang",
version <<= Versions.mavenVersion,
- pomExtra := epflPomExtra,
- commands += Command.command("fix-uri-projects") { (state: State) =>
- if(state.get(buildFixed) getOrElse false) state
- else {
- // TODO -fix up scalacheck's dependencies!
- val extracted = Project.extract(state)
- import extracted._
- def fix(s: Setting[_]): Setting[_] = s match {
- case ScopedExternalSetting(`scalacheck`, scalaInstance.key, setting) => fullQuickScalaReference mapKey Project.mapScope(_ => s.key.scope)
- case s => s
- }
- val transformed = session.mergeSettings map ( s => fix(s) )
- val scopes = transformed collect { case ScopedExternalSetting(`scalacheck`, _, s) => s.key.scope } toSet
- // Create some fixers so we don't download scala or rely on it.
- val fixers = for { scope <- scopes
- setting <- Seq(autoScalaLibrary := false, crossPaths := false)
- } yield setting mapKey Project.mapScope(_ => scope)
- val newStructure = Load.reapply(transformed ++ fixers, structure)
- Project.setProject(session, newStructure, state).put(buildFixed, true)
- }
- },
- onLoad in Global <<= (onLoad in Global) apply (_ andThen { (state: State) =>
- "fix-uri-projects" :: state
- })
- )
+ pomExtra := epflPomExtra
+ )
// Collections of projects to run 'compile' on.
- lazy val compiledProjects = Seq(quickLib, quickComp, continuationsLibrary, actors, swing, forkjoin, fjbg)
+ lazy val compiledProjects = Seq(quickLib, quickComp, continuationsLibrary, actors, actorsMigration, swing, forkjoin, fjbg)
// Collection of projects to 'package' and 'publish' together.
- lazy val packagedBinaryProjects = Seq(scalaLibrary, scalaCompiler, swing, continuationsPlugin, jline, scalap)
+ lazy val packagedBinaryProjects = Seq(scalaLibrary, scalaCompiler, swing, actors, actorsMigration, continuationsPlugin, jline, scalap)
lazy val partestRunProjects = Seq(testsuite, continuationsTestsuite)
private def epflPomExtra = (
@@ -110,7 +86,6 @@ object ScalaBuild extends Build with Layers {
},
// TODO - Make exported products == makeDist so we can use this when creating a *real* distribution.
commands += Release.pushStarr
- //commands += Release.setStarrHome
)
// Note: Root project is determined by lowest-alphabetical project that has baseDirectory as file("."). we use aaa_ to 'win'.
lazy val aaa_root = Project("scala", file(".")) settings(projectSettings: _*) settings(ShaResolve.settings: _*)
@@ -123,6 +98,11 @@ object ScalaBuild extends Build with Layers {
)
)
+ def fixArtifactSrc(dir: File, name: String) = name match {
+ case x if x startsWith "scala-" => dir / "src" / (name drop 6)
+ case x => dir / "src" / name
+ }
+
// These are setting overrides for most artifacts in the Scala build file.
def settingOverrides: Seq[Setting[_]] = publishSettings ++ Seq(
crossPaths := false,
@@ -134,9 +114,8 @@ object ScalaBuild extends Build with Layers {
target <<= (baseDirectory, name) apply (_ / "target" / _),
(classDirectory in Compile) <<= target(_ / "classes"),
javacOptions ++= Seq("-target", "1.5", "-source", "1.5"),
- scalaSource in Compile <<= (baseDirectory, name) apply (_ / "src" / _),
- javaSource in Compile <<= (baseDirectory, name) apply (_ / "src" / _),
- autoScalaLibrary := false,
+ scalaSource in Compile <<= (baseDirectory, name) apply fixArtifactSrc,
+ javaSource in Compile <<= (baseDirectory, name) apply fixArtifactSrc,
unmanagedJars in Compile := Seq(),
// Most libs in the compiler use this order to build.
compileOrder in Compile := CompileOrder.JavaThenScala,
@@ -187,6 +166,7 @@ object ScalaBuild extends Build with Layers {
// Reference to quick scala instance.
lazy val quickScalaInstance = makeScalaReference("quick", quickLib, quickReflect, quickComp)
def quickScalaLibraryDependency = unmanagedClasspath in Compile <++= (exportedProducts in quickLib in Compile).identity
+ def quickScalaReflectDependency = unmanagedClasspath in Compile <++= (exportedProducts in quickReflect in Compile).identity
def quickScalaCompilerDependency = unmanagedClasspath in Compile <++= (exportedProducts in quickComp in Compile).identity
// Strapp is used to test binary 'sameness' between things built with locker and things built with quick.
@@ -222,17 +202,18 @@ object ScalaBuild extends Build with Layers {
}
// TODO - in sabbus, these all use locker to build... I think tihs way is better, but let's farm this idea around.
- // TODO - Actors + swing separate jars...
lazy val dependentProjectSettings = settingOverrides ++ Seq(quickScalaInstance, quickScalaLibraryDependency, addCheaterDependency("scala-library"))
- lazy val actors = Project("actors", file(".")) settings(dependentProjectSettings:_*) dependsOn(forkjoin % "provided")
- // TODO - Remove actors dependency from pom...
- lazy val swing = Project("swing", file(".")) settings(dependentProjectSettings:_*) dependsOn(actors % "provided")
+ lazy val actors = Project("scala-actors", file(".")) settings(dependentProjectSettings:_*) dependsOn(forkjoin % "provided")
+ lazy val swing = Project("scala-swing", file(".")) settings(dependentProjectSettings:_*) dependsOn(actors % "provided")
+ lazy val actorsMigration = Project("scala-actors-migration", file(".")) settings(dependentProjectSettings:_*) dependsOn(actors % "provided")
// This project will generate man pages (in man1 and html) for scala.
lazy val manmakerSettings: Seq[Setting[_]] = dependentProjectSettings :+ externalDeps
lazy val manmaker = Project("manual", file(".")) settings(manmakerSettings:_*)
// Things that compile against the compiler.
- lazy val compilerDependentProjectSettings = dependentProjectSettings ++ Seq(quickScalaCompilerDependency, addCheaterDependency("scala-compiler"))
+ lazy val compilerDependentProjectSettings = dependentProjectSettings ++ Seq(quickScalaReflectDependency, quickScalaCompilerDependency, addCheaterDependency("scala-compiler"))
+
+ lazy val scalacheck = Project("scalacheck", file(".")) settings(compilerDependentProjectSettings:_*) dependsOn(actors % "provided")
lazy val partestSettings = compilerDependentProjectSettings :+ externalDeps
lazy val partest = Project("partest", file(".")) settings(partestSettings:_*) dependsOn(actors,forkjoin,scalap)
lazy val scalapSettings = compilerDependentProjectSettings ++ Seq(
@@ -267,7 +248,7 @@ object ScalaBuild extends Build with Layers {
// --------------------------------------------------------------
val allSubpathsCopy = (dir: File) => (dir.*** --- dir) x (relativeTo(dir)|flat)
def productTaskToMapping(products : Seq[File]) = products flatMap { p => allSubpathsCopy(p) }
- lazy val packageScalaLibBinTask = Seq(quickLib, continuationsLibrary, forkjoin, actors).map(p => products in p in Compile).join.map(_.flatten).map(productTaskToMapping)
+ lazy val packageScalaLibBinTask = Seq(quickLib, continuationsLibrary, forkjoin).map(p => products in p in Compile).join.map(_.flatten).map(productTaskToMapping)
lazy val scalaLibArtifactSettings: Seq[Setting[_]] = inConfig(Compile)(Defaults.packageTasks(packageBin, packageScalaLibBinTask)) ++ Seq(
name := "scala-library",
crossPaths := false,
@@ -282,14 +263,13 @@ object ScalaBuild extends Build with Layers {
)
lazy val scalaLibrary = Project("scala-library", file(".")) settings(publishSettings:_*) settings(scalaLibArtifactSettings:_*)
- // TODO - Real Reflect instance
-
// --------------------------------------------------------------
- // Real Compiler Artifact
+ // Real Reflect Artifact
// --------------------------------------------------------------
- lazy val packageScalaBinTask = Seq(quickComp, fjbg, asm).map(p => products in p in Compile).join.map(_.flatten).map(productTaskToMapping)
- lazy val scalaBinArtifactSettings : Seq[Setting[_]] = inConfig(Compile)(Defaults.packageTasks(packageBin, packageScalaBinTask)) ++ Seq(
- name := "scala-compiler",
+
+ lazy val packageScalaReflect = Seq(quickReflect).map(p => products in p in Compile).join.map(_.flatten).map(productTaskToMapping)
+ lazy val scalaReflectArtifactSettings : Seq[Setting[_]] = inConfig(Compile)(Defaults.packageTasks(packageBin, packageScalaReflect)) ++ Seq(
+ name := "scala-reflect",
crossPaths := false,
exportJars := true,
autoScalaLibrary := false,
@@ -298,52 +278,33 @@ object ScalaBuild extends Build with Layers {
quickScalaInstance,
target <<= (baseDirectory, name) apply (_ / "target" / _)
)
- lazy val scalaCompiler = Project("scala-compiler", file(".")) settings(publishSettings:_*) settings(scalaBinArtifactSettings:_*) dependsOn(scalaLibrary)
- lazy val fullQuickScalaReference = makeScalaReference("pack", scalaLibrary, quickReflect, scalaCompiler)
+ lazy val scalaReflect = Project("scala-reflect", file(".")) settings(publishSettings:_*) settings(scalaReflectArtifactSettings:_*) dependsOn(scalaLibrary)
+
// --------------------------------------------------------------
- // Testing
+ // Real Compiler Artifact
// --------------------------------------------------------------
- /* lazy val scalacheckSettings: Seq[Setting[_]] = Seq(fullQuickScalaReference, crossPaths := false)*/
- lazy val scalacheck = uri("git://github.com/jsuereth/scalacheck.git#scala-build")
-
- lazy val testsuiteSettings: Seq[Setting[_]] = compilerDependentProjectSettings ++ partestTaskSettings ++ VerifyClassLoad.settings ++ Seq(
- unmanagedBase <<= baseDirectory / "test/files/lib",
- fullClasspath in VerifyClassLoad.checkClassLoad <<= (fullClasspath in scalaLibrary in Runtime).identity,
+ lazy val packageScalaBinTask = Seq(quickComp, fjbg, asm).map(p => products in p in Compile).join.map(_.flatten).map(productTaskToMapping)
+ lazy val scalaBinArtifactSettings : Seq[Setting[_]] = inConfig(Compile)(Defaults.packageTasks(packageBin, packageScalaBinTask)) ++ Seq(
+ name := "scala-compiler",
+ crossPaths := false,
+ exportJars := true,
autoScalaLibrary := false,
- checkSameLibrary <<= checkSameBinaryProjects(quickLib, strappLib),
- checkSameCompiler <<= checkSameBinaryProjects(quickComp, strappComp),
- checkSame <<= (checkSameLibrary, checkSameCompiler) map ((a,b) => ()),
- autoScalaLibrary := false
- )
- lazy val continuationsTestsuiteSettings: Seq[Setting[_]] = testsuiteSettings ++ Seq(
- scalacOptions in Test <++= (exportedProducts in Compile in continuationsPlugin) map {
- case Seq(cpDir) => Seq("-Xplugin-require:continuations", "-P:continuations:enable", "-Xplugin:"+cpDir.data.getAbsolutePath)
- },
- partestDirs <<= baseDirectory apply { bd =>
- def mkFile(name: String) = bd / "test" / "files" / name
- def mkTestType(name: String) = name.drop("continuations-".length).toString
- Seq("continuations-neg", "continuations-run") map (t => mkTestType(t) -> mkFile(t)) toMap
- }
- )
- val testsuite = (
- Project("testsuite", file("."))
- settings (testsuiteSettings:_*)
- dependsOn (swing, scalaLibrary, scalaCompiler, fjbg, partest, scalacheck)
- )
- val continuationsTestsuite = (
- Project("continuations-testsuite", file("."))
- settings (continuationsTestsuiteSettings:_*)
- dependsOn (partest, swing, scalaLibrary, scalaCompiler, fjbg)
+ unmanagedJars in Compile := Seq(),
+ fullClasspath in Runtime <<= (exportedProducts in Compile).identity,
+ quickScalaInstance,
+ target <<= (baseDirectory, name) apply (_ / "target" / _)
)
+ lazy val scalaCompiler = Project("scala-compiler", file(".")) settings(publishSettings:_*) settings(scalaBinArtifactSettings:_*) dependsOn(scalaReflect)
+ lazy val fullQuickScalaReference = makeScalaReference("pack", scalaLibrary, scalaReflect, scalaCompiler)
+
// --------------------------------------------------------------
// Generating Documentation.
// --------------------------------------------------------------
// TODO - Migrate this into the dist project.
// Scaladocs
- def distScalaInstance = makeScalaReference("dist", scalaLibrary, quickReflect, scalaCompiler)
lazy val documentationSettings: Seq[Setting[_]] = dependentProjectSettings ++ Seq(
// TODO - Make these work for realz.
defaultExcludes in unmanagedSources in Compile := ((".*" - ".") || HiddenFileFilter ||
@@ -373,163 +334,4 @@ object ScalaBuild extends Build with Layers {
settings (documentationSettings: _*)
dependsOn(quickLib, quickComp, actors, fjbg, forkjoin, swing, continuationsLibrary)
)
-
- // --------------------------------------------------------------
- // Packaging a distro
- // --------------------------------------------------------------
-
- class ScalaToolRunner(classpath: Classpath) {
- // TODO - Don't use the ant task directly...
- lazy val classLoader = new java.net.URLClassLoader(classpath.map(_.data.toURI.toURL).toArray, null)
- lazy val mainClass = classLoader.loadClass("scala.tools.ant.ScalaTool")
- lazy val executeMethod = mainClass.getMethod("execute")
- lazy val setFileMethod = mainClass.getMethod("setFile", classOf[java.io.File])
- lazy val setClassMethod = mainClass.getMethod("setClass", classOf[String])
- lazy val setClasspathMethod = mainClass.getMethod("setClassPath", classOf[String])
- lazy val instance = mainClass.newInstance()
-
- def setClass(cls: String): Unit = setClassMethod.invoke(instance, cls)
- def setFile(file: File): Unit = setFileMethod.invoke(instance, file)
- def setClasspath(cp: String): Unit = setClasspathMethod.invoke(instance, cp)
- def execute(): Unit = executeMethod.invoke(instance)
- }
-
- def genBinTask(
- runner: ScopedTask[ScalaToolRunner],
- outputDir: ScopedSetting[File],
- classpath: ScopedTask[Classpath],
- useClasspath: Boolean
- ): Project.Initialize[sbt.Task[Map[File,String]]] = {
- (runner, outputDir, classpath, streams) map { (runner, outDir, cp, s) =>
- IO.createDirectory(outDir)
- val classToFilename = Map(
- "scala.tools.nsc.MainGenericRunner" -> "scala",
- "scala.tools.nsc.Main" -> "scalac",
- "scala.tools.nsc.ScalaDoc" -> "scaladoc",
- "scala.tools.nsc.CompileClient" -> "fsc",
- "scala.tools.scalap.Main" -> "scalap"
- )
- if (useClasspath) {
- val classpath = Build.data(cp).map(_.getCanonicalPath).distinct.mkString(",")
- s.log.debug("Setting classpath = " + classpath)
- runner setClasspath classpath
- }
- def genBinFiles(cls: String, dest: File) = {
- runner.setClass(cls)
- runner.setFile(dest)
- runner.execute()
- // TODO - Mark generated files as executable (755 or a+x) that is *not* JDK6 specific...
- dest.setExecutable(true)
- }
- def makeBinMappings(cls: String, binName: String): Map[File,String] = {
- val file = outDir / binName
- val winBinName = binName + ".bat"
- genBinFiles(cls, file)
- Map( file -> ("bin/"+binName), outDir / winBinName -> ("bin/"+winBinName) )
- }
- classToFilename.flatMap((makeBinMappings _).tupled).toMap
- }
- }
- def runManmakerTask(classpath: ScopedTask[Classpath], scalaRun: ScopedTask[ScalaRun], mainClass: String, dir: String, ext: String): Project.Initialize[Task[Map[File,String]]] =
- (classpath, scalaRun, streams, target) map { (cp, runner, s, target) =>
- val binaries = Seq("fsc", "scala", "scalac", "scaladoc", "scalap")
- binaries map { bin =>
- val file = target / "man" / dir / (bin + ext)
- val classname = "scala.man1." + bin
- IO.createDirectory(file.getParentFile)
- toError(runner.run(mainClass, Build.data(cp), Seq(classname, file.getAbsolutePath), s.log))
- file -> ("man/" + dir + "/" + bin + ext)
- } toMap
- }
-
- val genBinRunner = TaskKey[ScalaToolRunner]("gen-bin-runner",
- "Creates a utility to generate script files for Scala.")
- val genBin = TaskKey[Map[File,String]]("gen-bin",
- "Creates script files for Scala distribution.")
- val binDir = SettingKey[File]("binaries-directory",
- "Directory where binary scripts will be located.")
- val genBinQuick = TaskKey[Map[File,String]]("gen-quick-bin",
- "Creates script files for testing against current Scala build classfiles (not local dist).")
- val runManmakerMan = TaskKey[Map[File,String]]("make-man",
- "Runs the man maker project to generate man pages")
- val runManmakerHtml = TaskKey[Map[File,String]]("make-html",
- "Runs the man maker project to generate html pages")
-
- lazy val scalaDistSettings: Seq[Setting[_]] = Seq(
- crossPaths := false,
- target <<= (baseDirectory, name) apply (_ / "target" / _),
- scalaSource in Compile <<= (baseDirectory, name) apply (_ / "src" / _),
- autoScalaLibrary := false,
- unmanagedJars in Compile := Seq(),
- genBinRunner <<= (fullClasspath in quickComp in Runtime) map (new ScalaToolRunner(_)),
- binDir <<= target(_/"bin"),
- genBin <<= genBinTask(genBinRunner, binDir, fullClasspath in Runtime, false),
- binDir in genBinQuick <<= baseDirectory apply (_ / "target" / "bin"),
- // Configure the classpath this way to avoid having .jar files and previous layers on the classpath.
- fullClasspath in Runtime in genBinQuick <<= Seq(quickComp,quickLib,scalap,actors,swing,fjbg,jline,forkjoin).map(classDirectory in Compile in _).join.map(Attributed.blankSeq),
- fullClasspath in Runtime in genBinQuick <++= (fullClasspath in Compile in jline),
- genBinQuick <<= genBinTask(genBinRunner, binDir in genBinQuick, fullClasspath in Runtime in genBinQuick, true),
- runManmakerMan <<= runManmakerTask(fullClasspath in Runtime in manmaker, runner in manmaker, "scala.tools.docutil.EmitManPage", "man1", ".1"),
- runManmakerHtml <<= runManmakerTask(fullClasspath in Runtime in manmaker, runner in manmaker, "scala.tools.docutil.EmitHtml", "doc", ".html"),
- // TODO - We could *really* clean this up in many ways. Let's look into making a a Seq of "direct jars" (scalaLibrary, scalaCompiler, jline, scalap)
- // a seq of "plugin jars" (continuationsPlugin) and "binaries" (genBin) and "documentation" mappings (genBin) that this can aggregate.
- // really need to figure out a better way to pull jline + jansi.
- makeDistMappings <<= (genBin,
- runManmakerMan,
- runManmakerHtml,
- packageBin in scalaLibrary in Compile,
- packageBin in scalaCompiler in Compile,
- packageBin in jline in Compile,
- packageBin in continuationsPlugin in Compile,
- managedClasspath in jline in Compile,
- packageBin in scalap in Compile) map {
- (binaries, man, html, lib, comp, jline, continuations, jlineDeps, scalap) =>
- val jlineDepMap: Seq[(File, String)] = jlineDeps.map(_.data).flatMap(_ x Path.flat) map { case(a,b) => a -> ("lib/"+b) }
- binaries ++ man ++ html ++ jlineDepMap ++ Seq(
- lib -> "lib/scala-library.jar",
- comp -> "lib/scala-compiler.jar",
- jline -> "lib/jline.jar",
- continuations -> "misc/scala-devel/plugins/continuations.jar",
- scalap -> "lib/scalap.jar"
- ) toMap
- },
- // Add in some more dependencies
- makeDistMappings <<= (makeDistMappings,
- packageBin in swing in Compile) map {
- (dist, s) =>
- dist ++ Seq(s -> "lib/scala-swing.jar")
- },
- makeDist <<= (makeDistMappings, baseDirectory, streams) map { (maps, dir, s) =>
- s.log.debug("Map = " + maps.mkString("\n"))
- val file = dir / "target" / "scala-dist.zip"
- IO.zip(maps, file)
- s.log.info("Created " + file.getAbsolutePath)
- file
- },
- makeExplodedDist <<= (makeDistMappings, target, streams) map { (maps, dir, s) =>
- def sameFile(f: File, f2: File) = f.getCanonicalPath == f2.getCanonicalPath
- IO.createDirectory(dir)
- IO.copy(for {
- (file, name) <- maps
- val file2 = dir / name
- if !sameFile(file,file2)
- } yield (file, file2))
- // Hack to make binaries be executable. TODO - Fix for JDK 5 and below...
- maps.values filter (_ startsWith "bin/") foreach (dir / _ setExecutable true)
- dir
- }
- )
- lazy val scaladist = (
- Project("dist", file("."))
- settings (scalaDistSettings: _*)