-
Notifications
You must be signed in to change notification settings - Fork 49
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
Add config command #112
base: master
Are you sure you want to change the base?
Add config command #112
Conversation
Sounds like a good idea. I'll check this out over the next couple of days and give feedback :) |
Couple thoughts:
I'm curious what your ideas are for editing variables. |
This implementation is rather terrible as it doesn't even permit more than one layer of depth for the dependencies, it's just to demonstrate how the tree view could look like. |
Pretty sure that would be Also, please merge/rebase on master since I fixed some CI failures |
3b81cc7
to
f822c93
Compare
Indeed, I also rebased onto master (interesting commits btw 😂). |
Make sure you test dependency cycles :) |
That looks great! However, that would probably require either forking the Looking at the attached screenshots, I completely agree that your proposal looks way better and is also more user friendly. |
That would be great :D |
Guess I know what'll keep me occupied for the next weeks 😅 |
Any update on this @SIMULATAN ? |
Life's stressful ATM so I didn't manage to find any time to work on this unfortunately. |
After literally 3 hours of programming, I managed to migrate the view to be a list rather than tree. No clue why it took me so long 😅 |
This command can be used to configure the packages in the `local.toml` file. This is particularly useful when bootstrapping new devices where you quickly want to select what packages to install.
1f003a0
to
f429fe6
Compare
This involves switching to SIMULATAN's fork of dialoguer.rs, which was extended with advanced features required in dotter.
I'm back!!!! Now, time for the fancy stuff.
|
I did a thing... For my part, I'm done with the code changes now. Once the changes are approved by @SuperCuber, I'll create a new version in my dialoguer fork to make the CI pass. |
Looks amazing! I'll have a look through the code once I have some free time, in the meantime please run |
Damnit, I ran those commands at least 40 times while developing. Before committing, my clippy somehow broke and showed an old state with invalid issues so I figured it was fine... it was not |
Sorry for the lack of activity, there's a lot of life stuff happening (especially the whole situation in Israel, where I live) |
Zero obligation to say sorry here. In a situation like this, your "well being" easily takes 1st priority (or 0 since you're a programmer :P). We have to thank you for your past and (hopefully) future work and for doing this all for realistically nothing in return. Stay safe out there! From the bottom of my heart, and I think I speak for the whole FOSS community here; the best of luck to you and your loved ones 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am back :D
I have cleaned up some stuff and made some changes to the implementation, I haven't tested it enough though, hopefully I haven't broken anything 😬
I added some TODO
s, and also we should write a test or two for the dependencies function.
This looks really good :)
Cargo.toml
Outdated
@@ -26,6 +26,7 @@ shellexpand = "2.*" | |||
simplelog = "0.12.*" | |||
tokio = "1.*" | |||
toml = "0.4.*" | |||
dialoguer = { git = "https://github.com/SIMULATAN/dialoguer", features = [] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crates.io does not allow git dependencies :(
We might have to get your changes merged into dialoguer
, is there a reason you haven't opened a PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main reason is that I kinda just haven't gotten around to it, especially since it wasn't fully approved yet.
However, that isn't the only problem:
My changes are vastly different from what the library usually stands for. While the other components aren't exactly configurable, this one very much is and thus seems a bit out of place (and therefore possibly out of scope).
Additionally, the code is kinda messy and the change is pretty large (~500 lines, although the majority of that is because I created a separate multi_select_plus
component rather than editing the existing one).
Let's just say, I'm not exactly confident in my rust skills (I mean, just looking at your cleanup, it appears I made quite a few mistakes 😅)
To get an idea of the changes, see the diff
Considering that reasoning, I'll try to see if I can get something going that would have a chance at getting merged upstream, both in terms of code quality and "genericness". As I said a while back, right now, it's very opinionated, having only what's necessary for this feature to work (in particular, the callback feature).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I'm sure dialoguer
's maintainer will have comments to steer you in the right direction :)
Please link the PR here when you open one
Welcome back! Good to see you're alive and well :) Thanks for the updates. I saw you added a good few TODOs - what's your plan regarding those, will you work on that yourself or do you want me to take a look at it? I haven't worked with rust in a while (and even back then, frankly, I sucked pretty bad lol), so it'll take a bit of time to get back into it, but I can absolutely do that if it helps. The tests I can absolutely write, are you planning on making more breaking changes soon or do I just go for it? |
I've done the TODOs :) |
@SuperCuber created console-rs/dialoguer#303. Let's hope it'll get merged soon :) |
This command can be used to configure the packages in the
local.toml
file. This is particularly useful when bootstrapping new devices where you quickly want to select what packages to install.I also plan on creating a more feature rich TUI for the local config including changing variables, but I wanted to get some feedback first before making deeper changes.
Please review this change and tell me what to improve as some things I changed probably should be done in another way (most notably, making a few of the
config
structs + fields public).Notes
config.rs
public to access them in the new file (config_local.rs
). I wasn't sure if I should add the command to the existingconfig.rs
file as that one was already quite long even before my changesI'd be happy to hear feedback and improve this pr based on it. Thanks for your work on this project!