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

Cannot use absolute path for tools cursor on Windows #13086

Closed
devnote-dev opened this issue Feb 17, 2023 · 3 comments · Fixed by #13129
Closed

Cannot use absolute path for tools cursor on Windows #13086

devnote-dev opened this issue Feb 17, 2023 · 3 comments · Fixed by #13129
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:tools

Comments

@devnote-dev
Copy link
Contributor

Bug Report

The cursor-based crystal tool commands do not work on Windows. I have tested this on Crystal v1.7.0 and v1.8-dev. After some brief searching, it seems to be the parsing in crystal/cursor.cr#34 which does not take into account absolute Windows paths.

@devnote-dev devnote-dev added the kind:bug A bug in the code. Does not apply to documentation, specs, etc. label Feb 17, 2023
@Blacksmoke16 Blacksmoke16 added topic:tools platform:windows Windows support based on the MSVC toolchain / Win32 API labels Feb 17, 2023
devnote-dev added a commit to devnote-dev/vscode-crystal-lang that referenced this issue Feb 17, 2023
@HertzDevil HertzDevil removed the platform:windows Windows support based on the MSVC toolchain / Win32 API label Feb 28, 2023
@HertzDevil
Copy link
Contributor

Actually, filesystems other than Windows' may also contain colons anywhere in the file paths

@mominshaikhdevs
Copy link

Actually, filesystems other than Windows' may also contain colons anywhere in the file paths

the NT Kernel does not care anything other than \ character for paths + dirs+ files! , even . and .. are perfectly valid file names.

It's the NTFS File System driver(ntfs.sys) that enforces those file names reservations/restrictions for compatibility with DOS.

@straight-shoota
Copy link
Member

Thanks for the insight. I think @HertzDevil's comment contradicts that. He didn't refer to the kernel but Windows' filesystem, which is pretty much equivalent to NTFS/NTFS driver.

Anyway the point was that it's not a Windows-specific problem. And the fix in #13129 is generic, it just chops off the line and column portions from the end of the string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:tools
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants