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

#17542 enabling forceConsistentCasingInFileNames by default #27464

Closed
wants to merge 4 commits into from

Conversation

Almenon
Copy link

@Almenon Almenon commented Sep 30, 2018

This implements #17542 enable forceConsistentCasingInFileNames by default which fixes cross-platform compatability issues due to typescript not reporting different cases as an error in windows.

This is my first time modifying the typescript sourcecode, so hopefully I made the change in the right spot. I thought the PR would be a simple false -> true change in a config but apparently there's no central file for compiler option defaults.

In addition to this change the documentation at https://www.typescriptlang.org/docs/handbook/compiler-options.html would need to be updated.

This implements microsoft#17542 enable forceConsistentCasingInFileNames by default which fixes cross-platform compatability issues due to typescript not reporting different cases as an error in windows.

Making change in right repo & branch this time >_<
@msftclas
Copy link

msftclas commented Sep 30, 2018

CLA assistant check
All CLA requirements met.

src/compiler/program.ts Outdated Show resolved Hide resolved
@@ -588,23 +588,23 @@ export = C;
"/a/b/c.ts": `/// <reference path="D.ts"/>`,
"/a/b/d.ts": "var x"
});
test(files, { module: ModuleKind.AMD, forceConsistentCasingInFileNames: true }, "/a/b", /*useCaseSensitiveFileNames*/ false, ["c.ts", "d.ts"], [1149]);
Copy link
Member

@sheetalkamat sheetalkamat Jan 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to this, we should have test cases when forceConsistentCasingInFileNames is set to false now that its not default.

options.forceConsistentCasingInFileNames can't be null here
Copy link
Member

@sheetalkamat sheetalkamat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that both versions of each test behave similarly (with forceConsistentCasingInFileNames set to true and without forceConsistentCasingInFileNames value in compiler options) we need third equivalent of all test cases with forceConsistentCasingInFileNames set to false.

@RyanCavanaugh
Copy link
Member

Sorry, the comments in the suggestion review didn't get properly copied to the issue. Please see the issue for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants