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

Watch mode logs lower case file name for newly added file #2422

Closed
Prinzhorn opened this issue Jul 30, 2022 · 2 comments
Closed

Watch mode logs lower case file name for newly added file #2422

Prinzhorn opened this issue Jul 30, 2022 · 2 comments

Comments

@Prinzhorn
Copy link

This is just a minor bug I just noticed, but maybe this has some bigger consequences (why would esbuild use the lower case name at all? Even for caching, my file system is case sensitive)

I added an import to a non-existant file EditRawResponse.svelte. Then I added the file. Esbuild will then log the added file name as lower case. Editing the file and saving it again logs the correct file name. This is on 0.14.51

✘ [ERROR] Could not resolve "./EditRawResponse.svelte"

    components/FlowDetails.svelte:62:28:
      62 │ import EditRawResponse from './EditRawResponse.svelte';
         ╵                             ~~~~~~~~~~~~~~~~~~~~~~~~~~

2 errors
[watch] build finished
[watch] build started (change: "components/editrawresponse.svelte")  <============== Why is this lower case?
[watch] build finished
[watch] build started (change: "components/EditRawResponse.svelte")
@evanw
Copy link
Owner

evanw commented Jul 30, 2022

I think I can fix this aesthetically. But it's important to know that internally esbuild uses case-insensitive file names on all platforms. This is for cross-platform portability since case-insensitivity is common on both macOS and Windows. It would be bad for a build on a case-sensitive file system to suddenly fail on a case-insensitive file system. For example, this prevents CI from passing on Linux only for the build to fail on macOS.

@evanw evanw closed this as completed in 40ef633 Jul 30, 2022
@Prinzhorn
Copy link
Author

Thanks!

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

No branches or pull requests

2 participants