q.exe hangs forever when /lib/ is not present #18

Closed
opened 2025-08-20 09:46:06 +00:00 by Furkan · 4 comments

When I compile a hello world and the executable doesn’t have a lib directory it goes into an infinite loop instead of showing an error

This is a minor issue I just wanted to let you know about.

When I compile a hello world and the executable doesn’t have a lib directory it goes into an infinite loop instead of showing an error This is a minor issue I just wanted to let you know about.
Owner

Could you try this?

1.) Pick a location to save the project in, feel free to edit $env:USERPROFILE\q to your liking!

git clone https://git.urbach.dev/cli/q $env:USERPROFILE\q
cd $env:USERPROFILE\q
go build

2.) Add %USERPROFILE%\q to the PATH.

image
image
image
image

There is currently no installer for Windows, so it needs to be downloaded and added to the PATH manually.

Could you try this? 1.) Pick a location to save the project in, feel free to edit `$env:USERPROFILE\q` to your liking! ```shell git clone https://git.urbach.dev/cli/q $env:USERPROFILE\q cd $env:USERPROFILE\q go build ``` 2.) Add `%USERPROFILE%\q` to the PATH. ![image](/attachments/94d84f6e-a253-4b19-9e0d-c0a5a586668a) ![image](/attachments/83b6f77a-5c8f-4bfb-bb53-d5db383f9047) ![image](/attachments/2c732de9-bacc-4911-8ab6-199541797d63) ![image](/attachments/80ecfb21-e37a-4d71-ae92-d6986f9e8d7d) There is currently no installer for Windows, so it needs to be downloaded and added to the PATH manually.
Owner

Regarding the endless loop, I will look into it and see if we can display a proper error message for the case it can't find the standard library.

The problem is likely here as this cancellation condition doesn't work on Windows:

if dir == "/" {
panic("standard library not found")
}

Regarding the endless loop, I will look into it and see if we can display a proper error message for the case it can't find the standard library. The problem is likely here as this cancellation condition doesn't work on Windows: https://git.urbach.dev/cli/q/src/commit/5817bf6f3b18b4b06b2b181729552e733f11a88e/src/global/findLibrary.go#L21-L23
Author

I just waned to point out you can close this issue

I just waned to point out you can close this issue
Owner

@Furkan wrote in #18 (comment):

I just waned to point out you can close this issue

Fixed in 7a440c828b.
Thanks for the bug report!

@Furkan wrote in https://git.urbach.dev/cli/q/issues/18#issuecomment-165: > I just waned to point out you can close this issue Fixed in https://git.urbach.dev/cli/q/commit/7a440c828bf69ea61bd3c3019846b5b7b3e3e896. Thanks for the bug report!
ed closed this issue 2025-08-20 10:32:10 +00:00
ed added spent time 2025-08-29 07:48:19 +00:00
45 minutes
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Total time spent: 45 minutes
ed
45 minutes
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cli/q#18
No description provided.