vim-plugins icon indicating copy to clipboard operation
vim-plugins copied to clipboard

Perl-Support: Fresh install of perl-support, perl tidy crashes

Open owenBeresford opened this issue 10 years ago • 9 comments

This is a fresh copy on a new machine. I have perltidy installed, no user config defined at the mo.

Typing \ry leads to Error detected while processing function Perl_Perltidy..Perl_Input: line 6: E180: Invalid complete value:

Please advise

owenBeresford avatar Aug 20 '14 12:08 owenBeresford

This used to work for years, and the program logic seems solid at first glance. So here follows a longer debug session.

What is your Vim patch level (:version on the Vim cmd.line)? What happens when you use \h (menu Perl->Help->read perldoc) on an empty line?

What is the result on the Vim cmd.line of:

:echo empty('')

WolfgangMehner avatar Aug 20 '14 14:08 WolfgangMehner

I unpacked the zip file again, to make sure I hadn't borked the vimscript files. No change in output. Odds on a bad network download, but valid zip file are really small.

:echo empty('') returns "1\n"

The vim is the stock ubuntu one, with GTK included. The first few lines are VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:59) Included patches: 1-52 Modified by [email protected] Compiled by buildd@ Huge version with GTK2 GUI. Features included (+) or not (-):

I ran "\h" a few times. On the pragma "warnings", it shows usefull help for that pragma. On the Moose sub "load_components", it shows a generic "No docs" messsge. On an empty line (i.e. cursor on "\n" as a line) it shows same type of error: Error detected while processing function Perl_perldoc..Perl_Input: line 6: E180: Invalid complete value:

Are there any dependencies that I should have installed? As I said, this is a new machine.

owenBeresford avatar Aug 21 '14 08:08 owenBeresford

I haven't written in vimscript since to 2004 time; but my initial guess was that I needed to install the vimscript version of jQuery (e.g. the common library used everywhere).

owenBeresford avatar Aug 21 '14 11:08 owenBeresford

Workarounds

"\h" works if the cursor is placed on the corresponding word in the buffer. "\ry" should work in visual mode. Select the whole buffer "gg v G" then use "\ry". The error only appears in normal mode.

WolfgangMehner avatar Aug 22 '14 16:08 WolfgangMehner

Back to the problem, could you load this code into a Vim buffer: http://pastebin.com/gfRs64k3 and then execute it:

so %

I have never heard anything about a vimscript version of jQuery. Our plug-ins do not use external code.

WolfgangMehner avatar Aug 26 '14 16:08 WolfgangMehner

I tested the above code and perl-support itself on two systems with these Vim builds:

VIM - Vi IMproved 7.4 (2013 Aug 10) Included patches: 1-52 Compiled by 'http://www.opensuse.org/'

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:47) Included patches: 1-52 Modified by [email protected]

Unfortunately I still can not reproduce the two bugs we identified.

The above code is similar to the part of the code which presumably fails in the perl-support. I want to test that independently of the other stuff going on in perl-support.

WolfgangMehner avatar Aug 29 '14 17:08 WolfgangMehner

Hi Wolfgang, Sorry didn't get time to think about this on Thurs/Fri.

if you say that using a .DEB from another distro fixes the problem I will try this.

owenBeresford avatar Aug 30 '14 10:08 owenBeresford

if you say that using a .DEB from another distro fixes the problem I will try this.

Well, that's the interesting question. Have a try ...

If this does not work, I would still be interested in the results of the test mentioned above, if you would not mind running it.

Otherwise, I would suggest using the workarounds, and waiting until your distro releases a new version of the Vim package, and then try again.

WolfgangMehner avatar Sep 01 '14 16:09 WolfgangMehner

Hi.

Just ran the script you sent. Script functions according to design/spec. No errors. This doesn't seem to create a log.

I will update you again at lunchtime (will repeat on laptop...)

owenBeresford avatar Sep 02 '14 10:09 owenBeresford