-
Notifications
You must be signed in to change notification settings - Fork 585
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
expand typescript search paths on windows to cover all new typescript… #1308
Conversation
e4715d6
to
a24c38b
Compare
@@ -40,8 +40,7 @@ type TypeScriptParams = | |||
/// Specifies the timeout for the TypeScript compiler. | |||
TimeOut : TimeSpan } | |||
|
|||
let private TypeScriptCompilerPath = | |||
@"[ProgramFilesX86]\Microsoft SDKs\TypeScript\1.0\;[ProgramFiles]\Microsoft SDKs\TypeScript\1.0\;[ProgramFilesX86]\Microsoft SDKs\TypeScript\0.9\;[ProgramFiles]\Microsoft SDKs\TypeScript\0.9\" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is gone completely? is it backwards compatible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of explicitly hard-coding the versions we support by default (1.0, 0.9 currently), the new code discovers what versions the user has installed and uses the latest they have. This could invisibly upgrade some users to a more recent version of tsc, yes, but if they are dependent on a particular version of tsc we should encourage them to set their tools path.
|> List.map (fun p -> p </> TypeScriptCompilerPrefix) | ||
|> List.collect (fun p -> try System.IO.DirectoryInfo(p).GetDirectories() |> List.ofArray with | _ -> []) | ||
|> List.map (fun di -> di.FullName) | ||
|> List.sortDescending |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorting by name will only work for single-digit versions - this will pick 9.0 over 10.0 for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was going to address that this morning, commits incoming :)
let me know when things are ready. thx |
…ulti-digit versions
Alright, version checks are in and this should be good to go. |
@forki this is ready to go. |
thx |
… compilers, prefering most recent.
On my machine this returns the following list:
val it : string list =
["C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8";
"C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.5";
"C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0"]
choosing tsc.exe from 1.8 at the end. there may be underlying issues with ordering, but this is more future-proof than the current implementation.
This fixes #1284