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

Check for "required" external commands at config load #452

Open
anussel5559 opened this issue Jan 7, 2025 · 1 comment
Open

Check for "required" external commands at config load #452

anussel5559 opened this issue Jan 7, 2025 · 1 comment

Comments

@anussel5559
Copy link
Contributor

Did you search for existing issues already?
yup!

Is your feature request related to a problem? Please describe.
No, see discussion here - #422 (comment)

Describe the solution you'd like
With the move to leveraging external commands for extending the core of slumber, one thing that will be increasingly difficult for users to do is share their configuration with fellow developers. Certainly sharing a file is easy enough, but the chains and requests and future response commands built around that configuration are not captured in that configuration - this makes it difficult for users to share their configuration in a workable state.

We should consider:

  1. adding a field to configuration that allows authors to detail the required external binaries.
  2. at config load, check that dependency array and notify the user if required external binaries are missing.

Describe alternatives you've considered
None - word of mouth communication for dependencies when shared

Additional context
None

@LucasPickering
Copy link
Owner

FWIW I think the current alternative is "let it fail", i.e. if someone runs a request with a binary dependency they don't have installed, it should surface an error like my-binary: file not found. I'm not opposed to this feature though. This will have to wait until after The Great Config Refactor though. If the new config language I choose is a general purpose programming language (which is most likely), then what I'm thinking is the ability to run code on startup, as well as a function to check if a particular binary is installed. So an example in a JS-like syntax:

if (!isInstalled("my-binary")) {
  warn("my-binary must be installed");
}

export const profiles = {...};
export const requests = {...};

Exact design details are dependent on the chosen language, but that's what I'm generally picturing. This will be a few months away at least, but this issue will make sure I don't forget about it. Once the config refactor is done, it should be a pretty easy feature to build.

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

2 participants