Skip to content

Commit

Permalink
Merge pull request #9917 from dotty-staging/scala3m1
Browse files Browse the repository at this point in the history
Rename all artefacts from dotty to scala3
  • Loading branch information
anatoliykmetyuk authored Oct 15, 2020
2 parents 0525ba0 + 96f7829 commit c0b527d
Show file tree
Hide file tree
Showing 64 changed files with 402 additions and 404 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:

- name: Test
run: |
./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test;sjsCompilerTests/test ;sbt-dotty/scripted scala2-compat/* ;configureIDE"
./project/scripts/sbt ";scala3-bootstrapped/compile ;scala3-bootstrapped/test;sjsSandbox/run;sjsSandbox/test;sjsJUnitTests/test;sjsCompilerTests/test ;sbt-dotty/scripted scala2-compat/* ;configureIDE"
./project/scripts/bootstrapCmdTests
Expand All @@ -116,7 +116,7 @@ jobs:
uses: actions/checkout@v2

- name: Test
run: sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test"
run: sbt ";scala3-bootstrapped/compile ;scala3-bootstrapped/test"
shell: cmd

- name: Scala.js Test
Expand Down Expand Up @@ -262,8 +262,8 @@ jobs:
NIGHTLYBUILD: yes
PGP_PW: ${{ secrets.PGP_PW }} # PGP passphrase
PGP_SECRET: ${{ secrets.PGP_SECRET }} # Export your private and public PGP key to an *.asc file, take the file's contents as a string
SONATYPE_PW: ${{ secrets.SONATYPE_PW }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PW: ${{ secrets.SONATYPE_PW_ORGSCALALANG }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER_ORGSCALALANG }}

steps:
- name: Checkout cleanup script
Expand Down Expand Up @@ -298,7 +298,7 @@ jobs:

- name: Publish Nightly
run: |
./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease"
./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonatypeBundleRelease"
nightly_documentation:
runs-on: [self-hosted, Linux]
Expand Down Expand Up @@ -366,8 +366,8 @@ jobs:
RELEASEBUILD: yes
PGP_PW: ${{ secrets.PGP_PW }} # PGP passphrase
PGP_SECRET: ${{ secrets.PGP_SECRET }} # Export your private and public PGP key to an *.asc file, take the file's contents as a string
SONATYPE_PW: ${{ secrets.SONATYPE_PW }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PW: ${{ secrets.SONATYPE_PW_ORGSCALALANG }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER_ORGSCALALANG }}

steps:
- name: Checkout cleanup script
Expand Down Expand Up @@ -404,7 +404,7 @@ jobs:
run: |
./project/scripts/sbt dist/packArchive
sha256sum dist/target/dotty-* > dist/target/sha256sum.txt
./project/scripts/sbtPublish ";project dotty-bootstrapped ;publishSigned ;sonatypeBundleRelease"
./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonatypeBundleRelease"
echo "name=RELEASE_TAG::${GITHUB_REF#*refs/tags/}" >> $GITHUB_ENV
- name: Create GitHub Release
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ local.sbt
# npm
node_modules

# VS Code
# VS Code
.vscode/
# Metals
.bloop/
Expand Down Expand Up @@ -82,8 +82,9 @@ bench/compile.txt
# The vscode app for testing
vscode-dotty/.vscode-test

community-build/dotty-bootstrapped.version
community-build/scala3-bootstrapped.version
community-build/sbt-dotty-sbt

# Vulpix output files
*.check.out
!/dist/bin/
2 changes: 1 addition & 1 deletion bin/dotc → bin/scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >& /dev/null && pwd)/.."

"$ROOT/bin/common" "$ROOT/dist/target/pack/bin/dotc" "$@"
"$ROOT/bin/common" "$ROOT/dist/target/pack/bin/scala" "$@"
2 changes: 1 addition & 1 deletion bin/dotd → bin/scalac
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >& /dev/null && pwd)/.."

"$ROOT/bin/common" "$ROOT/dist/target/pack/bin/dotd" "$@"
"$ROOT/bin/common" "$ROOT/dist/target/pack/bin/scalac" "$@"
2 changes: 1 addition & 1 deletion bin/dotr → bin/scalad
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" >& /dev/null && pwd)/.."

"$ROOT/bin/common" "$ROOT/dist/target/pack/bin/dotr" "$@"
"$ROOT/bin/common" "$ROOT/dist/target/pack/bin/scalad" "$@"
34 changes: 17 additions & 17 deletions bin/test/TestScripts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,53 +45,53 @@ class TestScripts {
@Before def buildUp = deletePackages
@After def tearDown = deletePackages

/** bin/dotc script should be able to build hello world and successfully
* execute it using dotr
/** bin/scalac script should be able to build hello world and successfully
* execute it using scala
*/
@Test def buildAndRunHelloWorld = doUnlessWindows {
val (retDotc, dotcOutput) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
val (retDotc, dotcOutput) = executeScript("./bin/scalac ./tests/pos/HelloWorld.scala")

// Check correct output of building and running dotc
// Check correct output of building and running scalac
assert(
retDotc == 0,
s"bin/dotc script did not run properly. Output:$lineSep$dotcOutput"
s"bin/scalac script did not run properly. Output:$lineSep$dotcOutput"
)

val (retDotr, dotrOutput) = executeScript("./bin/dotr HelloWorld")
val (retDotr, dotrOutput) = executeScript("./bin/scala HelloWorld")
assert(
retDotr == 0 && dotrOutput == "hello world\n",
s"Running hello world exited with status: $retDotr and output: $dotrOutput"
)
}

/** bin/dotc script should be able to detect changes in dotty sources and
/** bin/scalac script should be able to detect changes in dotty sources and
* rebuild dotty if needed
*/
@Test def rebuildIfNecessary = doUnlessWindows {
val (retFirstBuild, out1) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
assert(retFirstBuild == 0, s"building dotc failed: $out1")
val (retFirstBuild, out1) = executeScript("./bin/scalac ./tests/pos/HelloWorld.scala")
assert(retFirstBuild == 0, s"building scalac failed: $out1")

// Create a new file to force rebuild
new JFile("./compiler/src/dotty/tools/dotc/Dummy.scala").createNewFile()

val (retSecondBuild, output) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
val (retSecondBuild, output) = executeScript("./bin/scalac ./tests/pos/HelloWorld.scala")
assert(
retSecondBuild == 0 && output.contains("rebuilding"),
s"Rebuilding the tool should result in jar files being rebuilt. Status: $retSecondBuild, output:$lineSep$output")
}

/** if no changes to dotty, dotc script should be fast */
/** if no changes to dotty, scalac script should be fast */
@Test def beFastOnNoChanges = doUnlessWindows {
val (retFirstBuild, _) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
assert(retFirstBuild == 0, "building dotc failed")
val (retFirstBuild, _) = executeScript("./bin/scalac ./tests/pos/HelloWorld.scala")
assert(retFirstBuild == 0, "building scalac failed")

val (ret, output) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
val (ret, output) = executeScript("./bin/scalac ./tests/pos/HelloWorld.scala")
assert(
ret == 0 && !output.contains("rebuilding"),
s"Project recompiled when it didn't need to be. Status $ret, output:$lineSep$output")
}

/** dotc script should work after corrupting .packages */
/** scalac script should work after corrupting .packages */
@Test def reCreatesPackagesIfNecessary = doUnlessWindows {
import java.nio.file.{Paths, Files}
import java.nio.charset.StandardCharsets
Expand All @@ -104,8 +104,8 @@ class TestScripts {

Files.write(Paths.get("./.packages"), contents.getBytes(StandardCharsets.UTF_8))

val (retFirstBuild, output) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
val (retFirstBuild, output) = executeScript("./bin/scalac ./tests/pos/HelloWorld.scala")
assert(output.contains(".packages file corrupted"))
assert(retFirstBuild == 0, "building dotc failed")
assert(retFirstBuild == 0, "building scalac failed")
}
}
44 changes: 20 additions & 24 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
val dotty = Build.dotty
val `dotty-bootstrapped` = Build.`dotty-bootstrapped`
val `dotty-interfaces` = Build.`dotty-interfaces`
val `dotty-doc` = Build.`dotty-doc`
val `dotty-doc-bootstrapped` = Build.`dotty-doc-bootstrapped`
val `dotty-compiler` = Build.`dotty-compiler`
val `dotty-compiler-bootstrapped` = Build.`dotty-compiler-bootstrapped`
val `dotty-library` = Build.`dotty-library`
val `dotty-library-bootstrapped` = Build.`dotty-library-bootstrapped`
val `dotty-library-bootstrappedJS` = Build.`dotty-library-bootstrappedJS`
val `dotty-sbt-bridge` = Build.`dotty-sbt-bridge`
val `dotty-sbt-bridge-tests` = Build.`dotty-sbt-bridge-tests`
val `dotty-staging` = Build.`dotty-staging`
val `dotty-tasty-inspector` = Build.`dotty-tasty-inspector`
val `dotty-language-server` = Build.`dotty-language-server`
val `dotty-bench` = Build.`dotty-bench`
val `dotty-bench-bootstrapped` = Build.`dotty-bench-bootstrapped`
val scala3 = Build.scala3
val `scala3-bootstrapped` = Build.`scala3-bootstrapped`
val `scala3-interfaces` = Build.`scala3-interfaces`
val `scala3-doc` = Build.`scala3-doc`
val `scala3-doc-bootstrapped` = Build.`scala3-doc-bootstrapped`
val `scala3-compiler` = Build.`scala3-compiler`
val `scala3-compiler-bootstrapped` = Build.`scala3-compiler-bootstrapped`
val `scala3-library` = Build.`scala3-library`
val `scala3-library-bootstrapped` = Build.`scala3-library-bootstrapped`
val `scala3-library-bootstrappedJS` = Build.`scala3-library-bootstrappedJS`
val `scala3-sbt-bridge` = Build.`scala3-sbt-bridge`
val `scala3-sbt-bridge-tests` = Build.`scala3-sbt-bridge-tests`
val `scala3-staging` = Build.`scala3-staging`
val `scala3-tasty-inspector` = Build.`scala3-tasty-inspector`
val `scala3-language-server` = Build.`scala3-language-server`
val `scala3-bench` = Build.`scala3-bench`
val `scala3-bench-bootstrapped` = Build.`scala3-bench-bootstrapped`
val `tasty-core` = Build.`tasty-core`
val `tasty-core-bootstrapped` = Build.`tasty-core-bootstrapped`
val `tasty-core-scala2` = Build.`tasty-core-scala2`
val `dotty-tastydoc` = Build.`dotty-tastydoc`
val `dotty-tastydoc-input` = Build.`dotty-tastydoc-input`
val `dotty-bench-run` = Build.`dotty-bench-run`
val `scala-library` = Build.`scala-library`
val `scala-compiler` = Build.`scala-compiler`
val `scala-reflect` = Build.`scala-reflect`
val scalap = Build.scalap
val `scala3-tastydoc` = Build.`scala3-tastydoc`
val `scala3-tastydoc-input` = Build.`scala3-tastydoc-input`
val `scala3-bench-run` = Build.`scala3-bench-run`
val dist = Build.dist
val `community-build` = Build.`community-build`

Expand Down
2 changes: 1 addition & 1 deletion community-build/community-projects/ScalaPB
Submodule ScalaPB updated 1 files
+2 −2 build.sbt
2 changes: 1 addition & 1 deletion community-build/community-projects/cats-effect-2
Submodule cats-effect-2 updated 1 files
+1 −1 build.sbt
2 changes: 1 addition & 1 deletion community-build/community-projects/fansi
Submodule fansi updated 1 files
+1 −1 mill
2 changes: 1 addition & 1 deletion community-build/community-projects/geny
Submodule geny updated 1 files
+1 −1 mill
2 changes: 1 addition & 1 deletion community-build/community-projects/munit
2 changes: 1 addition & 1 deletion community-build/community-projects/os-lib
Submodule os-lib updated 1 files
+1 −1 mill
2 changes: 1 addition & 1 deletion community-build/community-projects/requests-scala
Submodule requests-scala updated 1 files
+1 −1 mill
2 changes: 1 addition & 1 deletion community-build/community-projects/scalacheck
Submodule scalacheck updated 1 files
+1 −1 build.sbt
2 changes: 1 addition & 1 deletion community-build/community-projects/scodec
Submodule scodec updated 1 files
+1 −1 build.sbt
2 changes: 1 addition & 1 deletion community-build/community-projects/scodec-bits
Submodule scodec-bits updated 1 files
+1 −1 build.sbt
2 changes: 1 addition & 1 deletion community-build/community-projects/sourcecode
2 changes: 1 addition & 1 deletion community-build/community-projects/stdLib213
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import java.nio.charset.StandardCharsets.UTF_8
lazy val communitybuildDir: Path = Paths.get(sys.props("user.dir"))

lazy val compilerVersion: String =
val file = communitybuildDir.resolve("dotty-bootstrapped.version")
val file = communitybuildDir.resolve("scala3-bootstrapped.version")
new String(Files.readAllBytes(file), UTF_8)

lazy val sbtPluginFilePath: String =
Expand Down
10 changes: 5 additions & 5 deletions dist/bin/common
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ find_lib () {
fi
}

DOTTY_COMP=$(find_lib "*dotty-compiler*")
DOTTY_INTF=$(find_lib "*dotty-interfaces*")
DOTTY_LIB=$(find_lib "*dotty-library*")
DOTTY_STAGING=$(find_lib "*dotty-staging*")
DOTTY_TASTY_INSPECTOR=$(find_lib "*dotty-tasty-inspector*")
DOTTY_COMP=$(find_lib "*scala3-compiler*")
DOTTY_INTF=$(find_lib "*scala3-interfaces*")
DOTTY_LIB=$(find_lib "*scala3-library*")
DOTTY_STAGING=$(find_lib "*scala3-staging*")
DOTTY_TASTY_INSPECTOR=$(find_lib "*scala3-tasty-inspector*")
TASTY_CORE=$(find_lib "*tasty-core*")
SCALA_ASM=$(find_lib "*scala-asm*")
SCALA_LIB=$(find_lib "*scala-library*")
Expand Down
6 changes: 3 additions & 3 deletions dist/bin/dotr → dist/bin/scala
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ if [ $execute_repl == true ] || ([ $execute_run == false ] && [ $options_indicat
if [ "$CLASS_PATH" ]; then
cp_arg="-classpath \"$CLASS_PATH\""
fi
echo "Starting dotty REPL..."
eval "\"$PROG_HOME/bin/dotc\" $cp_arg ${java_options[@]} -repl ${residual_args[@]}"
echo "Starting scala3 REPL..."
eval "\"$PROG_HOME/bin/scalac\" $cp_arg ${java_options[@]} -repl ${residual_args[@]}"
elif [ $execute_repl == true ] || [ ${#residual_args[@]} -ne 0 ]; then
cp_arg="$DOTTY_LIB$PSEP$SCALA_LIB"
if [ -z "$CLASS_PATH" ]; then
Expand All @@ -99,7 +99,7 @@ elif [ $execute_repl == true ] || [ ${#residual_args[@]} -ne 0 ]; then
cp_arg+="$PSEP$CLASS_PATH"
fi
if [ "$class_path_count" -gt 1 ]; then
echo "warning: multiple classpaths are found, dotr only use the last one."
echo "warning: multiple classpaths are found, scala only use the last one."
fi
if [ $with_compiler == true ]; then
cp_arg+="$PSEP$DOTTY_COMP$PSEP$TASTY_CORE$PSEP$DOTTY_INTF$PSEP$SCALA_ASM$PSEP$DOTTY_STAGING$PSEP$DOTTY_TASTY_INSPECTOR"
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions dist/bin/dotd → dist/bin/scalad
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ fi

source "$PROG_HOME/bin/common"

# Set dotty-doc dep:
DOTTY_DOC_LIB=$(find_lib "*dotty-doc*")
# Set scala3-doc dep:
DOTTY_DOC_LIB=$(find_lib "*scala3-doc*")

# Set flexmark deps:
FLEXMARK_LIBS=""
Expand Down
4 changes: 2 additions & 2 deletions docs/_includes/getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ <h1 id="getting-started">Try Dotty</h1>
<p>If you are a Linux or Windows user, download the <a href="https://github.com/lampepfl/dotty/releases">latest release</a>. Optionally add path of the folder <code>bin/</code> to the system environment variable <code>PATH</code>. </p>

<p>Now you can compile Scala source code:</p>
<pre><code>dotc hello.scala</code></pre>
<pre><code>scalac hello.scala</code></pre>

<p>To start the REPL, run: <code>dotr</code>.</p>
<p>To start the REPL, run: <code>scala</code>.</p>

<p>Or, you can try Dotty in your browser with <a href="https://scastie.scala-lang.org/?target=dotty">Scastie</a>.</p>

Expand Down
8 changes: 4 additions & 4 deletions docs/docs/contributing/debug-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Both are usually pre-installed on macOS and linux distributions.
First, compile the file `tests/debug/while.scala`:

```shell
$ dotc tests/debug/while.scala
$ scalac tests/debug/while.scala
```

Second, run the compiled class with debugging enabled (suppose the main class is `Test`):

```shell
$ dotr -d Test
$ scala -d Test
```

Third, start JDB:
Expand Down Expand Up @@ -83,13 +83,13 @@ compiler/test/debug/Gen tests/debug/while.scala > robot
First, compile the file `tests/debug/while.scala`:

```shell
$ dotc tests/debug/while.scala
$ scalac tests/debug/while.scala
```

Second, run the compiled class with debugging enabled:

```shell
$ dotr -d Test
$ scala -d Test
```

Finally, run the expect script:
Expand Down
Loading

0 comments on commit c0b527d

Please sign in to comment.