From 0fb85231ea0ef7892e830deae482406ed899bd94 Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Tue, 13 Jun 2023 14:49:29 +0200 Subject: [PATCH 1/4] refactor: remove stray noResultStructure.html This seems to have been moved in https://github.com/lampepfl/dotty/commit/c986fc5f63296edd1be68a69237b23238cffcb3d, but without any context. I can't see it referenced anywhere and I also see that it's actually in https://github.com/lampepfl/dotty/blob/d332059144b10102ca4d1c433d294309b43f1e51/scaladoc-js/main/src/searchbar/SearchbarComponent.scala#L105-L113, which makes me want to think this was never meant to be here. Testing locally this also seems to work just fine without this. --- scaladoc/noResultStructure.html | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 scaladoc/noResultStructure.html diff --git a/scaladoc/noResultStructure.html b/scaladoc/noResultStructure.html deleted file mode 100644 index 93ef4bbf1396..000000000000 --- a/scaladoc/noResultStructure.html +++ /dev/null @@ -1,6 +0,0 @@ -
- Sick face -

No results match your filter criteria

-

Try adjusting or clearing your filters
to display better result

- -
\ No newline at end of file From 65816de4690aac13e932d5cecccc84755d57ae12 Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Tue, 13 Jun 2023 14:52:48 +0200 Subject: [PATCH 2/4] refactor: remove old files from migration All of these files seem to be leftover from the migrations to scala3doc to being inside of the actual Dotty repo as they don't seem to be used or referenced in any way. --- scaladoc/.scalafmt.conf | 1 - scaladoc/scripts/linkstovisit.txt | 13 ------ scaladoc/scripts/mk-index.sh | 75 ------------------------------- scaladoc/scripts/tocheck.txt | 0 4 files changed, 89 deletions(-) delete mode 100644 scaladoc/.scalafmt.conf delete mode 100644 scaladoc/scripts/linkstovisit.txt delete mode 100755 scaladoc/scripts/mk-index.sh delete mode 100644 scaladoc/scripts/tocheck.txt diff --git a/scaladoc/.scalafmt.conf b/scaladoc/.scalafmt.conf deleted file mode 100644 index 9df0d88b69ce..000000000000 --- a/scaladoc/.scalafmt.conf +++ /dev/null @@ -1 +0,0 @@ -version = "2.6.3" diff --git a/scaladoc/scripts/linkstovisit.txt b/scaladoc/scripts/linkstovisit.txt deleted file mode 100644 index c615ece17d35..000000000000 --- a/scaladoc/scripts/linkstovisit.txt +++ /dev/null @@ -1,13 +0,0 @@ -./self/api/dotty.tools.scaladoc/tasty/comments/wiki/-converter/index.html,on any page try minimizing window to see if relative styles are applied correctly -./self/api/dotty.tools.scaladoc/-base-key/index.html,is searchbar correct width -./self/api/dotty.tools.scaladoc/as-map.html,are logos in good propotions -./self/api/dotty.tools.scaladoc/model/api/as-signature.html,is sidebar not collapsing/overlaying -./self/api/dotty.tools.scaladoc/-documentable-element/index.html,are overrides pointing to correct function? is filtering working -./self/api/dotty.tools.scaladoc/model/api/-member/index.html,is source link pointing to correct element (object Member)? -./self/api/dotty.tools.scaladoc/-scala-content-node/index.html,you can see is graph properly rendered; can you navigate by nodes up and down the hierarchy -./self/api/index/index.html,package overview -./self/api/dotty.tools.scaladoc/index.html,example package -./self/api/dotty.tools.scaladoc/-documentable-element/index.html,example classlike -./self/api/dotty.tools.scaladoc/get-from-extra.html,example package level method -./self/api/dotty.tools.scaladoc/put.html,example extension -./self/api/dotty.tools.scaladoc/-dot-diagram-builder/build.html,example method diff --git a/scaladoc/scripts/mk-index.sh b/scaladoc/scripts/mk-index.sh deleted file mode 100755 index e2df5a2e551c..000000000000 --- a/scaladoc/scripts/mk-index.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env bash - -MYDIR="$(dirname "$(readlink -f "$0")")" - - -function html-beginning { - cat << EOF - - -EOF -} - -function html-ending { -cat << EOF - - -EOF -} - -function print-beginning { - cat << EOF -

$1

- -EOF -} - -cd "$1" || exit - - -html-beginning -print-beginning "Available project:" -for f in * -do - ! [[ -d $f ]] && continue - # assuming that there's only one "root" index file - # if there's a static site, it's at depth 1 - # otherwise at depth 2 - INDEX=$(find "$f" -maxdepth 1 -name 'index.html') - if [[ -z $INDEX ]] - then - INDEX=$(find "$f" -maxdepth 2 -name 'index.html') - fi - print-list-element "$INDEX" "$f" -done -print-ending - -print-beginning "Links for manual testing:" -while read line; do - print-list-element-text "$line" -done < "$MYDIR/tocheck.txt" - -while read line; do - IFS=',' read INDEX f <<< "${line}" - print-list-element "$INDEX" "$f" -done < "$MYDIR/linkstovisit.txt" -print-ending -html-ending diff --git a/scaladoc/scripts/tocheck.txt b/scaladoc/scripts/tocheck.txt deleted file mode 100644 index e69de29bb2d1..000000000000 From d78f2be2cd185e144eeeb69c48f849e6ebd4316b Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Tue, 13 Jun 2023 14:56:02 +0200 Subject: [PATCH 3/4] refactor: move scaladoc .gitignore to the root one None of the other modules have their own gitignore so to avoid any confusion this just moves the single entry in the scaladoc one to the main one and then removes the scaladoc one. --- .gitignore | 4 ++++ scaladoc/.gitignore | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) delete mode 100644 scaladoc/.gitignore diff --git a/.gitignore b/.gitignore index 5240662741bb..f378adb24bc8 100644 --- a/.gitignore +++ b/.gitignore @@ -95,3 +95,7 @@ contributors.js content-contributors.css docs/_spec/_site/ docs/_spec/.jekyll-metadata + +# scaladoc related +scaladoc/output/ + diff --git a/scaladoc/.gitignore b/scaladoc/.gitignore deleted file mode 100644 index 893c4fbd144f..000000000000 --- a/scaladoc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# root where we generate documentation -output \ No newline at end of file From f891985b7c1853e6c6f137053bef14b9133a0eac Mon Sep 17 00:00:00 2001 From: Chris Kipp Date: Tue, 13 Jun 2023 15:47:18 +0200 Subject: [PATCH 4/4] refactor: move scripts back in since they are used in CI --- scaladoc/scripts/linkstovisit.txt | 13 ++++++ scaladoc/scripts/mk-index.sh | 77 +++++++++++++++++++++++++++++++ scaladoc/scripts/tocheck.txt | 0 3 files changed, 90 insertions(+) create mode 100644 scaladoc/scripts/linkstovisit.txt create mode 100755 scaladoc/scripts/mk-index.sh create mode 100644 scaladoc/scripts/tocheck.txt diff --git a/scaladoc/scripts/linkstovisit.txt b/scaladoc/scripts/linkstovisit.txt new file mode 100644 index 000000000000..c615ece17d35 --- /dev/null +++ b/scaladoc/scripts/linkstovisit.txt @@ -0,0 +1,13 @@ +./self/api/dotty.tools.scaladoc/tasty/comments/wiki/-converter/index.html,on any page try minimizing window to see if relative styles are applied correctly +./self/api/dotty.tools.scaladoc/-base-key/index.html,is searchbar correct width +./self/api/dotty.tools.scaladoc/as-map.html,are logos in good propotions +./self/api/dotty.tools.scaladoc/model/api/as-signature.html,is sidebar not collapsing/overlaying +./self/api/dotty.tools.scaladoc/-documentable-element/index.html,are overrides pointing to correct function? is filtering working +./self/api/dotty.tools.scaladoc/model/api/-member/index.html,is source link pointing to correct element (object Member)? +./self/api/dotty.tools.scaladoc/-scala-content-node/index.html,you can see is graph properly rendered; can you navigate by nodes up and down the hierarchy +./self/api/index/index.html,package overview +./self/api/dotty.tools.scaladoc/index.html,example package +./self/api/dotty.tools.scaladoc/-documentable-element/index.html,example classlike +./self/api/dotty.tools.scaladoc/get-from-extra.html,example package level method +./self/api/dotty.tools.scaladoc/put.html,example extension +./self/api/dotty.tools.scaladoc/-dot-diagram-builder/build.html,example method diff --git a/scaladoc/scripts/mk-index.sh b/scaladoc/scripts/mk-index.sh new file mode 100755 index 000000000000..d4d72aec0d84 --- /dev/null +++ b/scaladoc/scripts/mk-index.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +# NOTE that this file is used in CI + +MYDIR="$(dirname "$(readlink -f "$0")")" + + +function html-beginning { + cat << EOF + + +EOF +} + +function html-ending { +cat << EOF + + +EOF +} + +function print-beginning { + cat << EOF +

$1

+
    +EOF +} + +function print-list-element { + cat << EOF +
  • $2
  • +EOF +} + +function print-list-element-text { + cat << EOF +
  • $1
  • +EOF +} + +function print-ending { + cat << 'EOF' +
+EOF +} + +cd "$1" || exit + + +html-beginning +print-beginning "Available project:" +for f in * +do + ! [[ -d $f ]] && continue + # assuming that there's only one "root" index file + # if there's a static site, it's at depth 1 + # otherwise at depth 2 + INDEX=$(find "$f" -maxdepth 1 -name 'index.html') + if [[ -z $INDEX ]] + then + INDEX=$(find "$f" -maxdepth 2 -name 'index.html') + fi + print-list-element "$INDEX" "$f" +done +print-ending + +print-beginning "Links for manual testing:" +while read line; do + print-list-element-text "$line" +done < "$MYDIR/tocheck.txt" + +while read line; do + IFS=',' read INDEX f <<< "${line}" + print-list-element "$INDEX" "$f" +done < "$MYDIR/linkstovisit.txt" +print-ending +html-ending diff --git a/scaladoc/scripts/tocheck.txt b/scaladoc/scripts/tocheck.txt new file mode 100644 index 000000000000..e69de29bb2d1