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

Provide a "Build Order" property for TypeScript files in Visual Studio #2181

Closed
NoelAbrahams opened this issue Mar 2, 2015 · 6 comments
Closed
Labels
Declined The issue was declined as something which matches the TypeScript vision Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript Visual Studio Integration with Visual Studio

Comments

@NoelAbrahams
Copy link

Hi,

The request is for something like the following on the properties page for a file.

image

At present this ordering needs to be specified in _references.ts. The properties page is a more natural way for Visual Studio users to specify file-level actions.

Another alternative is for the ordering to be determined automatically: If Type B is the base class for Type C and they both exist in the same project then the file in which Type B is defined must be compiled first.

@danquirk
Copy link
Member

danquirk commented Mar 2, 2015

I don't think we're about to get into the business of trying to automatically deduce file ordering so I'll address the other part of this proposal:

Having to check each file's metadata to understand the build order seems like really bad UX to me. It's essentially impossible to get a holistic view of the build order, there's even more metadata tied up in annoying tool windows (and doesn't work in loose file scenarios), and it's super painful to update the values across a project. What happens when I want to insert a new file at build order 3 in a project with many files?

I get the pain you're feeling with _references.ts and /// references but I'm pretty skeptical that this is the best way to address those problems.

@danquirk danquirk added the Suggestion An idea for TypeScript label Mar 2, 2015
@NoelAbrahams
Copy link
Author

Yes, I see the point about bad UX. What's a good long term solution, though?

Why not ditch .csproj and create a brand new .tsproj? The NTVS people have done that with their .njsproj and they've created some nice functionality around it.

All it needs is a simple box where files can be added if ordering needs to be specified.

@danquirk
Copy link
Member

danquirk commented Mar 2, 2015

Solution Explorer should probably just reflect the correct file order and support re-ordering files rather than an alphabetical ordering (this is how F# handles the same problem).

@NoelAbrahams
Copy link
Author

So, it's just a case of nipping down the hall to where the F# guys are holed up, and asking to borrow their code, right?

@NoelAbrahams
Copy link
Author

Probably a bit obvious, but we should be able to specify the order of folders in the project as well.

@mhegazy mhegazy added Visual Studio Integration with Visual Studio Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. labels Dec 9, 2015
@mhegazy mhegazy added the Declined The issue was declined as something which matches the TypeScript vision label Feb 22, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Feb 22, 2016

using _references.ts, tsconfig.json with files property, or just adding ///<references> directives in your project should solve the issue.

@mhegazy mhegazy closed this as completed Feb 22, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Declined The issue was declined as something which matches the TypeScript vision Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript Visual Studio Integration with Visual Studio
Projects
None yet
Development

No branches or pull requests

3 participants