-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Ease path to adding new external command parsers #81
Comments
I've been hoping this day (i.e., someone asking this question) would come. :) I'll be chewing on this, but I'll sketch out why it doesn't exist yet:
Edit (April 2024): my thinking on the last paragraph above has evolved a good bit since I wrote it. Some notes:
|
I'm trying to figure out how to deal with I started down the path of I'm happy to make a binlore issue for |
A comment here is a good place to start. I haven't used nixos-enter, but a quick look suggests that the commands would run in a chroot--are the inputs to resholve guaranteed to be available inside it? (I guess the "bad" case would be if only system packages in the config specified via the If everything is available, it can probably be tractable w/ a bit of work. Its options smell like a good example of why staking out a user-facing mechanism is tricky (and why I'm taking it slow...). Are you able to link to the script you need to resholve? IIUC the The
Correct. This isn't an oversight, just one of the trickiest features on the roadmap to get right. I briefly thought we could satisfice w/ a way to specify positions to resolve and replace--but after playing with a draft implementation I decided it was a misfeature. (Basically a worse version of The other ~obvious approach is enabling people to write parsers without having to upstream them to resholve. That does need to happen as soon as feasible, but I'm not happy with how easy it is to write and maintain the existing parsers and don't want to make it harder to change until I can either fix it or make my peace w/ its sharp corners. |
|
@tejing1 and @abathur you're both right about
Okay that makes sense, thanks. |
Documenting something I should've noted a while back. A few months ago one of the Fig co-founders suggested that Fig's autocomplete format might help on HN (https://news.ycombinator.com/item?id=32862163). Their format is somewhat documented in https://fig.io/docs/reference/arg and the other bits of the reference section in the sidebar. Some likely problems:
Edit: Fig.io will be closing down, so I imagine there's a nonzero chance their repos stop improving. Unless the fig community decide to fork-and-maintain fig in some way, the prospect of having a resource (even if imperfect) that is maintained by a large community with many eyes seems grim. Announcement for context:
|
I'd like to see a way to
.override
resholve from nixpkgs to effectively throw in some arbitrary extra code intoExternalCommandParsers
. The override should also affectresholve.writeScript
and such as well, of course. If this could be made part of the "solution" rather than an override, all the better.It's a comparatively easily implemented relief valve to at least allow a user to do something to handle a situation where a command does execute its arguments and there's no parser for it in resholve. Currently there's no way forward in that case other than:
Longer-term, it would be good to develop some kind of simple language for users to describe a program's argument structure that covers most cases and is a more stable interface, but at least this works as a near-universal fallback for users willing to put in the effort.
The text was updated successfully, but these errors were encountered: