zimfw / magicmace

A prompt theme inspired by xero's and eriner's themes.
MIT License
4 stars 0 forks source link

Hard project dependencies should roll out more gracefully #3

Open theniceboy opened 3 years ago

theniceboy commented 3 years ago

The commit 73869647deb9ceeac82c32476bc4be6c85e0c5c2 added prompt-pwd as a hard dependency. The problem was that users who ran zimfw update without installing prompt-pwd before hand would get an error (prompt-pwd command not found). This wouldn't be an ideal UX.

Just a suggestion. Great work btw!

ericbn commented 3 years ago

Hi @theniceboy. Yeah, I'm aware it's not the nicest experience, but currently modules don't have a programmatically way of declaring their dependencies.

Our modules closely follow the Prezto standard for the modules structure, and Zim is also compatible with most of the Oh-My-Zsh standard, and none of these define a way of declaring dependencies. The best I've come up with is an 📢 Announcements channel where I publish all these changes...

theniceboy commented 3 years ago

Thanks for your response, @ericbn!

I don't update my zim plugins usually (maybe once a few weeks). I happened to update them today and got the error. I ended up going a round trip trying to figure out what the problem was haha. Initially, I thought it could be a zsh version issue because I also upgraded zsh. I wonder if there's a way to notify users that prompt-pwd is actually a module that users need to install, just to save their time.

I wasn't aware of the Announcement channel... Frankly, I doubt people will notice.

ericbn commented 3 years ago

Another way we have to make the users aware of the changes is showing the git log in zimfw update. So you should have seen something like:

) magicmace: Updating 9fc8e39..7386964
  * 7386964 Require prompt-pwd module (18 hours ago)
Konfekt commented 3 years ago

How about showing after an update the git log once after starting up ZSH? Then a breaking change could be mentioned in the commit message.

ericbn commented 3 years ago

I suggest users should subscribe to the 📢 Announcements channel instead.

Konfekt commented 3 years ago

Thank you for putting together this overview of the latest changes to zimfw.