diff --git a/ide/CHANGELOG.md b/ide/CHANGELOG.md index 61f263585a2a..bad2af86c8c0 100644 --- a/ide/CHANGELOG.md +++ b/ide/CHANGELOG.md @@ -1,5 +1,17 @@ # Next Release +
![New Features](/docs/assets/tags/new_features.svg) + +
![Bug Fixes](/docs/assets/tags/bug_fixes.svg) + +#### Visual Environment + +- [Fixed parsing of the `--no-data-gathering` command line option.][1831] Flag's + name has been changed to `--data-gathering`, so now `--data-gathering=false` + and `--data-gathering=true` are supported as well. + +[1831]: https://github.com/enso-org/ide/pull/1831 + # Enso 2.0.0-alpha.14 (2021-09-02)
![New Features](/docs/assets/tags/new_features.svg) @@ -8,7 +20,7 @@ - [Visualization previews are disabled.][1817] Previously, hovering over a node's output port for more than four seconds would temporarily reveal the - node's visualization. This behavior is disabled now. + node's visualization. This behavior is disabled now [1817]: https://github.com/enso-org/ide/pull/1817 diff --git a/ide/src/js/lib/client/src/index.js b/ide/src/js/lib/client/src/index.js index 633be5414292..df51c354f650 100644 --- a/ide/src/js/lib/client/src/index.js +++ b/ide/src/js/lib/client/src/index.js @@ -207,9 +207,9 @@ optParser.options('crash-report-host', { default : cfg.defaultLogServerHost }) -optParser.options('no-data-gathering', { - describe : 'Disable the sharing of any usage data', - default : false +optParser.options('data-gathering', { + describe : 'Enable the sharing of any usage data', + default : true }) @@ -540,7 +540,7 @@ function createWindow() { dark_theme : Electron.nativeTheme.shouldUseDarkColors, high_contrast : Electron.nativeTheme.shouldUseHighContrastColors, crash_report_host : args.crashReportHost, - no_data_gathering : args.noDataGathering, + data_gathering : args.dataGathering, node_labels : args.nodeLabels, verbose : args.verbose, } diff --git a/ide/src/js/lib/content/src/index.ts b/ide/src/js/lib/content/src/index.ts index 998f40f99423..043ca8db3f4c 100644 --- a/ide/src/js/lib/content/src/index.ts +++ b/ide/src/js/lib/content/src/index.ts @@ -32,8 +32,7 @@ class ContentApi { private logger: MixpanelLogger initLogging(config: Config) { - assert(typeof config.no_data_gathering == 'boolean') - if (!config.no_data_gathering) { + if (config.data_gathering) { this.logger = new MixpanelLogger() if (ok(config.email)) { this.logger.identify(config.email) @@ -813,7 +812,7 @@ class Config { public wasm_glue_url: string public node_labels: boolean public crash_report_host: string - public no_data_gathering: boolean + public data_gathering: boolean public is_in_cloud: boolean public verbose: boolean public authentication_enabled: boolean @@ -826,7 +825,7 @@ class Config { config.wasm_url = '/assets/ide.wasm' config.wasm_glue_url = '/assets/wasm_imports.js' config.crash_report_host = cfg.defaultLogServerHost - config.no_data_gathering = false + config.data_gathering = true config.is_in_cloud = false config.entry = null config.authentication_enabled = true @@ -868,9 +867,7 @@ class Config { this.crash_report_host = ok(other.crash_report_host) ? tryAsString(other.crash_report_host) : this.crash_report_host - this.no_data_gathering = ok(other.no_data_gathering) - ? tryAsBoolean(other.no_data_gathering) - : this.no_data_gathering + this.data_gathering = parseBoolean(other.data_gathering) ?? this.data_gathering this.is_in_cloud = ok(other.is_in_cloud) ? tryAsBoolean(other.is_in_cloud) : this.is_in_cloud @@ -878,6 +875,16 @@ class Config { } } +function parseBoolean(value:any): boolean | null { + if (value === 'true' || value === true) { + return true + } else if (value === 'false' || value === false) { + return false + } else { + return null + } +} + /// Check whether the value is a string with value `"true"`/`"false"`, if so, return the // appropriate boolean instead. Otherwise, return the original value. function parseBooleanOrLeaveAsIs(value: any): any { diff --git a/ide/src/rust/ide/lib/args/src/lib.rs b/ide/src/rust/ide/lib/args/src/lib.rs index 7bb626fd0f55..ec875e269b03 100644 --- a/ide/src/rust/ide/lib/args/src/lib.rs +++ b/ide/src/rust/ide/lib/args/src/lib.rs @@ -38,7 +38,7 @@ ensogl::read_args! { wasm_glue_url : String, node_labels : bool, crash_report_host : String, - no_data_gathering : bool, + data_gathering : bool, is_in_cloud : bool, verbose : bool, }