-
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
Revert "bash_it: source reloader.bash without arguments for the default enabling" #2097
Conversation
Can I comment on this PR?
This is false. I have explained it in #2096. If the fixes e05fa47 and ee85367 are applied, actually the fix 41cf3cf is not required. I have added the third fix in the different file just to make it safer against potential breakage in the future (or against the case Also, as I have explained in #2096, this is not a specific issue to It doesn't seem to me that there are any positive reasons to revert these changes. SC2014 reported for the line is clearly a false-positive case. SC2140 is not the one that recommends not using the style of the form I actually have another suspicion on the original change as I have written in #2096, but maybe I misunderstand something.
What do you think of this? Come to think of it again, maybe we can just call |
@akinomyoga, thank you for your thorough comment! My objection is to making a behavior change that affects all components loaded when one specific plugin is having an issue. The specific behavior in question, positional parameters being inherited by nested The syntax that SC2140 warns about is not wrong, just odd. It's "non-idiomatic" we might say. I'm against confusing syntax, even if it is 100% correct and predictable and reliable and documented. Bash-It is used by a lot of people and I think it's valuable for the code to be reasonably readable. I've spent the past six months fixing oversights with quoting and string expansion, so syntax that makes it harder to read how a parameter is expanded seems suspect to me. The All that said, I would actually like to remove the "legacy" file loading. |
Hi, thank you for your reply!
The situation is actually the opposite. Originally all
Yes. I agree that we should not rely on this behavior so would like to somehow turn it off. The original change 0d346b2 has unexpectedly turned it on in some sense, so I wanted to revert it in #2096. This PR #2097 actually tries to again effectively turn the inheriting behavior on.
The situation is actually the opposite as well. The above argument is talking about the
Fair enough.
Yeah, I think now we can safely remove these legacy loading after five years. |
I also support getting rid of the legacy loading, after 5 long years.. |
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.
seems ok and passes the tests, so why th hell not...
@seefood Did you merge this understanding the context? IMHO, the content of this PR is the one that has been rejected, yet another completely different direction (of removing the legacy loading) was suggested. |
@akinomyoga I admit I didn't dive deep enough into this. Looking at the PR's fidd it seemed like there was only a shellcheck comment dropped and the other line is so similar I thought it was a fixed typo. just to make sure I echoed both values now to see if they produce different outputs and they are both empty. Should I worry and revert this? |
With source "${BASH_IT}/scripts/reloader.bash" ${_bash_it_main_file_type:+"skip" "$_bash_it_main_file_type"} results in source "${BASH_IT}/scripts/reloader.bash" but source "${BASH_IT}/scripts/reloader.bash" "${_bash_it_main_file_type:+skip}" "$_bash_it_main_file_type" results in source "${BASH_IT}/scripts/reloader.bash" "" "" Those empty arguments Originally, these extra empty arguments were not specified. They were introduced in #1902 unintentionally and broke a plugin, and #2096 recovered the original behavior. However, @gaelicWizard somehow considered it the other way around as if #2096 introduced the behavioral change.
The originally expected solution would have been to remove the legacy loading from |
"soon" may be years to never, since it seems Noah is busy and the rest are incomunicado, which is why Noah gave me rights to clean up the PRs. I guess I'll revert it to be on the safe side. |
Description
This reverts commit e05fa47.
This reverts commit ee85367.
Motivation and Context
This does not resolve the issue it claims to, as evidenced by the fact that a third commit was required in a different file to fix it. Additionally, this idiom is poor coding practice, as evidenced by the need to disable
shellcheck
from issuing a warning about it.The correct working fix for
ble.sh
was added inplugin/blesh
in commit 41cf3cf.How Has This Been Tested?
Types of changes
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.