| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -90,10 +90,14 @@ def write_arg_file(arg_file, args): | |||
| 90 | 90 | def compile_to_dir(build_dir, srcs, version, classpath, java_classpath, output): | |
| 91 | 91 | # Use kotlinc to compile .kt files: | |
| 92 | 92 | kotlin_arg_file = build_dir + '/kotlin.args' | |
| 93 | - kotlin_args = ['-Werror', | ||
| 94 | - '-opt-in=kotlin.RequiresOptIn', | ||
| 95 | - '-opt-in=org.jetbrains.kotlin.ir.symbols.IrSymbolInternals', | ||
| 96 | - '-d', output, | ||
| 93 | + opt_in_args = ['-opt-in=kotlin.RequiresOptIn'] | ||
| 94 | + if version.lessThan(kotlin_plugin_versions.Version(2, 0, 0, "")): | ||
| 95 | + opt_in_args.append('-opt-in=org.jetbrains.kotlin.ir.symbols.IrSymbolInternals') | ||
| 96 | + else: | ||
| 97 | + opt_in_args.append('-opt-in=org.jetbrains.kotlin.ir.symbols.UnsafeDuringIrConstructionAPI') | ||
| 98 | + kotlin_args = ['-Werror'] \ | ||
| 99 | + + opt_in_args \ | ||
| 100 | + + ['-d', output, | ||
| 97 | 101 | '-module-name', 'codeql-kotlin-extractor', | |
| 98 | 102 | '-Xsuppress-version-warnings', | |
| 99 | 103 | '-language-version', version.toLanguageVersionString(), | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,6 +27,9 @@ def toTupleWithTag(self): | |||
| 27 | 27 | def toTupleNoTag(self): | |
| 28 | 28 | return [self.major, self.minor, self.patch] | |
| 29 | 29 | ||
| 30 | + def lessThan(self, other): | ||
| 31 | + return self.toTupleNoTag() < other.toTupleNoTag() | ||
| 32 | + | ||
| 30 | 33 | def lessThanOrEqual(self, other): | |
| 31 | 34 | return self.toTupleNoTag() <= other.toTupleNoTag() | |
| 32 | 35 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments