-
Notifications
You must be signed in to change notification settings - Fork 74
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
Refactored to use canonical file names #171
Conversation
@basarat I've taken this PR further and I've refactored the
I'm not seeing a |
I've never seen it either. It makes no sense. Must be a very old (before 0.8.1) build :) |
Thanks. I have the refactoring done and all of the tests pass. I'll run all of my builds and if they're all okay, I'll update this PR so that you can have a look at it. |
@basarat Could you have a look over this PR? Changes can be summarized as follows:
|
Difficult to know without actually using. I trust you and you 👐 completely 🙌 🌹 |
If there's nothing that stands out as being an obvious error and if I haven't just made things more confusing, that's good. It seems that I have some further TypeScript 2.0 issues to get sorted. I'll continue to use this branch in anger for a while before I think about merging it. |
@basarat My TypeScript 2.0 problems seem to be related to the One thing I have noticed though is that 2.1.0 seems to be behaving quite differently. When |
@basarat Regarding |
TypeScript files get picked up with |
Yeah, |
Hmm. If I run |
@basarat Nope, I was wrong about If I run |
@basarat Reading the following PR/issue discussions, it seems that the change in behaviour (re: |
Yup 🌹 |
It's not the end of the world. |
I'll give this branch a bit more of a workout with my stuff and then I think I'll merge it. I believe it will fix the three outstanding bugs. I'll put the |
@basarat What are your thoughts on this change? It's a fix for #161 - which, it turns out, is a
tsify
problem and not a TypeScript problem.It seems that
tsify
's implementation ofgetCanonicalFileName
has always returned a relative path. That behaviour differs significantly from TypeScript's implementation - which returns either the original path or a lower-case copy of the path. With the changes made in TypeScript 2.0,tsify
's implementation now breaks thegetSourceFilePathInNewDir
function (in some circumstances).I have searched through the TypeScript source and it seems to me that
getCanonicalFileName
is used only when comparing paths, so its output shouldn't affect paths seen bytsify
.Can you think of any reason why the
tsify
implementation would be returning a relative path?This is a bug that's preventing me from using TypeScript 2.0, so I'd like to get it fixed. With the change, my TypeScript 1.8 builds are fine. (Although, I only use lower-case file names - so some further investigation will be required.) However, it's getting late, here, and I've made enough mistakes for the day, so I'll wait until tomorrow to install TypeScript 2.0 to see how it behaves.