feat(backend-plugin): pass options to vfox backend plugins#8369
feat(backend-plugin): pass options to vfox backend plugins#8369
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the flexibility of vfox backend plugins by enabling the transmission of custom, user-defined options from configuration files directly into the plugin's execution context. This allows for more dynamic and tailored behavior within individual plugins, supporting advanced use cases that require specific build or environment parameters without hardcoding them. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds a feature to pass custom options to vfox backend plugins. The implementation involves updating the BackendInstallContext and BackendExecEnvContext structs, modifying the corresponding functions to handle the new options data, and updating the documentation. The changes are consistent and well-executed. I have one suggestion to improve code readability.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Greptile SummaryAdds custom options passthrough to vfox backend plugins, enabling plugin authors to access configuration options like Changes:
The implementation follows existing patterns in the codebase and maintains backwards compatibility. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Config as mise.toml Config
participant Backend as VfoxBackend
participant VfoxAPI as Vfox API
participant Context as Backend Context
participant Lua as Lua Plugin
Config->>Backend: Tool with options<br/>{version: "latest", build_cores: 22}
Backend->>Backend: Get tv.request.options()
Backend->>VfoxAPI: backend_install/backend_exec_env<br/>(pathname, tool, version, paths, opts.opts.clone())
VfoxAPI->>Context: Create BackendInstallContext/<br/>BackendExecEnvContext with options
Context->>Context: IntoLua: serialize options<br/>using lua.to_value(&self.options)
Context->>Lua: Pass ctx with options table
Lua->>Lua: Access via ctx.options.build_cores
Last reviewed commit: b2d4405 |
### 🚀 Features - **(backend-plugin)** pass options to vfox backend plugins by @Attempt3035 in [#8369](#8369) ### 🐛 Bug Fixes - **(install)** prevent --locked mode from modifying or bypassing lockfile by @jdx in [#8362](#8362) - **(install)** clear aqua bin_paths cache after install to prevent stale PATH by @jdx in [#8374](#8374) - **(task)** prevent broken pipe panic and race condition in remote git task cache by @vmaleze in [#8375](#8375) ### 📦️ Dependency Updates - update docker/build-push-action digest to 10e90e3 by @renovate[bot] in [#8367](#8367) - update fedora:43 docker digest to 781b764 by @renovate[bot] in [#8368](#8368) ### 📦 Registry - add porter ([github:getporter/porter](https://github.com/getporter/porter)) by @lbergnehr in [#8380](#8380) - add entire ([aqua:entireio/cli](https://github.com/entireio/cli)) by @TyceHerrman in [#8378](#8378) - add topgrade ([aqua:topgrade-rs/topgrade](https://github.com/topgrade-rs/topgrade)) by @TyceHerrman in [#8377](#8377) ### Chore - remove pre-commit config and tool dependency by @jdx in [#8373](#8373) ### New Contributors - @Attempt3035 made their first contribution in [#8369](#8369) - @lbergnehr made their first contribution in [#8380](#8380)
Passes custom options through to vfox custom backends for custom plugin use cases, for example:
passes through build_cores, accessible in lua by using:
Use case for testing: https://github.com/Quasiflo/llvm