Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS language service ignoring flags with exclude/files directives in tsconfig.json #7044

Closed
oising opened this issue Feb 12, 2016 · 7 comments
Labels
Needs More Info The issue still hasn't been fully clarified

Comments

@oising
Copy link

oising commented Feb 12, 2016

I am using 1.8 beta. I am also using aurelia framework inside an aspnet5 project. I have configured the module loader, SystemJS, to transpile my TS files. I do *not * want VS to build the TS files. I control this by using a tsconfig.json in the root of the aspnet5 project, which excludes "wwwroot" (along with node_modules, jspm_packages) from compilation. Unfortunately, it appears this also prevents essential flags specified - such as "experimentalDecorators" in this file from being picked up by the language service for excluded folders/files. This gives me annoying red squigglies everywhere complaining that I should specify the flag. If I comment out the wwwroot exlcusion, the squigglies go away.

Therefore, I suggest that the exclude/files directives should only apply to the compiler pass (they are under "compilerOptions" after all,) and not the ambient language service, or you should add a distinct block for controlling the language service flags in tsconfig.json, or even use a separate tsserver.json file. I need support for decorators in intellisense, but I have no intention of using the build process to compile. Make sense?

@oising oising changed the title VS language service should NOT heed exclude/files directives in tsconfig.json VS language service / intellisense ignoring flags when exclude/files directives in tsconfig.json Feb 12, 2016
@oising oising changed the title VS language service / intellisense ignoring flags when exclude/files directives in tsconfig.json VS language service ignoring flags with exclude/files directives in tsconfig.json Feb 12, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Feb 12, 2016

@oising, i can not piece together what is not working in your scenario. can you share a repro project?

@mhegazy mhegazy added the Needs More Info The issue still hasn't been fully clarified label Feb 12, 2016
@paulvanbrenk
Copy link
Contributor

@mhegazy I can..

What @oising wants it to block msbuild from invoking the compiler, excluding all files will not allow you to do that.

What the tsconfig.json does in Visual Studio is create a 'mini-project', for that 'mini-project' it defines settings how to interpret the TypeScript files. The name compilerOptions maybe a not so great choice, but it's what we have... further you don't users who actually want to compile duplicate the settings between a file used for Visual Studio and the compiler.

Now, the option you're looking for is actually part of ASP.NET v5, by disabling the checkbox, MSBuild will no longer invoke the TypeScript compiler.

image

Hth

@oising
Copy link
Author

oising commented Feb 14, 2016

@paulvanbrenk Yes, that's what I would like, yes. Except in a regular asp.net 4.6 project, not in a aspnet5/core/dnx project.

@oising
Copy link
Author

oising commented Feb 14, 2016

@mhegazy Basically I want to enable decorators for intellisense purposes, yet exclude all TS files from compilation by VS/msbuild because I have another process that will do that.

@paulvanbrenk
Copy link
Contributor

You can modify your project file for the ASP.NET v4 and add a <TypeScriptCompileBlocked>true< ../> property to one of the property groups. That should give you the same behavior.

@oising
Copy link
Author

oising commented Feb 18, 2016

@paulvanbrenk Cheers Paul. Yay for seemingly undocumented obscure magic xml elements without schema!

@mhegazy
Copy link
Contributor

mhegazy commented Feb 20, 2016

@mhegazy mhegazy closed this as completed Feb 20, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs More Info The issue still hasn't been fully clarified
Projects
None yet
Development

No branches or pull requests

3 participants