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

Permit specification of 1.8 compiler options on properties page for Visual Studio projects #6767

Closed
NoelAbrahams opened this issue Jan 31, 2016 · 19 comments
Assignees
Labels
Visual Studio Integration with Visual Studio

Comments

@NoelAbrahams
Copy link

I would like to specify some of these options via the settings for a Visual Studio project.

--noImplicitReturns.
--noFallthroughCasesInSwitch
--allowJs

Currently, this is not possible:

image

I am aware that VS now supports .tsconfig. Is that going to be the only way forward?

@paulvanbrenk paulvanbrenk self-assigned this Jan 31, 2016
@paulvanbrenk paulvanbrenk added the Visual Studio Integration with Visual Studio label Jan 31, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Feb 1, 2016

have you considered using a tsconfig.json?

@NoelAbrahams
Copy link
Author

@mhegazy, as I said at the end of the post I was thinking along the same lines. But I'm not sure how tsconfig.json is going to play with NTVS projects. Are you pushing tsconfig.json as the comprehensive solution going forward?

@paulvanbrenk
Copy link
Contributor

tsconfig.json should work with all project types... if you run into issue I would love to hear about them.

NTVS projects was one of the reasons for broader tsconfig.json support, that way you can contain both the client- and server-side javascript in the same project, but use different settings for both.

@mhegazy
Copy link
Contributor

mhegazy commented Feb 1, 2016

tsconfig.json is where we would like the configuration to live moving forward. it is easier to edit and understand for most JS developers, and cheaper to change for us (vs. the property pages UI); also works well with other tools in the build chain.

@NoelAbrahams
Copy link
Author

@paulvanbrenk,@mhegazy, that's good to hear. We have some dependencies on the old _references.ts that we need to rewrite, before switching to tsconfig. I'll let you know how things go.

I'm also glad that NTVS is being taken into account on par with TypeScript development. Their project seems to be slowly lapsing into oblivion and as TypeScript moves forward, it's a bit worrying. There is no good alternative in Visual Studio for developing, testing and debugging TypeScript NodeJS projects. If you are privy to any information on this, I think a lot of people would be interested.

@mhegazy
Copy link
Contributor

mhegazy commented Feb 1, 2016

No "lapsing into oblivion", I would assure you. and we do care about our NodeJS developers. it is just hard to keep updating the UI for the property pages for every option added to the compiler, and tsconfig should solve that moving forward.

@NoelAbrahams
Copy link
Author

I was referring to the lack of commits in the NTVS github project - not to the commitment on the TypeScript side (which of course is exceptional). There are a few key issues that have not been resolved on the NTVS side (such as this one microsoft/nodejstools#223, which has been open since June last year).

@mhegazy
Copy link
Contributor

mhegazy commented Feb 1, 2016

that is what i meant :). @mousetraps can add more.

@mousetraps
Copy link

Hey @NoelAbrahams. @mhegazy is correct - in fact, we are actually in the midst of growing the team! The fact is, however, that we do have a very small core team, can only do so many things at any given time, and unfortunately much of the work that we have been doing lately is not externally visible. That said, your post prompted me to consider potential opportunities to improve communication going forward, so I really appreciate your feedback and would love for you to be involved in this discussion 😃. microsoft/nodejstools#677

@jslew
Copy link

jslew commented Feb 3, 2016

The problem for me is that the presence of tsconfig.json seems to shut off VS2015's "Compile On Save" option, despite the fact that it is not really a compiler-level option. So it's seemingly impossible to get "Compile On Save" and "AllowJs" at the same time without manually firing up an external "tsc --watch".

@mhegazy
Copy link
Contributor

mhegazy commented Feb 3, 2016

Compile on Save while you have a tsconfig.json is disabled by default, to enable it go to tools\options\Text Editor\TypeScript\Project and check "Automatically compile typescript files which are not part of a project". note that there is no way in TS 1.8 beta to disable/enable it for a single tsconfig.json file. With #2326, which should be in the next TS 1.8 release should have a property ("compileOnSave") to enable/disable Compile on Save in tsconfig.json.

@jslew
Copy link

jslew commented Feb 3, 2016

Thanks for the tip. That will work even if the files are part of the csproj?
On Feb 3, 2016 4:39 PM, "Mohamed Hegazy" notifications@github.com wrote:

Compile on Save while you have a tsconfig.json is disabled by default, to
enable it go to tools\options\Text Editor\TypeScript\Project and check
"Automatically compile typescript files which are not part of a project".
note that there is no way in TS 1.8 beta to disable/enable it for a single
tsconfig.json file. With #2326
#2326, which should be in
the next TS 1.8 release should have a property ("compileOnSave") to
enable/disable Compile on Save in tsconfig.json.


Reply to this email directly or view it on GitHub
#6767 (comment)
.

@mhegazy
Copy link
Contributor

mhegazy commented Feb 20, 2016

Starting with 1.8.2, setting "compileOnSave" in your tsconfig should enable/disable the feature for this tsconfig.json file.

@mhegazy
Copy link
Contributor

mhegazy commented Feb 20, 2016

@NoelAbrahams
Copy link
Author

@mhegazy, the original problem was not to do with compile-on-save; it was to permit all compiler options to be settable via the setting page. As it stands it doesn't make much sense.

Why not just have a free text box so that users can set what they like?

@paulvanbrenk
Copy link
Contributor

@NoelAbrahams not sure what you mean with a free text box? But I am working on an easier to maintain properties page, so adding changes will be easier in the future.

@NoelAbrahams
Copy link
Author

Just a text box to enter any compiler option that one may want, e.g.
image

This just gets passed to the compiler.

I'm not sure if this is great UX, but at least it'll get the job done.

@mhegazy
Copy link
Contributor

mhegazy commented Feb 22, 2016

json files provide a similar experience, and most js devleopers are already familiar with its syntax. so my recommendation still stands.

@NoelAbrahams
Copy link
Author

Well, yes, we'll probably migrate to using the json config at some point ourselves. My point had more do to with leaving behind a half complete settings page.

@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
Visual Studio Integration with Visual Studio
Projects
None yet
Development

No branches or pull requests

5 participants