Skip to content

Fix typo in FromExpr#BooleanFromExpr #11337

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 service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 173 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
91fbe52
Merge pull request #1 from lampepfl/master
Iltotore Dec 13, 2020
3d4b02e
Vulpix preserves language flags
som-snytt Nov 6, 2020
8096394
Vulpix simply adds language flags
som-snytt Nov 6, 2020
0796461
Simple case working
natsukagami Jan 24, 2021
e5b9210
Test for simple case
natsukagami Jan 24, 2021
dde8fdc
Inline non-transparent calls after Pickler
nicolasstucki Oct 22, 2020
b703406
Force inlining in conditions of `inline if`s
nicolasstucki Jan 21, 2021
823185d
Remove taransparent from assert
nicolasstucki Jan 22, 2021
ff97f28
Remove transparent from valueOf
nicolasstucki Jan 22, 2021
ed1072e
Add back assert to transparent and remove nn
nicolasstucki Jan 22, 2021
14e6d28
remove transparent from typeChecks
nicolasstucki Jan 22, 2021
b1bd9be
remove some transparent inlines
nicolasstucki Jan 22, 2021
072e71a
Remove `transparent`s from Tuple
nicolasstucki Jan 25, 2021
af91ebe
Remove alll transparent from tuples
nicolasstucki Jan 26, 2021
d71a64e
Cleanup
nicolasstucki Jan 26, 2021
3b16547
Split neg tests that fail in different phases
nicolasstucki Jan 26, 2021
a87dbde
Check inline conformant after inlining
nicolasstucki Jan 26, 2021
acdb5db
Remove transparent from summonAll
nicolasstucki Jan 27, 2021
d02b865
Improve impure message
nicolasstucki Jan 27, 2021
da59cad
Fix missing inlining in checkCompiles
nicolasstucki Jan 27, 2021
67658c8
Fix double main reporint to sbt and disable some tests
nicolasstucki Jan 28, 2021
e483d23
Rename compiler flag
nicolasstucki Jan 28, 2021
4a7e576
Avoid double traversal of tree
nicolasstucki Jan 28, 2021
99014e0
Split conditions to run Staging and PickleQuotes
nicolasstucki Jan 28, 2021
077d364
Avoid running PickleQuotes when possible
nicolasstucki Jan 28, 2021
7085eee
Patch tuples
nicolasstucki Jan 28, 2021
1f4e3e6
Add valueof to from-tasty blacklist
nicolasstucki Jan 29, 2021
04989b1
Adapt tests
nicolasstucki Jan 29, 2021
bd41f01
Patch test
nicolasstucki Jan 29, 2021
5e489ea
Document failures
nicolasstucki Jan 29, 2021
b850f2a
Remove some transparent form Tuple
nicolasstucki Jan 29, 2021
4953991
Workaround #11247
nicolasstucki Jan 29, 2021
90e5733
Move i7580.scala to tests/pos-deep-subtype
nicolasstucki Feb 1, 2021
2f4ee75
Update TupleOps TODO message
nicolasstucki Feb 1, 2021
f96ced3
Update inlinr givens in shapeless
nicolasstucki Feb 1, 2021
1333adf
List failing CommunityBuildTestA tests
nicolasstucki Feb 1, 2021
fc04bcd
Move type ascription
nicolasstucki Feb 1, 2021
0858612
Add regression test
nicolasstucki Feb 1, 2021
c455e84
Fix position of typeCheckErrors
nicolasstucki Feb 1, 2021
caa1a79
Fix utest tesing macro
nicolasstucki Feb 1, 2021
7e40bb2
Update izumi-reflect
nicolasstucki Feb 2, 2021
b6371ea
Update scalatest
nicolasstucki Feb 2, 2021
0206a6e
Update docs
nicolasstucki Feb 2, 2021
6251b0f
Update izumi-reflect
nicolasstucki Feb 2, 2021
72765f9
Temporarely disable izumiReflect
nicolasstucki Feb 2, 2021
c17e82a
Re-enable sbt-dotty tests
nicolasstucki Feb 2, 2021
1b7dcd1
Only run inlining phase when needed
nicolasstucki Feb 2, 2021
4cb4bbb
Add quotes.isWhileTyping
nicolasstucki Feb 2, 2021
e33c632
Fix needsInlining condition for inline val rhs check
nicolasstucki Feb 2, 2021
df1ba15
Force inline scrutinees of inline matches
nicolasstucki Feb 2, 2021
e3858e4
Re-enable izumi-reflect tests
nicolasstucki Feb 3, 2021
d335b0f
Review
nicolasstucki Feb 4, 2021
dd24130
Update shapeless
nicolasstucki Feb 4, 2021
f465f6a
Update community build
nicolasstucki Feb 4, 2021
adee773
Update utest
nicolasstucki Feb 4, 2021
9a6af34
Remove indirection of IArray operations
nicolasstucki Feb 4, 2021
aee1555
Add regression test
nicolasstucki Feb 4, 2021
321ece8
Keep documentation in one place.
romanowski Feb 4, 2021
53d69cd
Refactor inlining condition logic
nicolasstucki Feb 5, 2021
977b622
Allow new import syntax
odersky Jan 29, 2021
4243201
Support simple renaming imports in Typer
odersky Jan 30, 2021
5f302ac
Adapt printing of imports to new scheme
odersky Jan 30, 2021
bc6ff3f
Update tests to new syntax
odersky Jan 30, 2021
8445d3c
Offer rewriting to new import syntax
odersky Jan 30, 2021
9e1a53a
Update docs
odersky Jan 30, 2021
cd5805c
Add imports docpage
odersky Jan 30, 2021
f2020e1
Refine simple renaming imports and disallow them for exports
odersky Jan 31, 2021
1ef6abd
Specify export restrictions more precisely in doc page
odersky Jan 31, 2021
6842650
Add an explanation about using opaque types on classes
b-studios Feb 5, 2021
c7ad884
Fix typo
b-studios Feb 5, 2021
4cbe9c8
Make it possible to always set the prefix of denotations
smarter Feb 3, 2021
90513d9
Merge pull request #2 from lampepfl/master
Iltotore Feb 7, 2021
651660a
fix: typo in FromExpr#BooleanFromExpr
Iltotore Feb 7, 2021
faf8716
Allow to define trait parameters via overrides
odersky Feb 7, 2021
7c3dce2
Fix unpickling of match type aliases
odersky Feb 7, 2021
16bf86f
Merge pull request #11330 from dotty-staging/reuseSymDenotations
smarter Feb 7, 2021
0823a8f
Fix test
odersky Feb 7, 2021
891a96a
Check if needs inline only for RefTree and GenericApply trees
nicolasstucki Feb 8, 2021
eb71997
Merge pull request #11338 from dotty-staging/fix-11214
odersky Feb 8, 2021
d220b95
Add icons to symbols on page
pikinier20 Jan 28, 2021
1518b38
CRs + add icons to navigation
pikinier20 Feb 2, 2021
d74d05d
Extend search by acronym to fuzzy search by tokens
pikinier20 Jan 25, 2021
9f9eb0c
Add tests to scala3doc-js
pikinier20 Jan 26, 2021
8f8c351
UX improvements for searchbar: input focusing, arrows handling
pikinier20 Jan 26, 2021
a64a34f
Add JS tests to GH workflow
pikinier20 Feb 1, 2021
72b0729
Fix conflicts after scaladoc rename
pikinier20 Feb 8, 2021
dea04b3
Only force inline conditions of inline if
nicolasstucki Feb 8, 2021
ec71a61
Remove redundant check
nicolasstucki Feb 8, 2021
bdf2482
Check rhs of inline val after Inlining phase
nicolasstucki Feb 8, 2021
49c59f5
Merge pull request #11328 from dotty-staging/docs/opaques-on-classes
odersky Feb 8, 2021
c3e26df
Merge pull request #11268 from lampepfl/scala3doc/symbol-icons
romanowski Feb 8, 2021
ce8b3bd
Fix presentation of HKT and TypeLambdas in Scala3doc
BarkingBad Jan 13, 2021
068ad0a
Apply suggestions from code review
odersky Feb 8, 2021
804a111
Fix HKTs signatures for nested HKTs
BarkingBad Feb 1, 2021
fbf3e8e
Revert memberInfo extraction for typedefs
BarkingBad Feb 1, 2021
15000f3
Rebase fixes
BarkingBad Feb 8, 2021
1598da1
Add configurable social links to scala3doc
pikinier20 Feb 1, 2021
0a835cf
Add IArray.toSeq
nicolasstucki Feb 4, 2021
69d363b
Merge pull request #11267 from lampepfl/scala3doc/js-tests
romanowski Feb 8, 2021
3f1e20a
Merge pull request #9984 from dotty-staging/move-blackbox-macro-exapn…
nicolasstucki Feb 8, 2021
bea5619
Merge pull request #11273 from lampepfl/scala3doc/social-links2
romanowski Feb 8, 2021
1feff79
A type that contains all Seq methods as extension methods
odersky Feb 8, 2021
ed5ecac
Merge pull request #11244 from dotty-staging/change-imports
odersky Feb 8, 2021
8ff63f2
Merge pull request #11345 from dotty-staging/add-IArray-toSeq
nicolasstucki Feb 8, 2021
c84ff29
Add regression test for #10301
griggt Feb 9, 2021
6a5565d
Merge pull request #11351 from griggt/fix-#10301
nicolasstucki Feb 9, 2021
cd7df9c
Merge pull request #10216 from som-snytt/issue/test-language
anatoliykmetyuk Feb 9, 2021
2b86d82
Add sealed keyword to graphs to put emphasis on sealed relation
BarkingBad Jan 27, 2021
3c837f9
Merge pull request #11321 from romanowski/scaladoc/docs-cleanup
romanowski Feb 9, 2021
8d043f4
Don't generate JavaArrayTypes in class constants
odersky Feb 9, 2021
16f8f26
Change 3.1 to future
odersky Feb 9, 2021
c85c836
Update doc pages
odersky Feb 9, 2021
7657ec9
Fix rebase breakage
odersky Feb 9, 2021
801f9d8
Fix footer layouts in doc
romanowski Feb 9, 2021
585c5e6
Merge pull request #11245 from BarkingBad/scala3doc/missing-wildcard-…
BarkingBad Feb 9, 2021
ef48716
Merge pull request #11232 from BarkingBad/scala3doc/sealed-classes
BarkingBad Feb 9, 2021
c8891ea
Upgrade to ASM 9.1
smarter Feb 9, 2021
a66eaf3
Merge pull request #11359 from dotty-staging/upgrade/asm-9.1
smarter Feb 9, 2021
5fcc131
Incremental compilation: handle constructor proxies
smarter Feb 9, 2021
bcaac78
Update docs/docs/reference/contextual/context-bounds.md
odersky Feb 9, 2021
709aba8
Fix typo in comment
mikesamuel Feb 9, 2021
6d293d9
Merge pull request #11356 from dotty-staging/fix-11353
nicolasstucki Feb 10, 2021
7843d7e
Remove unnecessary ClassTags
nicolasstucki Feb 10, 2021
c4b4d15
Make Repeaded a regression test
nicolasstucki Feb 10, 2021
b3f302e
Merge pull request #11365 from mikesamuel/patch-1
nicolasstucki Feb 10, 2021
a4f009d
Merge pull request #11368 from dotty-staging/remove-unnecessary-class…
nicolasstucki Feb 10, 2021
5b46900
Merge pull request #11355 from dotty-staging/change-future-source
odersky Feb 10, 2021
12bc226
Alternative layout for IArray definition
nicolasstucki Feb 5, 2021
a27ffeb
Merge pull request #11329 from dotty-staging/alternative-definition-l…
nicolasstucki Feb 10, 2021
0732386
Merge multiple parameter lists in resolveOverloaded
odersky Feb 10, 2021
27f0fda
Add subclasses case to test
natsukagami Feb 10, 2021
b0d6455
Add :exit as alias of :quit in REPL
riiswa Feb 10, 2021
37258d0
Cache safely promoted potentials
natsukagami Feb 10, 2021
aef96f6
Support all combinations of explicit type parameters
odersky Feb 10, 2021
c812c5d
Add comment
odersky Feb 10, 2021
74df435
Merge pull request #11370 from riiswa/feature/quit_alias
OlivierBlanvillain Feb 10, 2021
759c803
Merge pull request #11348 from dotty-staging/iarray-extensions
nicolasstucki Feb 10, 2021
226e809
Recover the denotation of constant-folded selections
smarter Feb 10, 2021
9834cae
Merge pull request #11360 from dotty-staging/inc-constructor-proxy
bishabosha Feb 10, 2021
6fe5f8e
Merge pull request #11369 from dotty-staging/fix-11358
odersky Feb 10, 2021
16170a5
Merge pull request #11340 from dotty-staging/fix-11250
odersky Feb 10, 2021
a7cb965
Merge pull request #11357 from romanowski/scaladoc/fix-footer
romanowski Feb 10, 2021
18a1b58
bump sbt to 1.4.7
ttim Feb 10, 2021
85b699e
Add missing IArray operations
nicolasstucki Feb 9, 2021
04ea027
Add converion from IArray to immutable.ArraySeq
nicolasstucki Feb 11, 2021
7aa0fb1
Merge pull request #11380 from ttim/tabishev/bump_sbt
nicolasstucki Feb 11, 2021
3fb4f79
replace dottydoc with scaladoc
romanowski Feb 8, 2021
0f78f73
remove dotty doc code
romanowski Feb 8, 2021
190e127
Fix community build after removal of scala3-doc
romanowski Feb 9, 2021
2af295e
Create scaladoc script and replace scalad
romanowski Feb 10, 2021
ba6a323
Doc do not fail for empty (or java) modules
romanowski Feb 10, 2021
58e0618
Fix tests in scaladoc
romanowski Feb 10, 2021
cccfb15
Fix cmd tests for scaladoc
romanowski Feb 10, 2021
7b11f0e
Add option to run single tests from community build
romanowski Feb 10, 2021
022835f
Scala doc support for MillSome of mill projects are added to communit…
romanowski Feb 10, 2021
ee5ce8e
Ignore docs for now, fix typos
romanowski Feb 10, 2021
5de44e0
Fix upload action
romanowski Feb 11, 2021
2f91572
Merge pull request #11373 from dotty-staging/exp/tasty-symbol
odersky Feb 11, 2021
8136b5c
Add comments
nicolasstucki Feb 11, 2021
a55b18c
Delegate implementation of IArrayBuilder to ArrayBuilder
nicolasstucki Feb 11, 2021
b26da40
Move IArrayBuilder to scala.collection.mutable
nicolasstucki Feb 11, 2021
ccc77d4
Fix links to members inside package objects, links containing hashes.…
pikinier20 Feb 10, 2021
e0e2263
Merge pull request #11349 from romanowski/scaladoc/remote-dottydoc
anatoliykmetyuk Feb 11, 2021
ad7ab97
Use implicit defs for conversions to avoid Dummy param
nicolasstucki Feb 11, 2021
f02b8e2
Make test fail again
natsukagami Feb 11, 2021
4124ce0
Merge pull request #11383 from pikinier20/top-level-bug
romanowski Feb 11, 2021
9039341
Align converions with Array conversions in Predef
nicolasstucki Feb 11, 2021
46c0540
Cleanup imports
nicolasstucki Feb 11, 2021
0b9c017
Make add all also recive Arrays
nicolasstucki Feb 11, 2021
cb47acd
Merge pull request #11278 from natsukagami/early-promote-this
liufengyun Feb 11, 2021
c265957
Remove IArrayBuilder
nicolasstucki Feb 11, 2021
4cb5617
git: rebase and squash from parent branch
Iltotore Feb 11, 2021
38848c1
Merge remote-tracking branch 'origin/master'
Iltotore Feb 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- name: Add SBT proxy repositories
run: cp -vf .github/workflows/repositories /root/.sbt/ ; true

- name: Test
- name: Cmd Tests
run: |
./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"
./project/scripts/bootstrapCmdTests
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/scaladoc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
with:
java-version: 11

- name: Compile and test scala3doc-js
run: ./project/scripts/sbt scaladoc-js/test

- name: Compile and test
run: ./project/scripts/sbt scaladoc/test

Expand Down Expand Up @@ -66,7 +69,7 @@ jobs:
DOC_DEST=pr-${PR_NUMBER:-${GITHUB_REF##*/}}
echo uplading docs to https://scala3doc.virtuslab.com/$DOC_DEST
az storage container create --name $DOC_DEST --account-name scala3docstorage --public-access container
az storage blob sync -s scaladoc/output -c $DOC_DEST --account-name scala3docstorage
az storage blob upload-batch -s scaladoc/output -d $DOC_DEST --account-name scala3docstorage

community-docs:
env:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,9 @@ community-build/sbt-scalajs-sbt
*.check.out
!/dist/bin/

# semanticdb test output files
*.expect.scala.out
*.expect.out

# Bloop
.bsp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class TupleOps {
def tupleMergeSort(tuple: Tuple): Tuple =
if (tuple.size <= 1) tuple
else {
val (tuple1, tuple2) = tuple.splitAt(tuple.size / 2)
val (tuple1, tuple2) = tuple.splitAt(tuple.size / 2): (Tuple, Tuple)// TODO remove ascriptions (issue with type variable constraints)
val (sorted1, sorted2) = (tupleMergeSort(tuple1), tupleMergeSort(tuple2))
tupleMerge(sorted1, sorted2)
}
Expand Down
2 changes: 1 addition & 1 deletion bench/tests/Vector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package immutable

import scala.annotation.unchecked.uncheckedVariance
import scala.compat.Platform
import scala.collection.generic._
import scala.collection.generic.*
import scala.collection.mutable.Builder
import compiletime.uninitialized

Expand Down
2 changes: 1 addition & 1 deletion bench/tests/power-macro/PowerInlined-1.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object PowerInlined {
import PowerMacro._
import PowerMacro.*

power(1, 5.0) // 1 quotes to unpickle
}
2 changes: 1 addition & 1 deletion bench/tests/power-macro/PowerInlined.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object PowerInlined {
import PowerMacro._
import PowerMacro.*

power(1, 5.0) // 1 quotes to unpickle
}
2 changes: 1 addition & 1 deletion bin/scalad → bin/scaladoc
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/scalad" "$@"
"$ROOT/bin/common" "$ROOT/dist/target/pack/bin/scaladoc" "$@"
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
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`
Expand All @@ -12,6 +10,7 @@ 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-tasty-inspector-nonbootstrapped` = Build.`scala3-tasty-inspector-nonbootstrapped`
val `scala3-language-server` = Build.`scala3-language-server`
val `scala3-bench` = Build.`scala3-bench`
val `scala3-bench-bootstrapped` = Build.`scala3-bench-bootstrapped`
Expand All @@ -21,6 +20,7 @@ val `tasty-core` = Build.`tasty-core`
val `tasty-core-bootstrapped` = Build.`tasty-core-bootstrapped`
val `tasty-core-scala2` = Build.`tasty-core-scala2`
val scaladoc = Build.scaladoc
val `scaladoc-nonBootstrapped` = Build.`scaladoc-nonBootstrapped`
val `scaladoc-testcases` = Build.`scaladoc-testcases`
val `scaladoc-js` = Build.`scaladoc-js`
val `scala3-bench-run` = Build.`scala3-bench-run`
Expand Down
2 changes: 1 addition & 1 deletion community-build/community-projects/geny
Submodule geny updated 1 files
+8 −0 build.sc
2 changes: 1 addition & 1 deletion community-build/community-projects/upickle
Submodule upickle updated 1 files
+9 −0 build.sc
47 changes: 35 additions & 12 deletions community-build/src/scala/dotty/communitybuild/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,36 @@ object Main:
e.printStackTrace()
Nil

def withProjects[T](names: Seq[String], opName: String)(op: CommunityProject => T): Seq[T] =
val missing = names.filterNot(projectMap.contains)
if missing.nonEmpty then
val allNames = allProjects.map(_.project).mkString(", ")
println(s"Missing projects: ${missing.mkString(", ")}. All projects: $allNames")
sys.exit(1)

val (failed, completed) = names.flatMap(projectMap.apply).partitionMap( o =>
try
Right(op(o))
catch case e: Throwable =>
e.printStackTrace()
Left(o)
)

if failed.nonEmpty then
println(s"$opName failed for ${failed.mkString(", ")}")
sys.exit(1)

completed

/** Allows running various commands on community build projects. */
def main(args: Array[String]): Unit =
args.toList match
case "publish" :: name :: Nil =>
case "publish" :: names if names.nonEmpty =>
withProjects(names, "Publishing")(_.publish())

case "build" :: names if names.nonEmpty =>
withProjects(names, "Build")(_.build())

case "doc" :: "all" :: destStr :: Nil =>
val dest = Paths.get(destStr)
Seq("rm", "-rf", destStr).!
Expand Down Expand Up @@ -66,26 +92,23 @@ object Main:
sys.exit(1)

case "doc" :: names if names.nonEmpty =>
val missing = names.filterNot(projectMap.contains)
if missing.nonEmpty then
println(s"Missing projects: ${missing.mkString(", ")}. All projects: ${allProjects.mkString(", ")}")
sys.exit(1)

val failed = names.filter{ p =>
val docsRoots = generateDocs(projectMap(p))
val failed = withProjects(names, "Documenting"){ p =>
val docsRoots = generateDocs(p)
println(docsRoots)
if docsRoots.nonEmpty then println(s"Docs for $p generated in $docsRoots")
docsRoots.isEmpty
}
if docsRoots.isEmpty then Some(p.project) else None
}.flatten

if failed.nonEmpty then
println(s"Documentation not found for ${failed.mkString(", ")}")
sys.exit(1)

case args =>
println("USAGE: <COMMAND> <PROJECT NAME>")
println("COMMAND is one of: publish doc")
println("COMMAND is one of: publish doc run")
println("Available projects are:")
allProjects.foreach { k =>
println(s"\t$k")
println(s"\t${k.project}")
}
sys.exit(1)

36 changes: 24 additions & 12 deletions community-build/src/scala/dotty/communitybuild/projects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,24 @@ sealed trait CommunityProject:
if exitCode != 0 then
throw RuntimeException(s"Doc command exited with code $exitCode for project $project. Project details:\n$this")

final def build(): Int = exec(projectDir, binaryName, buildCommands: _*)

final def buildCommands = runCommandsArgs :+ testCommand

end CommunityProject

final case class MillCommunityProject(
project: String,
baseCommand: String,
dependencies: List[CommunityProject] = Nil) extends CommunityProject:
dependencies: List[CommunityProject] = Nil,
ignoreDocs: Boolean = false,
) extends CommunityProject:
override val binaryName: String = "./mill"
override val testCommand = s"$baseCommand.test"
override val publishCommand = s"$baseCommand.publishLocal"
override val docCommand = null
// uncomment once mill is released
// if ignoreDocs then null else s"$baseCommand.docJar"
override val runCommandsArgs = List("-i", "-D", s"dottyVersion=$compilerVersion")

final case class SbtCommunityProject(
Expand Down Expand Up @@ -160,10 +168,9 @@ final case class SbtCommunityProject(
"""set testOptions in Global += Tests.Argument(TestFramework("munit.Framework"), "+l"); """
++ s"$baseCommand$sbtTestCommand"

override val publishCommand = if sbtPublishCommand eq null then null else
val disableDocCommand =
if sbtDocCommand eq null then "" else "set every useScaladoc := false;"
s"$baseCommand$disableDocCommand$sbtPublishCommand"
override val publishCommand =
if sbtPublishCommand eq null then null else s"$baseCommand$sbtPublishCommand"

override val docCommand =
if sbtDocCommand eq null then null else
val cmd = if sbtDocCommand.startsWith(";") then sbtDocCommand else s";$sbtDocCommand"
Expand All @@ -175,7 +182,7 @@ final case class SbtCommunityProject(
case Some(ivyHome) => List(s"-Dsbt.ivy.home=$ivyHome")
case _ => Nil
extraSbtArgs ++ sbtProps ++ List(
"-sbt-version", "1.4.4",
"-sbt-version", "1.4.7",
"-Dsbt.supershell=false",
s"--addPluginSbtFile=$sbtPluginFilePath"
)
Expand All @@ -195,11 +202,13 @@ object projects:
lazy val utest = MillCommunityProject(
project = "utest",
baseCommand = s"utest.jvm[$compilerVersion]",
ignoreDocs = true
)

lazy val sourcecode = MillCommunityProject(
project = "sourcecode",
baseCommand = s"sourcecode.jvm[$compilerVersion]",
ignoreDocs = true
)

lazy val oslib = MillCommunityProject(
Expand All @@ -211,7 +220,8 @@ object projects:
lazy val oslibWatch = MillCommunityProject(
project = "os-lib",
baseCommand = s"os.watch[$compilerVersion]",
dependencies = List(utest, sourcecode)
dependencies = List(utest, sourcecode),
ignoreDocs = true
)

lazy val ujson = MillCommunityProject(
Expand Down Expand Up @@ -241,13 +251,15 @@ object projects:
lazy val fansi = MillCommunityProject(
project = "fansi",
baseCommand = s"fansi.jvm[$compilerVersion]",
dependencies = List(utest, sourcecode)
dependencies = List(utest, sourcecode),
ignoreDocs = true
)

lazy val pprint = MillCommunityProject(
project = "PPrint",
baseCommand = s"pprint.jvm[$compilerVersion]",
dependencies = List(fansi)
dependencies = List(fansi),
ignoreDocs = true
)

lazy val requests = MillCommunityProject(
Expand Down Expand Up @@ -409,7 +421,7 @@ object projects:
sbtTestCommand = "testsJVM/test;testsJS/test;",
// Hardcode the version to avoid having to deal with something set by sbt-dynver
sbtPublishCommand = s"""set every version := "${Versions.munit}"; munitJVM/publishLocal; munitJS/publishLocal; munitScalacheckJVM/publishLocal; munitScalacheckJS/publishLocal; junit/publishLocal""",
sbtDocCommand = "munitJVM/doc",
sbtDocCommand = "junit/doc; munitJVM/doc",
dependencies = List(scalacheck)
)

Expand Down Expand Up @@ -627,7 +639,7 @@ object projects:
sbtPublishCommand = "publishLocal",
dependencies = List(scalatest)
)

lazy val perspective = SbtCommunityProject(
project = "perspective",
// No library with easy typeclasses to verify data against exist for Dotty, so no tests yet
Expand Down Expand Up @@ -702,4 +714,4 @@ def allProjects = List(
projects.perspective,
)

lazy val projectMap = allProjects.map(p => p.project -> p).toMap
lazy val projectMap = allProjects.groupBy(_.project)
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ abstract class CommunityBuildTest:
*/
extension (self: CommunityProject) def run()(using suite: CommunityBuildTest) =
self.dependencies.foreach(_.publish())
suite.test(self.project, self.binaryName, self.runCommandsArgs :+ self.testCommand)
suite.test(self)

/** Build the given project with the published local compiler and sbt plugin.
*
Expand All @@ -34,10 +34,14 @@ abstract class CommunityBuildTest:
* a build tool like SBT or Mill
* @param arguments Arguments to pass to the testing program
*/
def test(project: String, command: String, arguments: Seq[String]): Unit = {
def test(projectDef: CommunityProject): Unit = {
val project = projectDef.project
val command = projectDef.binaryName
val arguments = projectDef.buildCommands

@annotation.tailrec
def execTimes(task: => Int, timesToRerun: Int): Boolean =
val exitCode = task
def execTimes(task: () => Int, timesToRerun: Int): Boolean =
val exitCode = task()
if exitCode == 0
then true
else if timesToRerun == 0
Expand All @@ -60,7 +64,7 @@ abstract class CommunityBuildTest:
|""".stripMargin)
}

val testsCompletedSuccessfully = execTimes(exec(projectDir, command, arguments: _*), 3)
val testsCompletedSuccessfully = execTimes(projectDef.build, 3)

if (!testsCompletedSuccessfully) {
fail(s"""
Expand Down
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/backend/jvm/BCodeIdiomatic.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ trait BCodeIdiomatic {
case "14" => asm.Opcodes.V14
case "15" => asm.Opcodes.V15
case "16" => asm.Opcodes.V16
case "17" => asm.Opcodes.V17
}

lazy val majorVersion: Int = (classfileVersion & 0xFF)
Expand Down
Loading