Skip to content

Fix: fix golang packaging in windows #225

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

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

StrongMonkey
Copy link
Contributor

@StrongMonkey StrongMonkey commented Apr 8, 2024

This PR fixed some bugs around packaging and invoking golang runtime in windows.

@@ -172,7 +172,7 @@ func (e *Engine) startDaemon(_ context.Context, tool types.Tool) (string, error)
e.Ports.daemonWG.Done()
})

for i := 0; i < 20; i++ {
for i := 0; i < 120; i++ {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to wait for more time to setup remote toolchain(like downloading runtime/pip install) before it can timeout

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ibuildthecloud The problem is that today when we use clicky-chat to download knowledge-api, the clicky-chat daemon will timeout first before it can download the other runtime(python). Ideally this timeout could probably be higher to give more time to download.

@StrongMonkey StrongMonkey marked this pull request as ready for review April 8, 2024 19:46
@@ -202,6 +203,17 @@ func (e *Engine) newCommand(ctx context.Context, extraEnv []string, tool types.T
cmdArgs = append(cmdArgs, f.Name())
}

// This is a workaround for Windows, where the command interpreter is constructed with unix style paths
// It converts unix style paths to windows style paths
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only converts the first arg (which is ${GPTSCRIPT_TOOL_DIR}/bin/gptscript-go-tool)`. There could be some edge cases where the rest of the args contain unix path, which is not addressed here.

@ibuildthecloud ibuildthecloud merged commit 36d36d4 into gptscript-ai:main Apr 9, 2024
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

Successfully merging this pull request may close these issues.

2 participants