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

Compiler checks wrong output path when project folder name contains a dot #3473

Open
refual opened this issue Apr 23, 2024 · 0 comments
Open

Comments

@refual
Copy link

refual commented Apr 23, 2024

Context

  • Operating System & Odin Version:
Odin:    dev-2024-04-nightly:aab122ede
OS:      Ubuntu 22.04.3 LTS, Linux 6.5.0-21-generic
CPU:     Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
RAM:     15867 MiB
Backend: LLVM 17.0.6

Expected Behavior

When running odin build ., I expect the resulting executable to be created inside the current project folder without the compiler unnecessarily concerning itself with the parent folder.

Current Behavior

When the project folders name contains a dot and the parent folder contains a directory with the same basename (i.e. without the extension) as the resulting executable, the compiler will complain about the name conflict.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

mkdir -p Projects/test{,.odiin}
cd Projects/test.odiin
touch main.odin
odin build .

The compiler thinks the Projects/test folder collides with the output file even if (once that folder is moved away) the resulting executable is placed in Projects/test.odiin/test.odiin as expected, i.e. different folder and file names. This still works if Projects/test is not actually a directory at all.

A different output path specified using -out (as suggested by the error message) is completely ignored by this check, too.

As an added bonus the versions later than 2024-03 do not even print any errors and just fail silently:

$ ~/.local/opt/odin-dev-2024-03/odin build . ; echo $?
Please specify the executable name with -out:<string> as a directory exists with the same name in the current working directory1
$ ~/.local/opt/odin-dev-2024-04/odin build . ; echo $?
1
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

1 participant