Skip to content

Editor prompts me to configure exclude #9594

Closed

Description

@elsigh
  • VSCode Version: 1.3.1
  • OS Version: Mac OSX El Capitan 10.11.5

Steps to Reproduce:

  1. Create a jsconfifg.json
    Here's mine:
{
    "compilerOptions": {
        "target": "ES6",
        "module": "es6"
    },
    "exclude": [
        "bower_components",
        "node_modules"
    ]
}
  1. VSCode continues to prompt me to configure excludes
    image

Activity

  1. kieferrm commented on Jul 22, 2016

    @kieferrm
    Member

    Lindsey Simon (@elsigh) just checking: Your file is jsconfig.json, correct?

  2. elsigh commented on Jul 22, 2016

    @elsigh
    Author

    Indeed, jsconfig.json

    When I click the bug it opens my jsoncfig.json file even.
    But it is true that I have a lot of files in subdirectories there.

    I'll see if it continues to happen as I'm pretty excited about using vscode going forward!

  3. jrieken commented on Jul 25, 2016

    @jrieken
    Contributor

    Lindsey Simon (@elsigh) Can you hover over the message and let me know what the full reading is? There should be more folders

  4. elsigh commented on Jul 25, 2016

    @elsigh
    Author

    image

    But that's my primary project working directory ;) I don't want to exculde it.

  5. jrieken commented on Jul 25, 2016

    @jrieken
    Contributor

    😄 that makes sense. The logic to compute the exclude suggestions isn't very smart and doesn't go deep. Meaning that when there is a large folder inside the ConsumerWeb folder we point to the parent only.

    My question is if your project is actually that large or if this is caused by some dependencies or temp files (like ember serve easily creates 20mb of JS files)

  6. elsigh commented on Jul 25, 2016

    @elsigh
    Author

    That folder is 10MB of actual code and some images but there are no temp things / build artifacts. Is there a way to exclude particular directories within a folder (e.g. **/img/)?

    I do also have a number of things excluded in files.exclude and search.exclude (the exact same things fwiw, which seems redundant) and Quick Open is reasonable at least.

  7. jrieken commented on Jul 25, 2016

    @jrieken
    Contributor

    Yeah, in jsconfig you cannot use glob patterns but you can spell out the full relative path to exclude things. Tho, by default the language brain only loads js and d.ts files. If with that you hit a limit there is only the option of multiple jsonfig files in subdirectories left...

  8. elsigh commented on Jul 25, 2016

    @elsigh
    Author

    Ok, then it sounds like I don't need to exclude image directories anyway (but that accounts for some of the 10MB I mentioned earlier). It does seem that once I dismiss this warning it shouldn't continue to come back to bother me.

  9. jrieken commented on Jul 25, 2016

    @jrieken
    Contributor

    Well, the problem is that language service is really struggling with large amount of files. Can you run wc -l 'find . -iname "*.js"' (' is actually a back tick) in a terminal to see with how many lines of JS code we are dealing? Or, iff possible, can you share the project with me?

  10. elsigh commented on Jul 25, 2016

    @elsigh
    Author

    I can't share the code with you, but here's the result for that directory:
    29264 total

  11. added
    upstream
    on Jul 26, 2016
  12. jrieken commented on Jul 26, 2016

    @jrieken
    Contributor

    That should be OK. Today the warning is generated when there are more then 500 files. Once we adopt a newer version of TypeScript the language service will tell us more precisely when it has to much to chew on

  13. 29 remaining items

  14. peabnuts123 commented on Sep 11, 2017

    @peabnuts123

    I think this should be re-opened. I am working on a project that has >1000 js files in it, so vscode has started giving me this warning every time I open the project which is very disruptive. I have no way of disabling it, but my use-case is perfectly legitimate. That seems like a defect to me

  15. mjbvz commented on Sep 11, 2017

    @mjbvz
    Contributor

    If you are seeing this, please open a new issue. It's much easier to track instances of these sort of problems in separate issues since the root causes are often different

    For the new issue, please describe your basic project layout and also try checking the TS Server log to see if any odd files are being included:

    1. Set "typescript.tsserver.log": "verbose"
    2. Reproduce the issue
    3. Run Open TS Server log in vscode
    4. In the tsserver.log file, there should be lists of all the files that are in your project. These are printed in blocks that look like:
    Info 3182 [14:47:23.682] Project '/Users/matb/projects/TypeScript-TmLanguage/build/tsconfig.json' (Configured) 0
    Info 3182 [14:47:23.682] 	/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/lib.d.ts
    	/Users/matb/projects/TypeScript-TmLanguage/build/node_modules/@types/js-yaml/index.d.ts
    	/Users/matb/projects/TypeScript-TmLanguage/build/build.ts
    	/Users/matb/projects/TypeScript-TmLanguage/build/index.d.ts
    	/Users/matb/projects/TypeScript-TmLanguage/build/node_modules/@types/node/index.d.ts
    
    Info 3182 [14:47:23.682] -----------------------------------------------
    Info 3182 [14:47:23.682] Project '/dev/null/inferredProject2*' (Inferred) 1
    Info 3182 [14:47:23.682] 	/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/extensions/node_modules/typescript/lib/lib.es6.d.ts
    	/Users/matb/projects/TypeScript-TmLanguage/node_modules/xcson/lib/xcson.js
    	/Users/matb/projects/TypeScript-TmLanguage/node_modules/typeof/index.js
    	/Users/matb/projects/TypeScript-TmLanguage/node_modules/cson2yaml/lib/cson2yaml.js
    	/Users/matb/projects/TypeScript-TmLanguage/index.js
    	/Users/matb/Library/Caches/typescript/2.5/node_modules/@types/node/index.d.ts
    

    Scan through these project lists to see if anything stands out

  16. peabnuts123 commented on Sep 11, 2017

    @peabnuts123

    I can open a new issue if necessary for visibility but it is exactly as described in this one, I am unsure if that's the right thing to do.

    tsserver.log has the Project … (Configured) line that you have shown followed by about ~7 random files (I can't see how these 7 files are related). Further down, there is a section titled Sending request and then some JSON representing a large number of files, all the JS files in my project (>1000). From my understanding, this large number of files is triggering this warning, as described in the original issue.

  17. mjbvz commented on Sep 11, 2017

    @mjbvz
    Contributor

    Yes please open a new issue. This makes it easier to track the characteristics of just your project. 1000 files should not crash typescript unless the files are very large, so I suspect there is something else at play here

  18. senocular commented on Oct 2, 2017

    @senocular

    Did anyone create a new issue yet? I see this in 1.17 (insiders). For getting any work done I'm still on 1.13.1 since that was the last build where this wasn't a problem.

  19. peabnuts123 commented on Oct 2, 2017

    @peabnuts123

    No, sorry, I have not yet created a new issue. I think it is kind of generally related to my vscode chugging in general (due to a couple of related factors) which is triggering the TSServer to say that it is lagging.

  20. senocular commented on Oct 4, 2017

    @senocular

    Human-a I still see it with 1.16.1 too.

  21. Fasani commented on Oct 5, 2017

    @Fasani

    How to disable this really annoying stupid warning?

  22. peabnuts123 commented on Oct 8, 2017

    @peabnuts123

    Improvements to 1.17 + resetting my PRAM seems to have entirely removed this issue for me. I think I've been facing a general swathe of performance issues that resetting my PRAM may have mitigated, and this was related to all of that.

  23. voltrevo commented on Oct 9, 2017

    @voltrevo

    I'm also still getting this in 1.16.1. Been putting up with this longer than I can remember. My excludes are configured. We need a setting to make this message go away or set the heuristic file limit higher or... something.

    Actually in my case it's this very similar message:
    screen shot 2017-10-09 at 3 24 20 pm

  24. rpavlovs commented on Oct 17, 2017

    @rpavlovs

    Same issue here. MacOS, VSCode 1.17.1

  25. Fasani commented on Oct 18, 2017

    @Fasani

    I fixed this by just explicitly including what I needed rather than excluding hundreds of other folders:

    "include": [ "userapp/static/js/" ]

  26. locked and limited conversation to collaborators on Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

javascriptupstream

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions