Contributions to the Flix project ↩
This document presents ongoing works, pull requests and issues we have submitted so far to the Flix project. |
none
Id | Opened | Closed | Description | Action |
---|---|---|---|---|
#4896 | 14.11.2022 | 14.11.2022 | chore: update Scala 2 version | Reverted by #4916 |
Work in Progress ▴
This section presents some of our unpublished works to improve the Flix software.
-
Supported Scala 2 version(obsolete since October 7th 2022)Note: Commit 61d7e00 from Magnus makes this local change obsolete.
Flix is currently built upon Scala 2.13.5 (see
build.gradle
). Moving to current Scala 2.13.9 requires to rename all occurences ofenum
toenum0
(i.e. parameter names),enumSym
(i.e. case classes) orenumDecl
(i.e. local vars). The reason is straightforward: the latest Scala 2 distributions now definesenum
as a reserved keyword in order to ease the migration to Scala 3.Concretely we have updated the following Scala source files in directory
main\src\ca\uwaterloo\flix\
:api/lsp/LocationLink.scala api/lsp/provider/FindReferencesProvider.scala api/lsp/provider/HighlightProvider.scala language/ast/Symbol.scala language/phase/Inliner.scala language/phase/Namer.scala language/phase/PatternExhaustiveness.scala language/phase/Redundancy.scala language/phase/Resolver.scala language/phase/Typer.scala language/phase/Weeder.scala language/phase/jvm/GenExpression.scala language/phase/jvm/JvmOps.scala language/phase/util/PredefinedClasses.scala
-
Build dependencies
Build dependencies are defined in
build.gradle
and are currently outdated (October 2022).A quick modification shows that only two external libraries require the Flix source code to be updated, namely
json4s
andscalatest/scalactic
.Current dependencies:
dependencies { // ... implementation files('lib/org.java_websocket-1.3.9.jar') implementation files('lib/org.jline-3.5.1.jar') implementation files('lib/org.json4s-ast-3.5.5.jar') implementation files('lib/org.json4s-core-3.5.5.jar') implementation files('lib/org.json4s-native-3.5.5.jar') implementation files('lib/org.objectweb.asm-9.2.jar') implementation files('lib/org.parboiled-2.2.1.jar') implementation files('lib/org.scalactic-3.0.8.jar') implementation files('lib/org.scalatest-3.0.8.jar') implementation files('lib/scala.collection.parallel-0.2.0.jar') implementation files('lib/scala.xml-1.2.0.jar') implementation files('lib/scopt_2.13-4.0.1.jar') implementation files('lib/shapeless-2.3.3.jar') }
Updated dependencies:
dependencies { // ... implementation files('lib/org.java_websocket-1.5.3.jar') implementation files('lib/org.jline-3.21.0.jar') implementation files('lib/org.json4s-ast-3.5.5.jar') // unchanged implementation files('lib/org.json4s-core-3.5.5.jar') // unchanged implementation files('lib/org.json4s-native-3.5.5.jar') // unchanged implementation files('lib/org.objectweb.asm-9.4.jar') implementation files('lib/org.parboiled_2.13-2.4.1.jar') implementation files('lib/org.scalactic-3.0.8.jar') // unchanged implementation files('lib/org.scalatest-3.0.8.jar') // unchanged implementation files('lib/scala-parallel-collections_2.13-1.0.4.jar') implementation files('lib/scala-xml_2.13-2.1.0.jar') implementation files('lib/scopt_2.13-4.1.0.jar') implementation files('lib/shapeless_2.13-2.3.10.jar') }
-
Major issue with build times
Scala Version Build Times Average 2.13.5 (<0.38.0) 1:52, 1:53, 1:56, 1:52, 1:55, 1:58, 1:55 1:54 2.13.6 7:52, 7:40, 7:53 7:46 2.13.7 7:37, 6:52, 7:07 7:00 2.13.8 7:49 7:49 2.13.9 7:23 7:23 2.13.10 7:31 7:31 2.13.11 (0.38.0+) 2:16, 2:04, 2:02, 2:12 2:11 2.13.12 (0.43.0+) 2:03, 2:05, 2:05, 2:02 2:04 Workaround 1 (provisory) Disable pattern matching analysis by writing
"-Xno-patmat-analysis"
instead of"-Ypatmat-exhaust-depth", "400"
in build filebuild.gradle
.