From 59c41e111d3d538c07a461a52fd91401964de916 Mon Sep 17 00:00:00 2001 From: Sergey Rostov Date: Fri, 10 Aug 2018 11:09:47 +0300 Subject: [PATCH] K2JSCompilerArguments: sourceMapEmbedSources should be null by default. When sourceMapEmbedSources are not null and source maps is disabled warning is reported, since it has effect only when source maps are enabled. Also this fixes some JPS JS with warnings count assertions. --- .../kotlin/cli/common/arguments/K2JSCompilerArguments.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JSCompilerArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JSCompilerArguments.kt index 2b6ce988760..fb9d401e360 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JSCompilerArguments.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JSCompilerArguments.kt @@ -55,13 +55,17 @@ class K2JSCompilerArguments : CommonCompilerArguments() { ) var sourceMapBaseDirs: String? by NullableStringFreezableVar(null) + /** + * SourceMapEmbedSources should be null by default, since it has effect only when source maps are enabled. + * When sourceMapEmbedSources are not null and source maps is disabled warning is reported. + */ @GradleOption(DefaultValues.JsSourceMapContentModes::class) @Argument( value = "-source-map-embed-sources", valueDescription = "{ always, never, inlining }", description = "Embed source files into source map" ) - var sourceMapEmbedSources: String? by NullableStringFreezableVar(K2JsArgumentConstants.SOURCE_MAP_SOURCE_CONTENT_INLINING) + var sourceMapEmbedSources: String? by NullableStringFreezableVar(null) @GradleOption(DefaultValues.BooleanTrueDefault::class) @Argument(value = "-meta-info", description = "Generate .meta.js and .kjsm files with metadata. Use to create a library")