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

forceConsistentCasingInFileNames does not work #42270

Open
cybermerlin opened this issue Jan 9, 2021 · 4 comments
Open

forceConsistentCasingInFileNames does not work #42270

cybermerlin opened this issue Jan 9, 2021 · 4 comments
Labels
Needs More Info The issue still hasn't been fully clarified

Comments

@cybermerlin
Copy link

cybermerlin commented Jan 9, 2021

Bug Report

 File name '/mnt/d/src/progress/styles/index.ts' differs from already included file name '/mnt/d/src/Progress/styles/index.ts' only in casing.

I found on this link the test:
4600d1b

Which helps to understand.
image

Second question: why this test was deleted from the master branch?

🔎 Search Terms

Duplicate #25460, but not resolved yet.

🕗 Version & Regression Information

tsc - 4.1.3
node - lts
npm - lts

  • This is a crash
  • This changed between versions ______ and _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______

⏯ Playground Link

Playground link with relevant code

💻 Code

// We can quickly address your report if:
//  - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
//  - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.
//  - The incorrectness of the behavior is readily apparent from reading the sample.
// Reports are slower to investigate if:
//  - We have to pare too much extraneous code.
//  - We have to clone a large repo and validate that the problem isn't elsewhere.
//  - The sample is confusing or doesn't clearly demonstrate what's wrong.

🙁 Actual behavior

🙂 Expected behavior

@RyanCavanaugh RyanCavanaugh added the Needs More Info The issue still hasn't been fully clarified label Jan 11, 2021
@RyanCavanaugh
Copy link
Member

We'd need some way to reproduce the problem in order to investigate. This usually indicates a configuration error in your project

@cybermerlin
Copy link
Author

for to reproduce - just copy here commit with here Test and execute gulp tests from runTests directory

@sheetalkamat
Copy link
Member

sheetalkamat commented Jan 12, 2021

That test case was replaced by baseline and it is working as intended https://github.com/microsoft/TypeScript/blob/master/tests/baselines/reference/tscWatch/forceConsistentCasingInFileNames/when-renaming-file-with-different-casing.js.
Failure you see is because error messaging has changed.

We would need exact repro.

@cybermerlin
Copy link
Author

cybermerlin commented Jan 30, 2021

So, I figured out what situation this event occurs, but there is absolutely no time to make corrections to the typescript, I hope you will still want to fix it (because the test you replaced consistently gives an error, and the same is repeated in my project).

The bottom line is this - if in the dependencies of some of the packages from the package.json of my project there is some package with the same name as my class, BUT with different registers, then this causes a build error.

/package.json

{
  "dependencies": {
    "material-ui": "*",           <<< this component have components with the name "progress"
    "@widgets/progress": "file://./widgets/progress"
  }
}

/widgets/progress/Progress.tsx
/widgets/progress/index.tsx

/index.tsx

import progress from "@widgets/progress";

function Main() {
  return <Progress />;
}
export default Main;

excuse me, but I've no time today to reproduce in the isolated repo.

PS: in my case, I just renamed my class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs More Info The issue still hasn't been fully clarified
Projects
None yet
Development

No branches or pull requests

3 participants