Shougo / dpp.vim

Dark powered plugin manager for Vim/neovim
MIT License
128 stars 5 forks source link

Merge fails when some plugins has same filename with read only #4

Closed kuuote closed 11 months ago

kuuote commented 11 months ago

Problems summary

Merge fails when some plugins has same filename with read only. For example, git objects are read only.

Expected

Ignoring error and merge successful

Environment Information

Provide a minimal init.vim/vimrc without plugin managers (Required!)

let $DIR = expand('<sfile>:p:h')

let $A = expand('$DIR/a')
let $B = expand('$DIR/b')

call delete($A, 'rf')
call system('git init $A ; cd $A ; echo hoge > hoge ; git add hoge')
call delete($B, 'rf')
call system('git init $B ; cd $B ; echo hoge > hoge ; git add hoge')

let s:dpp_base = expand('$DIR/dpp')
call delete(s:dpp_base, 'rf')

set rtp+=/data/vim/repos/github.com/Shougo/dpp.vim
set rtp+=/data/vim/repos/github.com/vim-denops/denops.vim

call dpp#make_state(s:dpp_base, expand('$DIR/dpp.ts'))
import { BaseConfig } from "https://deno.land/x/dpp_vim@v0.0.3/types.ts";

export class Config extends BaseConfig {
  override config() {
    return {
      plugins: [{
        name: "a",
        path: Deno.env.get("A")!,
      }, {
        name: "b",
        path: Deno.env.get("B")!,
      }],
    };
  }
}

How to reproduce the problem from neovim/Vim startup (Required!)

  1. nvim -u init.vim
  2. Display following error
[denops] Failed to handle message 2,invoke,dispatch,dpp,makeState,/data/today/2023-10-17/dpp,/data/today/2023-10-17/dpp.ts,nvim PermissionDenied: Permission denied (os error 13): copy '/data/today/2023-10-17/b/.git/objects/22/62de0c121f22df8e78f5a37d6e114fd322c0b0' -> '/data/today/2023-10-17/dpp/nvim/.dpp/.git/objects/22/62de0c121f22df8e78f5a37d6e114fd322c0b0'
[denops]     at async Object.copyFile (ext:deno_fs/30_fs.js:82:3)
[denops]     at async copyFile (https://deno.land/std@0.204.0/fs/copy.ts:95:3)
[denops]     at async Promise.all (index 0)
[denops]     at async copyDir (https://deno.land/std@0.204.0/fs/copy.ts:207:3)
[denops]     at async Promise.all (index 2)
[denops]     at async copyDir (https://deno.land/std@0.204.0/fs/copy.ts:207:3)
[denops]     at async Promise.all (index 7)
[denops]     at async copyDir (https://deno.land/std@0.204.0/fs/copy.ts:207:3)
[denops]     at async copy (https://deno.land/std@0.204.0/fs/copy.ts:288:5)
[denops]     at async Dpp.mergePlugins (file:///data/vim/repos/github.com/Shougo/dpp.vim/denops/dpp/dpp.ts:306:9)
Shougo commented 11 months ago

I will check it later.

Shougo commented 11 months ago

@kuuote Please upload dpp.ts file.

kuuote commented 11 months ago

Sorry. uploaded now.

Shougo commented 11 months ago

I have implemented Ignore ".git" directory.