Skip to content

Commit b477c42

Browse files
committed
Remove sbt-dotty
1 parent 007dacd commit b477c42

File tree

1,120 files changed

+82
-860
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,120 files changed

+82
-860
lines changed

.github/workflows/ci.yaml

+8-61
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ jobs:
3535
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
3636
- ${{ github.workspace }}/../../cache/general:/root/.cache
3737
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
38-
|| (
39-
github.event_name == 'push'
40-
&& !startsWith(github.event.ref, 'refs/tags/sbt-dotty-')
41-
)
38+
|| github.event_name == 'push'
4239
|| (
4340
github.event_name == 'pull_request'
4441
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -82,10 +79,7 @@ jobs:
8279
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
8380
- ${{ github.workspace }}/../../cache/general:/root/.cache
8481
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
85-
|| (
86-
github.event_name == 'push'
87-
&& !startsWith(github.event.ref, 'refs/tags/sbt-dotty-')
88-
)
82+
|| github.event_name == 'push'
8983
|| (
9084
github.event_name == 'pull_request'
9185
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -117,15 +111,14 @@ jobs:
117111

118112
- name: Cmd Tests
119113
run: |
120-
./project/scripts/sbt ";scala3-bootstrapped/compile ;scala3-bootstrapped/test;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test;sjsCompilerTests/test ;sbt-dotty/scripted scala2-compat/* ;configureIDE ;stdlib-bootstrapped/test:run ;stdlib-bootstrapped-tasty-tests/test"
114+
./project/scripts/sbt ";scala3-bootstrapped/compile ;scala3-bootstrapped/test;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test;sjsCompilerTests/test ;sbt-test/scripted scala2-compat/* ;configureIDE ;stdlib-bootstrapped/test:run ;stdlib-bootstrapped-tasty-tests/test"
121115
./project/scripts/bootstrapCmdTests
122116
123117
test_windows_fast:
124118
runs-on: [self-hosted, Windows]
125119
if: "(
126120
github.event_name == 'push'
127121
&& github.ref != 'refs/heads/master'
128-
&& !startsWith(github.event.ref, 'refs/tags/sbt-dotty-')
129122
)
130123
|| (
131124
github.event_name == 'pull_request'
@@ -168,10 +161,7 @@ jobs:
168161
test_windows_full:
169162
runs-on: [self-hosted, Windows]
170163
if: "github.event_name == 'schedule' && github.repository == 'lampepfl/dotty'
171-
|| (
172-
github.event_name == 'push'
173-
&& !startsWith(github.event.ref, 'refs/tags/sbt-dotty-')
174-
)
164+
|| github.event_name == 'push'
175165
|| (
176166
github.event_name == 'pull_request'
177167
&& !contains(github.event.pull_request.body, '[skip ci]')
@@ -361,7 +351,7 @@ jobs:
361351
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true
362352

363353
- name: Test sbt
364-
run: ./project/scripts/sbt "sbt-dotty/scripted; sbt-community-build/scripted"
354+
run: ./project/scripts/sbt "sbt-test/scripted; sbt-community-build/scripted"
365355

366356
test_java8:
367357
runs-on: [self-hosted, Linux]
@@ -377,7 +367,6 @@ jobs:
377367
|| (
378368
github.event_name == 'push'
379369
&& startsWith(github.event.ref, 'refs/tags/')
380-
&& !startsWith(github.event.ref, 'refs/tags/sbt-dotty-')
381370
)
382371
|| (
383372
github.event_name == 'pull_request'
@@ -410,7 +399,7 @@ jobs:
410399

411400
- name: Test
412401
run: |
413-
./project/scripts/sbt ";scala3-bootstrapped/compile ;scala3-bootstrapped/test;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test;sjsCompilerTests/test ;sbt-dotty/scripted scala2-compat/* ;configureIDE ;stdlib-bootstrapped/test:run ;stdlib-bootstrapped-tasty-tests/test"
402+
./project/scripts/sbt ";scala3-bootstrapped/compile ;scala3-bootstrapped/test;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test;sjsCompilerTests/test ;sbt-test/scripted scala2-compat/* ;configureIDE ;stdlib-bootstrapped/test:run ;stdlib-bootstrapped-tasty-tests/test"
414403
./project/scripts/bootstrapCmdTests
415404
416405
publish_nightly:
@@ -520,8 +509,7 @@ jobs:
520509
- ${{ github.workspace }}/../../cache/general:/root/.cache
521510
needs: [test_non_bootstrapped, test, community_build_a, community_build_b, community_build_c, test_sbt, test_java8]
522511
if: "github.event_name == 'push'
523-
&& startsWith(github.event.ref, 'refs/tags/')
524-
&& !startsWith(github.event.ref, 'refs/tags/sbt-dotty-')"
512+
&& startsWith(github.event.ref, 'refs/tags/')"
525513

526514
env:
527515
RELEASEBUILD: yes
@@ -606,8 +594,7 @@ jobs:
606594
- ${{ github.workspace }}/../../cache/general:/root/.cache
607595
needs: [publish_release]
608596
if: "github.event_name == 'push'
609-
&& startsWith(github.event.ref, 'refs/tags/')
610-
&& !startsWith(github.event.ref, 'refs/tags/sbt-dotty-')"
597+
&& startsWith(github.event.ref, 'refs/tags/')"
611598

612599
env:
613600
RELEASEBUILD: yes
@@ -643,46 +630,6 @@ jobs:
643630
external_repository: lampepfl/dotty-website
644631
publish_branch: gh-pages
645632

646-
publish_sbt_release:
647-
runs-on: [self-hosted, Linux]
648-
container:
649-
image: lampepfl/dotty:2021-03-22
650-
options: --cpu-shares 4096
651-
volumes:
652-
- ${{ github.workspace }}/../../cache/sbt:/root/.sbt
653-
- ${{ github.workspace }}/../../cache/ivy:/root/.ivy2/cache
654-
- ${{ github.workspace }}/../../cache/general:/root/.cache
655-
needs: [community_build_a, community_build_b, community_build_c, test_sbt]
656-
if: "github.event_name == 'push'
657-
&& startsWith(github.event.ref, 'refs/tags/sbt-dotty-')"
658-
659-
env:
660-
RELEASEBUILD: yes
661-
PGP_PW: ${{ secrets.PGP_PW }} # PGP passphrase
662-
PGP_SECRET: ${{ secrets.PGP_SECRET }} # Export your private and public PGP key to an *.asc file, take the file's contents as a string
663-
SONATYPE_PW: ${{ secrets.SONATYPE_PW }}
664-
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
665-
666-
steps:
667-
- name: Reset existing repo
668-
run: git -c "http.https://github.com/.extraheader=" fetch --recurse-submodules=no "https://github.com/lampepfl/dotty" && git reset --hard FETCH_HEAD || true
669-
670-
- name: Checkout cleanup script
671-
uses: actions/checkout@v2
672-
673-
- name: Cleanup
674-
run: .github/workflows/cleanup.sh
675-
676-
- name: Git Checkout
677-
uses: actions/checkout@v2
678-
679-
- name: Add SBT proxy repositories
680-
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true
681-
682-
- name: Publish Dotty SBT Plugin Release
683-
run: |
684-
./project/scripts/sbtPublish ";project sbt-dotty ;publishSigned ;sonatypeBundleRelease"
685-
686633
open_issue_on_failure:
687634
runs-on: [self-hosted, Linux]
688635
container:

.github/workflows/scaladoc.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
run: ./project/scripts/sbt scaladoc/generateScalaDocumentation
5555

5656
- name: Generate documentation for example project using dotty-sbt
57-
run: ./project/scripts/sbt "sbt-dotty/scripted sbt-dotty/scaladoc"
57+
run: ./project/scripts/sbt "sbt-test/scripted sbt-dotty/scaladoc"
5858

5959
- name: Generate index file
6060
run: scaladoc/scripts/mk-index.sh scaladoc/output > scaladoc/output/index.html

build.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ val sjsSandbox = Build.sjsSandbox
3535
val sjsJUnitTests = Build.sjsJUnitTests
3636
val sjsCompilerTests = Build.sjsCompilerTests
3737

38-
val `sbt-dotty` = Build.`sbt-dotty`
38+
val `sbt-test` = Build.`sbt-test`
3939
val `vscode-dotty` = Build.`vscode-dotty`
4040

4141
inThisBuild(Build.thisBuildSettings)

compiler/src/dotty/tools/dotc/core/TypeErasure.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ class TypeErasure(sourceLanguage: SourceLanguage, semiEraseVCs: Boolean, isConst
726726
// erased like `Array[A]` as seen from its definition site, no matter
727727
// the `X` (same if `A` is bounded).
728728
//
729-
// The binary compatibility is checked by sbt-dotty/sbt-test/scala2-compat/i8001
729+
// The binary compatibility is checked by sbt-test/scala2-compat/i8001
730730
val erasedValueClass =
731731
if erasedUnderlying.isPrimitiveValueType && !genericUnderlying.isPrimitiveValueType then
732732
defn.boxedType(erasedUnderlying)

compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -1199,8 +1199,8 @@ class TreeUnpickler(reader: TastyReader,
11991199
* or an override has been removed.
12001200
*
12011201
* This is tested in
1202-
* - sbt-dotty/sbt-test/tasty-compat/remove-override
1203-
* - sbt-dotty/sbt-test/tasty-compat/move-method
1202+
* - sbt-test/tasty-compat/remove-override
1203+
* - sbt-test/tasty-compat/move-method
12041204
*/
12051205
def lookupInSuper =
12061206
val cls = ownerTpe.classSymbol

compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Erasure.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ object Scala2Erasure:
2929
* these issues because they get flattened into a single RefinedType with
3030
* three parents, cf `flattenedParents`.
3131
*
32-
* See sbt-dotty/sbt-test/scala2-compat/erasure/changes/Main.scala for examples.
32+
* See sbt-test/scala2-compat/erasure/changes/Main.scala for examples.
3333
*
3434
* @throws TypeError if this type is unsupported.
3535
*/
@@ -215,7 +215,7 @@ object Scala2Erasure:
215215
* is only specified for class symbols. Therefore, the accuracy of this
216216
* method cannot be guaranteed, the best we can do is make sure it works on
217217
* as many test cases as possible which can be run from sbt using:
218-
* > sbt-dotty/scripted scala2-compat/erasure
218+
* > sbt-test/scripted scala2-compat/erasure
219219
*
220220
* The body of this method is made to look as much as the Scala 2 version as
221221
* possible to make them easier to compare, cf:

language-server/src/dotty/tools/languageserver/DottyLanguageServer.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ class DottyLanguageServer extends LanguageServer
644644
}
645645

646646
object DottyLanguageServer {
647-
/** Configuration file normally generated by sbt-dotty */
647+
/** Configuration file normally generated by the DottyIDEPlugin */
648648
final val IDE_CONFIG_FILE = ".dotty-ide.json"
649649

650650
final val RENAME_OVERRIDDEN_QUESTION = "Do you want to rename the base member, or only this member?"

language-server/src/dotty/tools/languageserver/Main.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import org.eclipse.lsp4j.jsonrpc.Launcher
2020
* coursier launch $artifact -M dotty.tools.languageserver.Main -- -stdio
2121
*
2222
* Where $artifact comes from the `.dotty-ide-artifact` file in the current project, this file
23-
* can be created by the sbt-dotty plugin by running `sbt configureIDE`.
23+
* can be created by the DottyIDEPlugin by running `sbt configureIDE`.
2424
*
2525
* See vscode-dotty/ for an example integration of the Dotty Language Server into Visual Studio Code.
2626
*/

project/Bootstrap.scala

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
package sbt
2+
3+
import sbt.internal.classpath.ClassLoaderCache
4+
import sbt.internal.inc.ScalaInstance
5+
6+
// This class needs to be in package sbt to access the ClassLoaderCache
7+
object Bootstrap {
8+
def makeScalaInstance(
9+
state: State,
10+
version: String,
11+
libraryJars: Array[File],
12+
compilerJars: Array[File],
13+
docJars: Array[File],
14+
topLoader: ClassLoader
15+
): ScalaInstance = {
16+
// `extendedClassLoaderCache` is package private in package sbt
17+
val cache = state.extendedClassLoaderCache
18+
19+
val libraryLoader = cache(libraryJars.toList, topLoader)
20+
val compilerLoader = cache(compilerJars.toList, libraryLoader)
21+
val fullLoader = cache(docJars.toList, compilerLoader)
22+
23+
new ScalaInstance(
24+
version = version,
25+
loader = fullLoader,
26+
loaderCompilerOnly = compilerLoader,
27+
loaderLibraryOnly = libraryLoader,
28+
libraryJars = libraryJars,
29+
compilerJars = compilerJars,
30+
allJars = libraryJars ++ compilerJars ++ docJars,
31+
explicitActual = Some(version)
32+
)
33+
}
34+
}

0 commit comments

Comments
 (0)