My code is abnormal during GitHub CI build, and I can't solve it

repo address

Github CI Error log output:

error[E0583]: file not found for module `casting`
 --> types/src/main.rs:1:1
  |
1 | mod casting;
  | ^^^^^^^^^^^^
  |
  = help: to create the module `casting`, create file "types/src/casting.rs" or "types/src/casting/mod.rs"

error[E0583]: file not found for module `literals`
 --> types/src/main.rs:2:1
  |
2 | mod literals;
  | ^^^^^^^^^^^^^
  |
  = help: to create the module `literals`, create file "types/src/literals.rs" or "types/src/literals/mod.rs"


I confirmed these files in the type module. I build success in vscode, but failed in GitHub CI

Well, on Github, the file is rustlibrary/Casting.rs at master · Jzow/rustlibrary · GitHub - notice that the file is named Casting.rs whereas it should be named casting.rs.

My God, I think I should check it. Thank you very much, but I'm confused. I'm in lowercase in vscode, and I've pushed it to GitHub. Why didn't I modify it? I think I'm confirming it. Thank you

Are you on Windows? In Windows, case doesn't matter for filenames, an VSCode may be playing some tricks (such as "showing" the filename in lowercase). The Rust build will also not fail, because on Windows Casting.rs and casting.rs are exactly the same thing.

mac os

macOS APFS can either be case sensitive or case insensitive. IIRC it's case insensitive by default.

1 Like