Skip to content

Commit

Permalink
Scala compile flags: old "optimize" off; "Xcheckinit" & "unchecked" on
Browse files Browse the repository at this point in the history
"optimize" was deprecated for Scala 2.12
"Xcheckinit" will throw on uninitialized field access
"unchecked" warns on problems caused by type erasure
  • Loading branch information
jthywiss committed Aug 11, 2017
1 parent 08fe841 commit e139222
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PorcE/.settings/org.scala-ide.sdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.apt_generated=main
P=
Xcheckinit=false
Xcheckinit=true
Xdisable-assertions=false
Xelide-below=-2147483648
Xexperimental=false
Expand All @@ -26,7 +26,7 @@ feature=true
g=vars
no-specialization=false
nowarn=false
optimise=true
optimise=false
recompileOnMacroDef=true
relationsDebug=false
scala.compiler.additionalParams=-opt\:l\:classpath -opt-warnings
Expand All @@ -36,7 +36,7 @@ scala.compiler.useProjectSettings=true
src=main
stopBuildOnError=true
target=jvm-1.8
unchecked=false
unchecked=true
useScopesCompiler=true
verbose=false
withVersionClasspathValidator=true

1 comment on commit e139222

@arthurp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having Xcheckinit on is great for debugging, but this is yet another reason to have SBT (#200) because we really need to be able to turn it off for releases. Xcheckinit not only adds instructions to every Scala field access, it actually adds a field to every Scala object since the initialized status of fields needs to be tracked. So great for debugging, terrible for release builds.

Please sign in to comment.