8
8
9
9
10
10
# Modules and stages
11
+ # - TODO: xml is no longer in the bootstrap, so a lot of the complexity described in the following
12
+ # bullets no longer applies.
11
13
# - Each stage (starr, locker quick) builds the modules (if no binary compatible version exists)
12
14
# - The reason is: the compiler POM depends on the xml module of the previous stage, i.e., the
13
15
# locker compiler uses the starr modules. So the locker scaladoc (building the quick compiler)
34
36
35
37
# Specifying module versions. We use release versions for modules.
36
38
# - Module versions are read from the versions.properties file.
37
- # - Set <MODULE>_VER to override the default, e.g. XML_VER ="1.0.4".
39
+ # - Set <MODULE>_VER to override the default, e.g. PARTEST_VER ="1.0.4".
38
40
# - The git revision is set to <MODULE>_REF="v$<MODULE>_VER". Make sure the tag exists (you can't override <MODULE>_REF).
39
41
40
42
@@ -85,46 +87,13 @@ forceBuildModules=${forceBuildModules-no}
85
87
clean="clean" # TESTING leave empty to speed up testing (on jenkins/locally; on travis it's a fresh machine every time)
86
88
87
89
88
- docTask() {
89
- # Build the module docs only in the last (quick) stage. The locker scaladoc may be binary
90
- # incompatible with the starr scala-xml (on which it depends, by the pom file)
91
- if [ "$1" = "quick" ]; then
92
- echo "doc"
93
- else
94
- echo "set publishArtifact in (Compile, packageDoc) in ThisBuild := false"
95
- fi
96
- }
97
-
98
- # Oh boy... can't use scaladoc to document scala-xml if scaladoc depends on the same version of scala-xml.
99
- # Even if that version is available through the project's resolvers, sbt won't look past this project.
100
- # SOOOOO, we set the version to a dummy (-DOC), generate documentation,
101
- # then set the version to the right one and publish (which won't re-gen the docs).
102
- # Also tried publish-local without docs using 'set publishArtifact in (Compile, packageDoc) := false' and republishing, no dice.
103
- buildXML() {
104
- if [ "$XML_BUILT" != "yes" ] && [ "$forceBuildModules" != "yes" ] && ( sbtResolve "org.scala-lang.modules" "scala-xml" $XML_VER )
105
- then echo "Found scala-xml $XML_VER; not building."
106
- else
107
- update scala scala-xml "$XML_REF" && gfxd
108
- doc="$(docTask $1)"
109
-
110
- # Exclude Scala JS https://github.com/scala/scala/pull/6341#issuecomment-372051392
111
- buildTasksXml=("${buildTasks[@]/#/xmlJVM\/}")
112
- docXml="$doc"
113
- if [[ "$doc" == "doc" ]]; then docXml="xmlJVM/$doc"; fi
114
-
115
- sbtBuild 'set every version := "'$XML_VER'-DOC"' $clean "$docXml" 'set every version := "'$XML_VER'"' xmlJVM/test "${buildTasksXml[@]}"
116
- XML_BUILT="yes" # ensure the module is built and published when buildXML is invoked for the second time, see comment above
117
- fi
118
- }
119
-
120
90
buildPartest() {
121
91
if [ "$PARTEST_BUILT" != "yes" ] && [ "$forceBuildModules" != "yes" ] && ( sbtResolve "org.scala-lang.modules" "scala-partest" $PARTEST_VER )
122
92
then echo "Found scala-partest $PARTEST_VER; not building."
123
93
else
124
94
update scala scala-partest "$PARTEST_REF" && gfxd
125
- doc="$(docTask $1)"
126
95
# disable -Xfatal-warnings until https://github.com/scala/scala-partest/pull/101 is released
127
- sbtBuild 'set version :="'$PARTEST_VER'"' 'set VersionKeys.scalaXmlVersion := "'$XML_VER'"' $ clean "$ doc" 'set scalacOptions := scalacOptions.value.filterNot(_.contains("fatal-warn"))' test "${buildTasks[@]}"
96
+ sbtBuild 'set version :="'$PARTEST_VER'"' $ clean doc 'set scalacOptions := scalacOptions.value.filterNot(_.contains("fatal-warn"))' test "${buildTasks[@]}"
128
97
PARTEST_BUILT="yes"
129
98
fi
130
99
}
@@ -135,8 +104,7 @@ buildScalaCheck(){
135
104
then echo "Found scalacheck $SCALACHECK_VER; not building."
136
105
else
137
106
update rickynils scalacheck $SCALACHECK_REF && gfxd
138
- doc="$(docTask $1)"
139
- sbtBuild 'set version := "'$SCALACHECK_VER'"' 'set VersionKeys.scalaParserCombinatorsVersion := "'$PARSERS_VER'"' $clean "$doc" publish # test times out NOTE: never published to sonatype
107
+ sbtBuild 'set version := "'$SCALACHECK_VER'"' 'set VersionKeys.scalaParserCombinatorsVersion := "'$PARSERS_VER'"' $clean doc publish # test times out NOTE: never published to sonatype
140
108
SCALACHECK_BUILT="yes"
141
109
fi
142
110
}
@@ -166,7 +134,6 @@ buildModules() {
166
134
fi
167
135
fi
168
136
169
- buildXML $1
170
137
# buildScalaCheck $1
171
138
buildPartest $1
172
139
@@ -237,17 +204,14 @@ determineScalaVersion() {
237
204
238
205
# determineScalaVersion must have been called (versions.properties is parsed to env vars)
239
206
deriveModuleVersions() {
240
- XML_VER=${XML_VER-$scala_xml_version_number}
241
207
PARTEST_VER=${PARTEST_VER-$partest_version_number}
242
208
SCALACHECK_VER=${SCALACHECK_VER-$scalacheck_version_number}
243
209
244
- XML_REF="v$XML_VER"
245
210
PARTEST_REF="v$PARTEST_VER"
246
211
SCALACHECK_REF="$SCALACHECK_VER" # no `v` in their tags
247
212
248
213
echo "PARTEST = $PARTEST_VER at $PARTEST_REF"
249
214
# echo "SCALACHECK = $SCALACHECK_VER at $SCALACHECK_REF"
250
- echo "XML = $XML_VER at $XML_REF"
251
215
252
216
}
253
217
@@ -269,7 +233,7 @@ removeExistingBuilds() {
269
233
createNetrcFile "$HOME/.credentials-private-repo"
270
234
local netrcFile="$HOME/.credentials-private-repo-netrc"
271
235
272
- # "module" is not a scala module (like scala-xml) , but an artifact of a boostrap build. the variable
236
+ # "module" is not a scala module, but an artifact of a bootstrap build. the variable
273
237
# contains: "org/scala-lang/modules", "org/scala-lang/scala-compiler", "org/scala-lang/scala-library", ...
274
238
local scalaLangModules=`curl -s $storageApiUrl/org/scala-lang | jq -r '.children | .[] | "org/scala-lang" + .uri' | grep -v actors-migration`
275
239
@@ -289,8 +253,7 @@ constructUpdatedModuleVersions() {
289
253
updatedModuleVersions=()
290
254
291
255
# force the new module versions for building the core. these may be different from the values in versions.properties
292
- # if the variables (XML_VER) were provided. in the common case, the values are the same as in versions.properties.
293
- updatedModuleVersions=("${updatedModuleVersions[@]}" "-Dscala-xml.version.number=$XML_VER")
256
+ # if the variables (e.g. PARTEST_VER) were provided. in the common case, the values are the same as in versions.properties.
294
257
updatedModuleVersions=("${updatedModuleVersions[@]}" "-Dpartest.version.number=$PARTEST_VER")
295
258
# updatedModuleVersions=("${updatedModuleVersions[@]}" "-Dscalacheck.version.number=$SCALACHECK_VER")
296
259
0 commit comments