8000 Skip module docs in bootstrap script when STARR_REF is used by retronym · Pull Request #5019 · scala/scala · GitHub
[go: up one dir, main page]

Skip to content

Skip module docs in bootstrap script when STARR_REF is used #5019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of 8000 service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Skip module docs in bootstrap script when STARR_REF is used
This is a second attempt at making this script operate when
making a binary incompatible change to the compiler, such as
the current effort to change the trait encoding.

I have just disabled the docs when STARR_REF is provided,
rather than disabling them in the first pass as I tried in
c4fc2fd. scala-dev/#89 showed that we can't defer docs to
the second pass, as the second pass isn't always run.
  • Loading branch information
retronym committed Mar 8, 2016
commit ce6ce5657216d8ba8b1a41e41b8ee5ba2c3a5c49
33 changes: 28 additions & 5 deletions scripts/jobs/integrate/bootstrap
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,31 @@ sbtResolve() {
# scala-xml depends on scala-library, so sbt tries to find the scala-library of the version that we are currently building,
# which exists only in private-repo.

docTask() {
if [ ! -z "$STARR_REF" ]; then
# Don't build module docs when bootstrapping a binary incompatible compiler change
# to avoid linkage errors with using the old Scaladoc version
#
# In principle, we ought to parameterize this function with a boolean to indicated if
# this is the first or second pass at building the module, and build the docs in the second
# pass. However, the second pass is only run when `publishToSonatype` is true, and otherwise
# some upstream scripts break if we fail to publish docs at all otherwise. https://github.com/scala/scala-dev/issues/89
# Maybe we should switch to unconditinally doing the second pass (`publishModulesToSonatype`), and
# find a way to make the second pass overwrite/augment the artifacts from the first pass if they
# both target `private-repo`.
echo set publishArtifact in packageDoc in Compile := false
else
echo doc
fi
}

buildXML() {
if [ "$XML_BUILT" != "yes" ] && [ "$forceRebuild" != "yes" ] && ( sbtResolve "org.scala-lang.modules" "scala-xml" $XML_VER )
then echo "Found scala-xml $XML_VER; not building."
else
update scala scala-xml "$XML_REF" && gfxd
sbtBuild 'set version := "'$XML_VER'-DOC"' $clean doc 'set version := "'$XML_VER'"' test "${buildTasks[@]}"
doc="$(docTask)"
sbtBuild 'set version := "'$XML_VER'-DOC"' $clean "$doc" 'set version := "'$XML_VER'"' test "${buildTasks[@]}"
XML_BUILT="yes" # ensure the module is built and published when buildXML is invoked for the second time, see comment above
fi
}
Expand All @@ -224,7 +243,8 @@ buildParsers() {
then echo "Found scala-parser-combinators $PARSERS_VER; not building."
else
update scala scala-parser-combinators "$PARSERS_REF" && gfxd
sbtBuild 'set version := "'$PARSERS_VER'-DOC"' $clean doc 'set version := "'$PARSERS_VER'"' test "${buildTasks[@]}"
doc="$(docTask)"
sbtBuild 'set version := "'$PARSERS_VER'-DOC"' $clean "$doc" 'set version := "'$PARSERS_VER'"' test "${buildTasks[@]}"
PARSERS_BUILT="yes"
fi
}
Expand All @@ -234,7 +254,8 @@ buildPartest() {
then echo "Found scala-partest $PARTEST_VER; not building."
else
update scala scala-partest "$PARTEST_REF" && gfxd
sbtBuild 'set version :="'$PARTEST_VER'"' 'set VersionKeys.scalaXmlVersion := "'$XML_VER'"' 'set VersionKeys.scalaCheckVersion := "'$SCALACHECK_VER'"' $clean doc test "${buildTasks[@]}"
doc="$(docTask)"
sbtBuild 'set version :="'$PARTEST_VER'"' 'set VersionKeys.scalaXmlVersion := "'$XML_VER'"' 'set VersionKeys.scalaCheckVersion := "'$SCALACHECK_VER'"' $clean "$doc" test "${buildTasks[@]}"
PARTEST_BUILT="yes"
fi
}
Expand All @@ -244,7 +265,8 @@ buildSwing() {
then echo "Found scala-swing $SWING_VER; not building."
else
update scala scala-swing "$SWING_REF" && gfxd
sbtBuild 'set version := "'$SWING_VER'"' $clean doc test "${buildTasks[@]}"
doc="$(docTask)"
sbtBuild 'set version := "'$SWING_VER'"' $clean "$doc" test "${buildTasks[@]}"
SWING_BUILT="yes"
fi
}
Expand All @@ -255,7 +277,8 @@ buildScalacheck(){
then echo "Found scalacheck $SCALACHECK_VER; not building."
else
update rickynils scalacheck $SCALACHECK_REF && gfxd
sbtBuild 'set version := "'$SCALACHECK_VER'"' 'set VersionKeys.scalaParserCombinatorsVersion := "'$PARSERS_VER'"' $clean doc publish # test times out NOTE: never published to sonatype
doc="$(docTask)"
sbtBuild 'set version := "'$SCALACHECK_VER'"' 'set VersionKeys.scalaParserCombinatorsVersion := "'$PARSERS_VER'"' $clean "$doc" publish # test times out NOTE: never published to sonatype
SCALACHECK_BUILT="yes"
fi
}
Expand Down
0