odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.17k stars 550 forks source link

Folder name build bug or error message fix #3114

Open glennwiz opened 5 months ago

glennwiz commented 5 months ago

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Expected Behavior

Please describe the behavior you are expecting.

Im expected that it wold compile a gnipahellir.odin.exe file when folder name is gnipahellir.odin, works fine when i use Gnipahellir.Odin uppercase. And expected better error message, kinda hard to understand its the folder that brakes it.

Current Behavior

What is the current behavior? it breaks with Syntax Error: Failed to parse file: C:/dev/OdinFolderBug/gnipahellir; file permissions problem. image

if i change the folder name to Gnipahellir.Odin it works fine image image

Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. cd dev
  2. mkdir gnipahellir.odin
  3. cd gnipahellir.odin
  4. touch master.odin
  5. vim master.odin | make minimal build content inside file
  6. wq
  7. odin run .

Failure Logs

Please include any relevant log snippets or files here.

mustardfrog commented 4 months ago

I am guessing the compiler think the .odin directory is a file, thus producing errors.

This is much more obvious on Linux because the error is literally syntax error.

hey_odin