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

[BUG] Cannot move zls #85

Closed
KeithBrown39423 opened this issue Jun 14, 2024 · 11 comments
Closed

[BUG] Cannot move zls #85

KeithBrown39423 opened this issue Jun 14, 2024 · 11 comments

Comments

@KeithBrown39423
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Run zvm install --zls 0.12.0

Expected behavior
Install zig 0.12.0 along with zls

Error report

Extracting ZLS...

  Error

2024/06/14 10:05:15 ERRO rename C:\Users\keith\.zvm\0.12.0\bin\zls.exe C:\Users\keith\.zvm\0.12.0\zls.exe: The system cannot find the path specified.

Desktop (please complete the following information):

  • OS: Windows
  • Architecture - amd64 / x86_64
  • Version - 11

Configuration:

  • Default
@KeithBrown39423
Copy link
Contributor Author

This is also an issue on arch linux, but the pull request should fix it on all distros and os'

@tristanisham
Copy link
Owner

Hey @KeithBrown39423

I wrote two small proposals that need to be addressed before a merge, but I'll just do them tonight off of your PR if you can't get to it by then.

@tristanisham
Copy link
Owner

Referencing #83, which was about this identical issue and has been closed even though it was the first. More progress has been made on this issue.

@KeithBrown39423
Copy link
Contributor Author

It appears that in 0.11.0 ZLS is stored in a bin directory which makes this more complicated

@tristanisham
Copy link
Owner

tristanisham commented Jun 14, 2024

We can have a check. If the file existed we can move it from bin. If the files are in the root like the new version then we can unbundle using the modern feature.

@tristanisham
Copy link
Owner

We could even just have a recursive crawl since I'm pretty sure ZLS is compiled statically, no?

@siniarskimar
Copy link
Contributor

It seems that the layout of the release archive has changed since 0.12.0.

Before merging the PR, I think it's important to consider support for older versions.

ZLS looks like is a static executable so it's safe to just copy it into bin/

[marcin:~/.zig]% LC_ALL=C ldd zls # ZLS 0.13.0
     not a dynamic executable
[marcin:~/.zig]% LC_ALL=C ldd zls # ZLS 0.12.0
     not a dynamic executable

Second option is to determine and choose the layout based on downloaded ZLS version. More future-proof, in case ZLS changes the layout again...

@tristanisham
Copy link
Owner

Okay, I merged the pull request, but let's continue the work here: zls-hotix

@siniarskimar
Copy link
Contributor

I've implemented recursive search of ZLS in #88. It works but has some flaws right now. It doesn't check whenever a candidate is actually an executable and uses filepath.Walk which reads an entire directory tree into memory first.

@tristanisham
Copy link
Owner

@glyh does this match your issue? I'd like to consolidate all current ZLS errors into this issue if possible.

@tristanisham
Copy link
Owner

tristanisham commented Jun 23, 2024

Recursive search seems to have worked perfectly. Adding it to new release. If this doesn't solve the issue, we can reopen this issue.

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

3 participants