-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Vendor #1776
Vendor #1776
Conversation
I am impressed by your efforts @buhl ! Also, if you add new plugins, please add then to |
Thanks @NoahGorny! |
I am also unsure whether we need to vendor |
Sure, I guess that's a reasonable requirements for a developer. |
I really like where this discussion has gone. I notice that we're replacing the preexec library with a forked, and presumably better, version. Could we add erichs/composure to this PR as well? |
@cornfeedhobo I don't see why we couldn't update composure as well once we landed on how to vendor libs. |
@buhl My thinking was that since you're already doing two big changes, might as well as a third. In the opposite direction of breaking up significant changes, maybe we should update preexec in place, and then do vendoring then? Especially considering the diff between the changed preexec library and the updated composure one. |
I think we should remove the vendoring of |
@cornfeedhobo I am comfortable with the preexec changes for two reasons.
|
@buhl those are good reasons. Thanks again for your contribution! |
@NoahGorny @cornfeedhobo Sorry for the rebase. I had to make sure it could be done to give more clean PR's |
I will try to make a test of the plugin I added as well. |
I don't know why the lint is failing. Running the same script locally works. |
@buhl Hmm, barbuk should already be cleaned if you rebased off master correctly. Maybe rebase again? The only other thing I can guess is that you've run into the same |
Thanks @cornfeedhobo, It was an error on my part 🤦 |
I think maybe I should rebase this branch into fewer commits to make it more neat. |
@buhl no problem. I should have some free time in a few hours and will take a look. |
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.
Left a couple of minor comments...
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.
Small nits from me, otherwise LGTM
ping @buhl 😄 |
Sorry! My analog life called. I will try to fix the last few things and rebase the branch to make it merge ready tomorrow 😊 |
5ff2048
to
5809d92
Compare
@NoahGorny I think it's about ready. |
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.
@buhl I left you a small comment, other than it LGTM
BTW, I see the git-vendor
is not actively maintained, this is quite concerning, but if the tool works, we can use it and just fork it if needed
@NoahGorny Sorry, must have misser your comment. Will look at it tomorrow. Regarding git vendor I referenced https://github.com/Tyrben/git-vendor because I looks like an actively maintained fork of the other repo. If the fork goes stale as well we can consider maintaining a fork our selfs. |
Oh, I see, so ignore my comment, and instead add a note about the fact that we use the maintained fork and not the original repo (going to the supplied link might be confusing otherwise, I got quite confused) Anyway, well done! I hope we can merge it soon and include all vendored code in this format |
…it 7884535 git-subtree-dir: vendor/github.com/rcaloras/bash-preexec git-subtree-split: 7884535ed423ac27d3b6b473c61b1fe41905aca1
git-vendor-name: preexec git-vendor-dir: vendor/github.com/rcaloras/bash-preexec git-vendor-repository: https://github.com/rcaloras/bash-preexec git-vendor-ref: 0.4.1
Added a vendored lib loading routine in bash-it.sh Added documentation on how to vendor libs in bash-it Added and fixed plugins using preexec Added tests for two plugins Removed the old preexec lib
Hmm, themes/atomic/atomic.theme.bash and themes/base.theme.bash are failing the lint check. I did not touch these files but should I fix the errors in this PR? |
@NoahGorny I added some text about the different git vendor repos. I think I have resolved all pending questions so now there is only the linting errors left mentioned in my previous comment. |
Running locally, I saw |
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.
@buhl I made a couple of change, but now its LGTM
I'll let @nwinkler @davidpfarrell @cornfeedhobo voice their opinions as this is a big change. If we merge this, we should move all of our vendored code to be used in this pattern. I will help us control it!
Ah, I missed the linting errors in the xterm test because I saw errors in the two themes mentioned in an earlier comment. I will gladly help moving the other libraries to this vendor method if its accepted. |
Looks good to me! |
Its about time we merge this, 🥳 I added a lint check of the |
Sounds great 😄 |
Also fix and lint the directory. This is our code, and as such, should be linted.
In #1587 we talked about a way to handle vendor libraries.
Description
This PR vendors https://github.com/brettlangdon/git-vendor to vendor libs into bash-it.
This PR also includes the preexec lib and fixes to the source where needed. It also
includes a new plugin that can ring the terminal bell
echo -e \a
when a long runningprocess finishes.
Motivation and Context
As discussed in #1587 I would be nice to have a better controlled/versioned way of
including libraries in bash-it. There have been talks of
git subtrees
and loaderscripts to aid the loading of plugins. This PR includes these tings.
How Has This Been Tested?
I have been running with the new preexec lib for over a year in a personal fork of bash-it
the git-vendor lib is only used be dev who wish to add or update libs. It wont have any
effect on regular users of bash-it
Types of changes
I feel I need to document how to add or update vendored libs. Where would be the best
place for this?
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.