-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add more options #142
base: main
Are you sure you want to change the base?
Add more options #142
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,9 @@ private[scalacoptions] trait ScalacOptions { | |
): ScalacOption = | ||
ScalacOption(option, args, isSupported) | ||
|
||
/** Set the encoding to UTF-8 */ | ||
val encodingUTF8 = encoding("utf8") | ||
|
||
/** Specify character encoding used by source files. | ||
*/ | ||
def encoding(enc: String) = | ||
|
@@ -60,6 +63,12 @@ private[scalacoptions] trait ScalacOptions { | |
val feature = | ||
ScalacOption("-feature", _ => true) | ||
|
||
/** Turn on bracket-less style */ | ||
val indent = other("-indent", _ >= V3_0_0) | ||
|
||
/** Turn off bracket-less style */ | ||
val noIndent = other("-no-indent", _ >= V3_0_0) | ||
|
||
/** Compile for a specific version of the Java platform. Supported targets: 8, 9, ..., 17, 18. | ||
* | ||
* The release flag is supported only on JDK 9 and above, since it relies on the functionality | ||
|
@@ -157,6 +166,10 @@ private[scalacoptions] trait ScalacOptions { | |
val languageStrictEquality = | ||
languageFeatureOption("strictEquality", version => version >= V3_0_0) | ||
|
||
/** Enable dynamics support. */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm also wondering is this worth adding, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm using it in some project and I though i'd be useful - If isn't we can remove it, np |
||
val languageDynamics = | ||
languageFeatureOption("dynamics") | ||
|
||
/** Preferred language feature options. | ||
*/ | ||
val languageFeatureOptions: Set[ScalacOption] = ListSet( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure including this option is necessary, We already include utf encoding in default options:
scalac-options/lib/src/main/scala/org/typelevel/scalacoptions/ScalacOptions.scala
Line 888 in ed64f8d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just because it's widely used with UTF-8, I've always seen this setting set with UTF-8