Skip to content

Directories with dots in their name produce empty paths #2807

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

Closed
Nezteb opened this issue Sep 21, 2023 · 2 comments · Fixed by #5198
Closed

Directories with dots in their name produce empty paths #2807

Nezteb opened this issue Sep 21, 2023 · 2 comments · Fixed by #5198

Comments

@Nezteb
Copy link

Nezteb commented Sep 21, 2023

Context

  • Operating System & Odin Version:
Odin: dev-2023-07
OS:   Ubuntu 20.04.2 LTS, Linux 6.2.0-1014-gcp
CPU:  Intel(R) Xeon(R) CPU @ 2.20GHz
RAM:  64290 MiB

Expected Behavior

Directories containg dots (~/src/.meta) should be treated no differently than directories without dots (~/src/meta).

Current Behavior

Directories containing dots aren't properly read by Odin subcommands.

Failure Information (for bugs)

Subcommands like odin test will fail to run tests in a directory with a dot in its name because of this bug.

The error message also contains two consecutive spaces where there should be an actual path string.

Steps to Reproduce

> odin test exercises/practice/hello-world/meta

[Package: hello_world]
[Test: test]
/home/runner/odin/exercises/practice/hello-world/meta/hello_world_test.odin(9:2): expected Hello, World!, got Goodbye, Mars!
[test : FAILURE]
----------------------------------------
0/1 SUCCESSFUL

> mv exercises/practice/hello-world/meta exercises/practice/hello-world/.meta

> odin test exercises/practice/hello-world/.meta/

Output path  is a directory.
@gingerBill
Copy link
Member

This bug is quite an obvious one. The executable name is trying to be based on the directory name, but because it is called .meta, it looks like you have assigned an extension to it already and it is trying to assign it to that.

@matthewelmer
Copy link

Can I help fix this? How would I go about doing so?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants