@@ -275,10 +275,6 @@ class Driver implements ServerStarter {
275275 /// A directory to analyze in order to train an analysis server snapshot.
276276 static const String TRAIN_USING = 'train-using' ;
277277
278- /// A flag indicating that the new code completion relevance computation
279- /// should be used to compute relevance scores.
280- static const String USE_NEW_RELEVANCE = 'use-new-relevance' ;
281-
282278 /// The builder for attachments that should be included into crash reports.
283279 CrashReportingAttachmentsBuilder crashReportingAttachmentsBuilder =
284280 CrashReportingAttachmentsBuilder .empty;
@@ -317,7 +313,6 @@ class Driver implements ServerStarter {
317313
318314 analysisServerOptions.clientVersion = results[CLIENT_VERSION ];
319315 analysisServerOptions.cacheFolder = results[CACHE_FOLDER ];
320- analysisServerOptions.useNewRelevance = results[USE_NEW_RELEVANCE ];
321316
322317 // Read in any per-SDK overrides specified in <sdk>/config/settings.json.
323318 var sdkConfig = SdkConfiguration .readFromSdk ();
@@ -719,14 +714,34 @@ class Driver implements ServerStarter {
719714 CommandLineParser _createArgParser () {
720715 var parser = CommandLineParser ();
721716 parser.addFlag (HELP_OPTION ,
722- help: 'print this help message without starting a server' ,
723- abbr: 'h' ,
724- defaultsTo: false ,
725- negatable: false );
717+ abbr: 'h' , negatable: false , help: 'Print this usage information.' );
726718 parser.addOption (CLIENT_ID ,
727- valueHelp: 'name' , help: 'an identifier used to identify the client' );
719+ valueHelp: 'name' , help: 'An identifier used to identify the client. ' );
728720 parser.addOption (CLIENT_VERSION ,
729- valueHelp: 'version' , help: 'the version of the client' );
721+ valueHelp: 'version' , help: 'The version of the client.' );
722+
723+ parser.addFlag (USE_LSP ,
724+ defaultsTo: false ,
725+ negatable: false ,
726+ help: 'Whether to use the Language Server Protocol (LSP).' );
727+
728+ parser.addOption (SDK_OPTION ,
729+ valueHelp: 'path' , help: 'The path to the Dart SDK.' );
730+ parser.addOption (CACHE_FOLDER ,
731+ valueHelp: 'path' ,
732+ help: 'The path to the location to write cache data.' );
733+
734+ parser.addOption (INSTRUMENTATION_LOG_FILE ,
735+ valueHelp: 'file path' ,
736+ help: 'Write instrumentation data to the given file.' );
737+ parser.addOption (NEW_ANALYSIS_DRIVER_LOG ,
738+ valueHelp: 'path' ,
739+ help: "Set a destination for the new analysis driver's log." );
740+ parser.addOption (PORT_OPTION ,
741+ valueHelp: 'port' ,
742+ help: 'The http diagnostic port to serve status and performance '
743+ 'information.' );
744+
730745 parser.addFlag (DISABLE_SERVER_EXCEPTION_HANDLING ,
731746 // TODO(jcollins-g): Pipeline option through and apply to all
732747 // exception-nullifying runZoned() calls.
@@ -738,51 +753,30 @@ class Driver implements ServerStarter {
738753 help: 'disable all completion features' , defaultsTo: false , hide: true );
739754 parser.addFlag (DISABLE_SERVER_FEATURE_SEARCH ,
740755 help: 'disable all search features' , defaultsTo: false , hide: true );
741- parser.addOption (INSTRUMENTATION_LOG_FILE ,
742- valueHelp: 'file path' ,
743- help: 'write instrumentation data to the given file' );
744756 parser.addFlag (INTERNAL_PRINT_TO_CONSOLE ,
745757 help: 'enable sending `print` output to the console' ,
746758 defaultsTo: false ,
747- negatable: false );
748- parser.addOption (NEW_ANALYSIS_DRIVER_LOG ,
749- valueHelp: 'path' ,
750- help: "set a destination for the new analysis driver's log" );
759+ negatable: false ,
760+ hide: true );
761+
751762 parser.addFlag (ANALYTICS_FLAG ,
752763 help: 'enable or disable sending analytics information to Google' ,
753764 hide: ! telemetry.SHOW_ANALYTICS_UI );
754765 parser.addFlag (SUPPRESS_ANALYTICS_FLAG ,
755766 negatable: false ,
756767 help: 'suppress analytics for this session' ,
757768 hide: ! telemetry.SHOW_ANALYTICS_UI );
758- parser.addOption (PORT_OPTION ,
759- valueHelp: 'port' ,
760- help: 'the http diagnostic port on which the server provides'
761- ' status and performance information' );
762- parser.addOption (SDK_OPTION ,
763- valueHelp: 'path' , help: 'Path to the Dart sdk' );
764- parser.addOption (CACHE_FOLDER ,
765- valueHelp: 'path' , help: 'Path to the location to write cache data' );
766- parser.addFlag (USE_LSP ,
767- defaultsTo: false ,
768- negatable: false ,
769- help: 'Whether to use the Language Server Protocol' );
770- parser.addFlag (ENABLE_COMPLETION_MODEL ,
771- help: 'Whether or not to turn on ML ranking for code completion' );
772- parser.addOption (COMPLETION_MODEL_FOLDER ,
773- valueHelp: 'path' ,
774- help: 'Path to the location of a code completion model' );
769+
775770 parser.addOption (TRAIN_USING ,
776771 valueHelp: 'path' ,
777772 help: 'Pass in a directory to analyze for purposes of training an '
778773 'analysis server snapshot.' );
779774
780- //
781- // Temporary flags.
782- //
783- parser.addFlag (USE_NEW_RELEVANCE ,
784- defaultsTo: true ,
785- help: 'Use the new relevance computation for code completion.' );
775+ parser.addFlag (ENABLE_COMPLETION_MODEL ,
776+ help: 'Whether or not to turn on ML ranking for code completion.' );
777+ parser.addOption (COMPLETION_MODEL_FOLDER ,
778+ valueHelp: 'path' ,
779+ help: 'Path to the location of a code completion model.' );
786780
787781 //
788782 // Deprecated options - no longer read from.
@@ -800,6 +794,8 @@ class Driver implements ServerStarter {
800794 parser.addFlag ('preview-dart-2' , hide: true );
801795 // Removed 11/12/2020.
802796 parser.addFlag ('useAnalysisHighlight2' , hide: true );
797+ // Removed 11/13/2020.
798+ parser.addFlag ('use-new-relevance' , hide: true );
803799 // Removed 9/23/2020.
804800 parser.addFlag ('use-fasta-parser' , hide: true );
805801
0 commit comments