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

./install.py --go-completer creates files without write permission #3721

Closed
9 of 12 tasks
Felixoid opened this issue Jul 19, 2020 · 6 comments
Closed
9 of 12 tasks

./install.py --go-completer creates files without write permission #3721

Felixoid opened this issue Jul 19, 2020 · 6 comments

Comments

@Felixoid
Copy link

Felixoid commented Jul 19, 2020

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside
the brackets) before filing your issue:

  • I have read and understood YCM's CONTRIBUTING document.
  • I have read and understood YCM's CODE_OF_CONDUCT document.
  • I have read and understood YCM's README, especially the
    Frequently Asked Questions section.
  • I have searched YCM's issue tracker to find issues similar to the one I'm
    about to report and couldn't find an answer to my problem. (Example Google
    search.
    )
  • If filing a bug report, I have included the output of vim --version.
  • If filing a bug report, I have included the output of :YcmDebugInfo.
  • If filing a bug report, I have attached the contents of the logfiles using
    the :YcmToggleLogs command.
  • If filing a bug report, I have included which OS (including specific OS
    version) I am using.
  • If filing a bug report, I have included a minimal test case that reproduces
    my issue, using vim -Nu /path/to/YCM/vimrc_ycm_minimal, including what I
    expected to happen and what actually happened.
  • If filing a installation failure report, I have included the entire output
    of install.py (or cmake/make/ninja) including its invocation
  • I understand this is an open-source project staffed by volunteers and
    that any help I receive is a selfless, heartfelt gift of their free time. I
    know I am not entitled to anything and will be polite and courteous.
  • I understand my issue may be closed if it becomes obvious I didn't
    actually perform all of these steps.

Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.

Issue Details

During the installation of YCM with go support, it creates files without write permissions. It causes thousands of errors like rm: cannot remove 'third_party/ycmd/third_party/go/pkg/mod/mvdan.cc/xurls/[email protected]/xurls_test.go': Permission denied after when I'm trying to clean it up.

  • What did you do?
git clone https://github.com/ycm-core/YouCompleteMe.git
cd YouCompleteMe
git submodule update --init --recursive; ./install.py --go-completer
  • What did you expect to happen?

I expect the files with writes permissions after installation.

  • What actually happened?

It's impossible to clean things without implicit invoking chmod +w -R on the YCM path to remove it. Or sudo works as well

Diagnostic data

Output of git rev-parse HEAD in YouCompleteMe installation directory

git rev-parse HEAD
321700e848595af129d5d75afac92d0060d3cdf9

Contents of YCM, ycmd and completion engine logfiles

Reproduce the issue with vim -Nu /path/to/YCM/vimrc_ycm_minimal, which
enabled debug logging and other useful diagnostics. Include a link to a
gist containing all of the log files listed by :YcmToggleLogs.

Clone repo, run the command

git clone https://github.com/ycm-core/YouCompleteMe.git
cd YouCompleteMe
git submodule update --init --recursive; ./install.py --go-completer
rm third_party/ycmd/third_party/go -rf

OS version, distribution, etc.

Arch linux
5.7.8-arch1-1 #1 SMP PREEMPT Thu, 09 Jul 2020 16:34:01 +0000 x86_64 GNU/Linux

Output of build/install commands

https://gist.github.com/Felixoid/939fcfa45e1697185c1d1354d13917db

@puremourning
Copy link
Member

Those files are written by go get. We just run go get to install gopls, so there's little we can do about this. I'm not sure why go get would do that tbh.

I suspect this is actually a problem with the upstream module/packaging.

@bstaletic
Copy link
Collaborator

It's true that some files don't have write permissions, but I don't think YCM can do much about it.

@puremourning
Copy link
Member

Agreed. Not sure that we can fix this. Seems an upstream issue.

@Felixoid
Copy link
Author

Indeed, go get makes it intentionally. But it supports the flag to change the behavior. See ycm-core/ycmd#1456

@bstaletic
Copy link
Collaborator

Thanks for taking the time to contribute. The FAQ looks good to me.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants