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

.ac-php-conf.json loaded repeatedly #90

Open
webdevelopers-eu opened this issue Nov 14, 2018 · 15 comments
Open

.ac-php-conf.json loaded repeatedly #90

webdevelopers-eu opened this issue Nov 14, 2018 · 15 comments

Comments

@webdevelopers-eu
Copy link

webdevelopers-eu commented Nov 14, 2018

When one edits a project over tramp/ssh that happened to have .ac-php-conf.json file in the root then after each set of keystrokes the .ac-php-conf.json is being reloaded several times making editing over tramp very annoying.

The log gets flooded by following lines every time one stops typing:

Tramp: Inserting `/server:/.../master/.ac-php-conf.json'*
Tramp: Encoding remote file `/server:/.../master/.ac-php-conf.json' with `base64 <%s'*done
Tramp: Decoding local file `/tmp/tramp.20053mol.json' with `base64-decode-region'*done
Tramp: Inserting `/server:/.../master/.ac-php-conf.json'*done
Tramp: Inserting `/server:/.../master/.ac-php-conf.json'*
Tramp: Encoding remote file `/server:/.../master/.ac-php-conf.json' with `base64 <%s'*done
Tramp: Decoding local file `/tmp/tramp.20053zyr.json' with `base64-decode-region'*done
Tramp: Inserting `/server:/.../master/.ac-php-conf.json'*done

It looks like ac-php ineffectively keeps re-reading the .ac-php-conf.json which is not detectable issue on fast local storage.

@xcwen
Copy link
Owner

xcwen commented Nov 15, 2018

will not save config at tramp/ssh

@xcwen
Copy link
Owner

xcwen commented Nov 15, 2018

retest

@webdevelopers-eu
Copy link
Author

Thank you for quick response, I appreciate it. Unfortunately I cannot confirm it is resolved. Here is the contents of Messages.

Test with 2.0.6-3-gc03c3a3:

OPENING FILE
  Tramp: Checking `vc-registered' for /server:/…/master/….php...done
  Error during redisplay: (jit-lock-function 1) signaled (void-variable php-php-tag)
  Error during redisplay: (jit-lock-function 1117) signaled (void-variable php-php-tag)
  Error during redisplay: (jit-lock-function 1711) signaled (void-variable php-php-tag)
FOCUSED THE BUFFER
  Tramp: Inserting `/server:/…/master/.ac-php-conf.json'...
  Tramp: Encoding remote file `/server:/…/master/.ac-php-conf.json' with `base64 <%s'...done
  Tramp: Decoding local file `/tmp/tramp.8856lji.json' with `base64-decode-region'...done
  Tramp: Inserting `/server:/…/master/.ac-php-conf.json'...done
  do remake /server:/…/master/ do-all-flag :nil 
  Tramp: Inserting `/server:/…/master/.ac-php-conf.json'...
  Tramp: Encoding remote file `/server:/…/master/.ac-php-conf.json' with `base64 <%s'...done
  Tramp: Decoding local file `/tmp/tramp.8856yto.json' with `base64-decode-region'...done
  Tramp: Inserting `/server:/…/master/.ac-php-conf.json'...done
   REBUILD:  rebuild file start
  eldoc error: (wrong-type-argument listp ac-php-phptags-index-process-filter)
SWITCHED TO ANOTHER BUFFER AND BACK
  Tramp: Inserting `/server:/…/master/.ac-php-conf.json'...
  Tramp: Encoding remote file `/server:/…/master/.ac-php-conf.json' with `base64 <%s'...done
  Tramp: Decoding local file `/tmp/tramp.8856_3u.json' with `base64-decode-region'...done
  Tramp: Inserting `/server:/…/master/.ac-php-conf.json'...done
  remake: doing ...  [maybe you need restart emacs for remake tags]
  Tramp: Inserting `/server:/…/master/.ac-php-conf.json'...
  Tramp: Encoding remote file `/server:/…/master/.ac-php-conf.json' with `base64 <%s'...done
  Tramp: Decoding local file `/tmp/tramp.8856MC1.json' with `base64-decode-region'...done
  Tramp: Inserting `/server:/…/master/.ac-php-conf.json'...done
  remake: doing ...  [maybe you need restart emacs for remake tags]
PRESSED RIGHT ARROW
  Tramp: Inserting `/server:/…/master/.ac-php-conf.json'...
  Tramp: Encoding remote file `/server:/…/master/.ac-php-conf.json' with `base64 <%s'...done
  Tramp: Decoding local file `/tmp/tramp.8856-LE.json' with `base64-decode-region'...done
  Tramp: Inserting `/server:/…/master/.ac-php-conf.json'...done
  remake: doing ...  [maybe you need restart emacs for remake tags]
  Tramp: Inserting `/server:/…/master/.ac-php-conf.json'...
  Tramp: Encoding remote file `/server:/…/master/.ac-php-conf.json' with `base64 <%s'...done
  Tramp: Decoding local file `/tmp/tramp.8856LWK.json' with `base64-decode-region'...done
  Tramp: Inserting `/server:/…/master/.ac-php-conf.json'...done
  remake: doing ...  [maybe you need restart emacs for remake tags]
...

@xcwen xcwen closed this as completed in 1883d31 Nov 15, 2018
@xcwen xcwen reopened this Nov 15, 2018
@xcwen
Copy link
Owner

xcwen commented Nov 15, 2018

retest

@webdevelopers-eu
Copy link
Author

webdevelopers-eu commented Nov 15, 2018

Same problem. The config json file is not empty (your test in patch). It contains in my case:

{
  "use-cscope": null,
  "tag-dir": null,
  "filter": {
    "php-file-ext-list": [
      "php"
    ],
    "php-path-list": [
      "."
    ],
    "php-path-list-without-subdir": []
  }
}

It is a file that is in our GIT repository...

@xcwen
Copy link
Owner

xcwen commented Nov 16, 2018

delay:<

@xcwen
Copy link
Owner

xcwen commented Nov 16, 2018

you can use sshfs mount

@webdevelopers-eu
Copy link
Author

webdevelopers-eu commented Nov 16, 2018

Thanks for an advice. Unfortunately I need to do several SSH hops over more then 1 server which would make sshfs quite cumbersome and unreliable. Not to mention that I am logging into way too many servers during a day and mounting all of them would be inefficient...

I downgraded to 1.7.9 which solved the problem. It appears that the problem was introduced in 1.8.1. The version 1.8 does not have this issue but unfortunately auto-completion does not work there either.

1.7.9 works fine with Tramp including auto-completion. I just made symlink from ~/.ac-php/tags-home-... to ~/.ac-php/tags-sudo:someuser@server:... and it works.

@sergeyklay
Copy link
Collaborator

Hello @webdevelopers-eu

I'm interested to fix this (or at least sorting it out). So, could you please help me? I'll need the steps to reproduce this on my laptop. Let's say I have a fresh installed Ubuntu with the vanilla Emacs without any package. What exactly should I do to (step by step) get the same error?

Thank you.

@sergeyklay
Copy link
Collaborator

I'm closing this issue due to the lack of any reaction. I'll open it again if the need arises

@braoult
Copy link

braoult commented Jun 19, 2019

I would like to re-open this issue.

ac-php is just unable to re-build the ac-php-conf.json file on remote tramp file, but, when the tree is copied locally, it does.

@sergeyklay sergeyklay reopened this Jun 19, 2019
@sergeyklay
Copy link
Collaborator

sergeyklay commented Jun 19, 2019

@braoult Which version do you use?
@xcwen Could you please re-check?

@braoult
Copy link

braoult commented Jun 19, 2019

@sergeyklay: My ac-php is 20190424.222, from melpa.

@paxperscientiam
Copy link

Hello, is it still possible to address ac-php not working over tramp?

Completion error:
"Company: backend company-ac-php-backend error "Wrong type argument: hash-table-p, nil" with args (candidates PD"

@sergeyklay
Copy link
Collaborator

@paxperscientiam No, it seems this is not fixed yet

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

No branches or pull requests

5 participants