Skip to content

fix/ci: install instructions, build with latest js-pdk#28

Merged
G4Vi merged 2 commits intomainfrom
gavin/20250123-fix-install-instructions
Jan 24, 2025
Merged

fix/ci: install instructions, build with latest js-pdk#28
G4Vi merged 2 commits intomainfrom
gavin/20250123-fix-install-instructions

Conversation

@G4Vi
Copy link
Contributor

@G4Vi G4Vi commented Jan 23, 2025

Having the dependencies section in the yaml, when a dependency is missing, prevents the prepare script from running and displaying a more helpful error message.

@G4Vi G4Vi requested review from bhelx and zshipko as code owners January 23, 2025 18:33
@nilslice
Copy link
Member

nilslice commented Jan 23, 2025

Is there potentially another layer this could be fixed at, like in the CLI so that it doesn't entirely exit, or maybe checks these dependencies listed after the prepare script?

The way I read this PR is that we now won't report the deps missing as part of our diagnosis. Could be misreading though!

@G4Vi
Copy link
Contributor Author

G4Vi commented Jan 23, 2025

We could change the cli to check the deps section after. However, it would be redundant as the prepare script checks and reports if they are missing. In https://github.com/dylibso/xtp/pull/994#discussion_r1927155042 @bhelx mentioned that the dependencies section was deprecated in favor of the prepare script and I see the dependencies section was removed from the typescript bindgen.

When extism-py is missing, with this PR the output looks like:

gavin@Gavins-MacBook-Pro cli % go run app/main.go plugin init --template ../../xtp-python-bindgen/bundle --name theplugin --path theplugin
Generating plugin for Tool in theplugin...
👉 Running prepare script: bash prepare.sh && uv sync
❌ extism-py is not installed.

extism-py is needed to compile the plug-in. You can find the instructions to install it here: https://github.com/extism/python-pdk

Alternatively, you can use an install script.

🔹 Mac / Linux:
curl -L https://raw.githubusercontent.com/extism/python-pdk/main/install.sh | bash

Error: error generating plugin: failed to run prepare script: exit status 1
Log file: /Users/gavin/Library/Caches/xtp/xtp-1737656400-18818.log
exit status 1

@G4Vi G4Vi merged commit 0ffda5f into main Jan 24, 2025
1 check passed
@G4Vi G4Vi deleted the gavin/20250123-fix-install-instructions branch January 24, 2025 15:21
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.

3 participants