Skip to content

Support the "dart.analysisExcludedFolders" setting in LSP #2680

Closed

Description

@DanTup

In dart-lang/sdk#36064 we stopped sending errors for excluded files, so this setting should no longer be necessary.

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    in editorRelates to code editing or language features
    on Jul 29, 2020
  2. added this to the v3.14.0 milestone on Jul 29, 2020
  3. DanTup commented on Aug 5, 2020

    @DanTup
    MemberAuthor

    Found another place that was relying on this - the Dart SDK repo (which may not be able to use the analysis_option.yaml setting):

    dart-lang/sdk#35562

    @dcharkes this option is going to stop working when moving to LSP anyway, so I think we need to find another fix if the SDK repo still needs it. Do you know if that's still the case? (and if so, does enabling dart.previewLsp in your VS Code settings break it again?)

  4. modified the milestones: v3.14.0, On Deck on Aug 5, 2020
  5. added a commit that references this issue on Aug 5, 2020
    52fb7e9
  6. dcharkes commented on Aug 10, 2020

    @dcharkes

    I've been working around it by just manually adding subfolders to the analysis_options.yaml.

    (Side note: the whole situation has become worse with NNBD - because now we have tons of files which give either give errors with NNBD turned on (--enable-experiment=non-nullable) or give errors with NNBD turned off error • This requires the 'non-nullable' language feature to be enabled.)

  7. DanTup commented on Aug 10, 2020

    @DanTup
    MemberAuthor

    I've been working around it by just manually adding subfolders to the analysis_options.yaml.

    Does this mean you won't be negatively affected if I removed this setting?

    Side note: the whole situation has become worse with NNBD - because now we have tons of files which give either give errors with NNBD turned on

    I don't know if it'll work (or be easy to maintain), but I use a .code-workspace file that only adds the folders I need to work on (though for me that's a very small list!):

    {
    	"folders": [
    		{
    			"path": "/Users/danny/Dev/Google/dart-sdk/sdk/pkg/analysis_server"
    		},
    		{
    			"path": "/Users/danny/Dev/Google/dart-sdk/sdk/pkg/analyzer"
    		},
    		{
    			"path": "/Users/danny/Dev/Google/dart-sdk/sdk/pkg/analyzer_plugin"
    		}
    	],
    	"settings": {
    		"dart.sdkPath": "/Users/danny/Dev/Dart SDKs/nightly-2020-08-04"
    	}
    }

    This starts up quickly as it's analysing a lot less code, and also avoids all those other folders.

  8. modified the milestones: On Deck, v3.14.0 on Aug 10, 2020
  9. dcharkes commented on Aug 10, 2020

    @dcharkes

    I don't know if it'll work (or be easy to maintain), but I use a .code-workspace file that only adds the folders I need to work on (though for me that's a very small list!)

    I use VSCode as my file browser basically 🙈 , so that doesn't work for me.

    Does this mean you won't be negatively affected if I removed this setting?

    No. Thanks for asking!

  10. DanTup commented on Sep 2, 2020

    @DanTup
    MemberAuthor

    I'm reverting this and bring back the setting (at least for now). There are other cases that this supports where analysis_options won't help (for example you open a multi-root workspace in VS Code and want some non-Dart folder to be excluded entirely, to avoid the needless file scanning - #2524 (comment)).

    I'll look into supporting this in some form for LSP as this seems like a fair requirement.

  11. reopened this on Sep 2, 2020
  12. changed the title [-]Remove the "dart.analysisExcludedFolders" setting[/-] [+]Support the "dart.analysisExcludedFolders" setting in LSP[/+] on Sep 2, 2020
  13. modified the milestones: v3.14.0, v3.15.0 on Sep 2, 2020
  14. DanTup commented on Sep 23, 2020

    @DanTup
    MemberAuthor

    This is now supported in the LSP server too with dart-lang/sdk@f7b1a1e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions