Skip to content
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

Regression: Pack plugins are loaded twice (after 8.0.0612) #1801

Closed
wants to merge 1 commit into from

Conversation

inkarkat
Copy link

A side effect of adding the pack dirs earlier to 'runtimepath' (by calling add_pack_start_dirs()) is that this call that was originally meant to only load the traditional plugins now also loads the pack plugins as well (fortunately, in the right order):

source_runtime((char_u *)"plugin/**/*.vim", DIP_ALL | DIP_NOAFTER)

The following invocation of load_start_packages() is superfluous and must be dropped to avoid duplicate loading of pack plugins. Instead, only set the did_source_packages flag (as would have done by the dropped call) to neutralize the effect of :packloadall.

The existing Test_after_comes_later() verifies the ordering of plugin loads, but because :scriptnames just records the first load of a script, it cannot ensure that each plugin is loaded only once.
Record each plugin load in g:sequence, and assert ordering (again) and uniqueness (new) in a separate check.

A side effect of adding the pack dirs earlier to 'runtimepath' (by calling add_pack_start_dirs()) is that this call that was originally meant to only load the traditional plugins now also loads the pack plugins as well (fortunately, in the right order):
    source_runtime((char_u *)"plugin/**/*.vim", DIP_ALL | DIP_NOAFTER)

The following invocation of load_start_packages() is superfluous and must be dropped to avoid duplicate loading of pack plugins.  Instead, only set the did_source_packages flag (as would have done by the dropped call) to neutralize the effect of :packloadall.

The existing Test_after_comes_later() verifies the ordering of plugin loads, but because :scriptnames just records the _first_ load of a script, it cannot ensure that each plugin is loaded only once.
Record each plugin load in g:sequence, and assert ordering (again) and uniqueness (new) in a separate check.
@codecov-io
Copy link

Codecov Report

Merging #1801 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1801      +/-   ##
==========================================
+ Coverage   75.11%   75.12%   +<.01%     
==========================================
  Files          76       76              
  Lines      125109   125108       -1     
==========================================
+ Hits        93978    93983       +5     
+ Misses      31131    31125       -6
Impacted Files Coverage Δ
src/main.c 55.16% <100%> (-0.07%) ⬇️
src/version.c 79.29% <0%> (-1.02%) ⬇️
src/if_xcmdsrv.c 85.18% <0%> (-0.75%) ⬇️
src/message.c 68.07% <0%> (-0.06%) ⬇️
src/eval.c 80.79% <0%> (-0.03%) ⬇️
src/evalfunc.c 81.65% <0%> (+0.02%) ⬆️
src/gui_gtk_x11.c 47.49% <0%> (+0.05%) ⬆️
src/gui.c 45.64% <0%> (+0.05%) ⬆️
src/os_unix.c 58.82% <0%> (+0.19%) ⬆️
src/if_py_both.h 75.56% <0%> (+0.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 41cc038...784da48. Read the comment docs.

@brammool brammool closed this in 07ecfa6 Jun 27, 2017
@inkarkat inkarkat deleted the duplicate_pack_plug_load branch June 27, 2017 12:59
dpelle pushed a commit to dpelle/vim that referenced this pull request Jul 31, 2017
Problem:    Plugins in start packages are sourced twice. (mseplowitz)
Solution:   Use the unmodified runtime path when loading plugins (test by Ingo
            Karkat, closes vim#1801)
jamessan added a commit to jamessan/neovim that referenced this pull request Aug 21, 2017
Problem:    Plugins in start packages are sourced twice. (mseplowitz)
Solution:   Use the unmodified runtime path when loading plugins (test by Ingo
            Karkat, closes vim/vim#1801)

vim/vim@07ecfa6
jamessan added a commit to jamessan/neovim that referenced this pull request Aug 22, 2017
Problem:    Plugins in start packages are sourced twice. (mseplowitz)
Solution:   Use the unmodified runtime path when loading plugins (test by Ingo
            Karkat, closes vim/vim#1801)

vim/vim@07ecfa6
nateozem pushed a commit to nateozem/neovim that referenced this pull request Oct 5, 2017
Problem:    Plugins in start packages are sourced twice. (mseplowitz)
Solution:   Use the unmodified runtime path when loading plugins (test by Ingo
            Karkat, closes vim/vim#1801)

vim/vim@07ecfa6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants