cling icon indicating copy to clipboard operation
cling copied to clipboard

completion crash with iostream

Open gouarin opened this issue 6 years ago • 9 comments

There is an issue with the completion when you include <iostream>.

The simplest case is the following lines in the cling interpreter

#include <iostream>
std::cout+TAB

As you can see in this demo

produced by @SylvainCorlay

gouarin avatar Jul 17 '17 14:07 gouarin

I confirm this behavior, I think that @johanmabille has also experienced this.

SylvainCorlay avatar Jul 17 '17 14:07 SylvainCorlay

I think it is the same as #147. I am looking at it but it seems tricky: for some reason we are destroying the lexer.

vgvassilev avatar Jul 17 '17 14:07 vgvassilev

I experience the same issue as @SylvainCorlay and @gouarin. The example in #147 works for me.

JohanMabille avatar Jul 17 '17 14:07 JohanMabille

The example in #147 also works for me.

gouarin avatar Jul 17 '17 14:07 gouarin

@vgvassilev is there a simple rule that we could apply to the string to complete to disable auto-completion for cases that may crash?

SylvainCorlay avatar Jul 17 '17 14:07 SylvainCorlay

@gouarin, huh? Fails for me on the master... The issue seems very subtle.

@SylvainCorlay, not that I am aware of.

vgvassilev avatar Jul 17 '17 14:07 vgvassilev

The example in #147 works for me too.

SylvainCorlay avatar Jul 17 '17 14:07 SylvainCorlay

@vgvassilev on my side I'm using an old version of cling, based on commit efd44687. I didn't try #147 on master.

JohanMabille avatar Jul 17 '17 15:07 JohanMabille

@vgvassilev, I installed cling from the nightly build for ubuntu 16 and with a fresh build using the clone.sh script. And I have this issue for both.

gouarin avatar Jul 17 '17 16:07 gouarin