Closed xskif closed 9 years ago
I have same problem. It reindex each time i type. I had same issue with SublimeCodeIntel
I would actually be interested in analyzing this issue, but I would need access to a Ruby project, that triggers this kind of error... Any idea?
@spectacles , you can create Rails app and some scaffold (e.g. Post).
It's working just fine for me.
I do see some errors like:
unexpected error scanning 'shell.rb'
etc, but only on first indexing. After that no problems.
So... I will need access to a Project that is reportedly problematic. Who is willing to set that up for me?
Apart from that I have pushed a commit that catches the TypeError. It would be interesting how that changes your situation.
Has one of you verified, whether the scanned files actually appear in your .codeintel database?
To do that you can go to Sublime Command Palette, type "Dump" and select "CodeComplice: Dump import Directories".
It will raise a message dialog with the current database directory. In this directory (or one dir level UP from there) you will find a subdir "import_dir_stats". The Command has written all scanned directories per language into text files.
cheers!
I have the started Rails app with Product scaffold. Nothing more. Here my settings:
"codeintel_language_settings":
{
"Ruby": {
"ruby": "/home/skif/.rvm/rubies/ruby-2.1.5/bin/ruby",
"codeintel_selected_catalogs": ["rails"],
}
}
I'm trying to type ActiveRecord::
and 1.
inside of Product model. 1.
don't triggers suggestion popup even after full reindex.
Console log:
Updating indexes for 'Ruby'... The first time this can take a while.
Doing CodeIntel for 'Ruby' (hold on)...
current triggername: 'ruby-complete-module-names'
+ Event: Adding 'rails.cix' API catalog
Adding 'rails.cix' API catalog
+ Event: Adding ruby-1.9.3 stdlib
Adding ruby-1.9.3 stdlib
+ Info: Doing CodeIntel for 'Ruby' (hold on)...
Doing CodeIntel for 'Ruby' (hold on)...
Done 'Ruby' CodeIntel! Full CodeIntel took ~1s
+ Info: processing `Ruby': please wait...
processing `Ruby': please wait...
Updating indexes for 'Ruby'... The first time this can take a while.
Doing CodeIntel for 'Ruby' (hold on)...
current triggername: 'ruby-complete-module-names'
Done 'Ruby' CodeIntel! Full CodeIntel took 3ms
Updating indexes for 'Ruby'... The first time this can take a while.
Doing CodeIntel for 'Ruby' (hold on)...
current triggername: 'ruby-complete-available-modules-and-classes'
+ Info: Doing CodeIntel for 'Ruby' (hold on)...
Doing CodeIntel for 'Ruby' (hold on)...
+ Info: Updating indexes... The first time this can take a while. Do not despair!
Updating indexes... The first time this can take a while. Do not despair!
Done 'Ruby' CodeIntel! Full CodeIntel took ~20s
+ Info: processing `Ruby': please wait...
processing `Ruby': please wait...
Updating indexes for 'Ruby'... The first time this can take a while.
Doing CodeIntel for 'Ruby' (hold on)...
current triggername: 'ruby-complete-available-modules-and-classes'
+ Info: Doing CodeIntel for 'Ruby' (hold on)...
Doing CodeIntel for 'Ruby' (hold on)...
+ Info: Updating indexes... The first time this can take a while. Do not despair!
Updating indexes... The first time this can take a while. Do not despair!
Done 'Ruby' CodeIntel! Full CodeIntel took ~20s
+ Info: processing `Ruby': please wait...
processing `Ruby': please wait...
Updating indexes for 'Ruby'... The first time this can take a while.
Doing CodeIntel for 'Ruby' (hold on)...
current triggername: 'ruby-complete-available-modules-and-classes'
+ Info: Doing CodeIntel for 'Ruby' (hold on)...
Doing CodeIntel for 'Ruby' (hold on)...
+ Info: Updating indexes... The first time this can take a while. Do not despair!
Updating indexes... The first time this can take a while. Do not despair!
Done 'Ruby' CodeIntel! Full CodeIntel took ~20s
As you can see Updating indexes... The first time this can take a while. Do not despair!
each time when i typing some new line of code.
Here the result of Ruby dump:
a4c91e32c421d3007bfa1233d4a95f41 /home/skif/.rvm/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/bundler-1.8.3/lib
7dace1ff67397fbadfe72022a3514404 /home/skif/.rvm/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/bundler-unload-1.0.2/lib
cd1bcc3cbbc321716e6d35052f7f8702 /home/skif/.rvm/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/executable-hooks-1.3.2/lib
cba8fed7a7c53d52705a46e307a7abed /home/skif/.rvm/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/gem-wrappers-1.2.7/lib
c2e30e38415b526ac2a42bb673befdc5 /home/skif/.rvm/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/rubygems-bundler-1.4.4/lib
c67fcc4e36f8295984f44d3dc56e53c2 /home/skif/.rvm/rubies/ruby-2.1.5/lib/ruby/gems/2.1.0/gems/rvm-1.11.3.9/lib
814c5032531fcd9d208cee5a3b73f975 /home/skif/.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0
232e40f6cce178e193c042882be698bb /home/skif/demo/depot/app/controllers
8022f54b3a13cf180e3af1008de83c5d /home/skif/demo/depot/app/helpers
144c3fd914de846a9d0ca3d5219bf4ba /home/skif/demo/depot/app/models
d0d783e02f3be44c74e95fac112d0371 /home/skif/demo/depot/config
c98f0b0a71ba8cd6c084d2015b16b215 /home/skif/demo/depot/config/environments
d8dbd52363e24ae88b62620dd9f3d718 /home/skif/demo/depot/config/initializers
84319f22720d79da189da1c239a0033b /home/skif/demo/depot/db
5a85280143d9a198f48289cddb1f3fa0 /home/skif/demo/depot/db/migrate
91de8c0cec938897c78e57704c288de4 /home/skif/demo/depot/test
b29e4215af5f487a0d996fc5111ee5ef /home/skif/demo/depot/test/controllers
ec48029d672b4956c6ef307e4d6409d0 /home/skif/demo/depot/test/models
UPD: after dump all works fine, but why?
UPD: after dump all works fine, but why?
seriously?
@erikLovesMetal ?
what's your os's?
Ubuntu 14.04.1
Just noticed the same behavior for JavaScript.
UPD: there is annoying freezes of ST3 because of index updating.
@xskif today got ahold of a ubuntu ... everythings working fine.
in the console log you posted, one can see that the ~20s timeout appear for a certain trigger type:
ruby-available-modules-and-classes
I looked up the code and found that this trigger-type (along with others) is !disabled!:
from libs/codeintel2/lang_ruby.py
, line 1435:
elif trg.form == TRG_FORM_CPLN and trg.type in (
"available-modules-and-classes", # class FOO < |
"class-vars", # @@|
"instance-vars", # @|
"available-modules", # include |
"global-vars", # $|
):
# XXX NYI. Should disable these at trg_from_pos else will get
# statusbar warnings.
return None
so no matter hooow long you wait, you will never get completions for this trigger!
please note!, the legendary note
Updating indexes... The first time this can take a while. Do not despair!
does _NOT!!!!!_ mean, that there is some indexing going on. It just means that you triggered a new request, before the last one returned results. After 20s the request will timeout and show =>
Done 'Ruby' CodeIntel! Full CodeIntel took ~20s
Regarding your other issues:
My suggestion is this:
add to your ruby
settings
codeintel_scan_exclude_dir:["/rubies/ruby-2.1.5/","/demo/depot/" ]
delete your datbase and report back what that is changing for you!
All the best!
@spectacles , take it easy. I'm just contribute to your plugin, because i believe that this plugin might be better than other. Don't be rude.
I will report back as soon as i can.
@xskif I did not mean to be rude, just explicit. enjoy!
I don't know why, but ruby now working fine, at least, i don't catches freezes. There are another annoying issue:
// here some View php code like
// echo $model->title;
// here i need to add to php file some JS code
<script>
// here i have thousands of freezes while typing and `updating indexes` ofcourse
</script>
I don't know why, but ruby now working fine
:+1:
It's still shows me Updating indexes
message and has 20 sec delay time to time, but i can work with that.
Reopen this issue, please. There are freezes in php file while writing js code.
As I have already told you, the message updating indexes
does _NOT_ mean that indexes are updating. Its just a confusing message that the SublimeCodeIntel had there and I didnt mind to change it into could not find a completion
!
Your posts are not reliable enough for me, to work on them.
If I cant take a working fine
as a "working fine", than I am not willing to spend any time with that.
I am not able to deduct from your reports what is not working and what is, so there is not much I can do about it.
Since you are a programmer and seem to care about this, I would advice you to dig in the source code and fix some things for yourself!
All bugs you have been reporting are working fine for me, so I can assure you that the problem is somehow specific to your setup/project. Feel free to post questions here about the inner workings of this plugin and I will do my best to bring you on track!
Good luck!
Lol. I was helped you to resolve some issues (3 more) when it was just a fork of SublimeCodeIntel. And this is first issue where "bug is not a bug realy" for ruby, but not for js inside php, as i noticed.
You can reopen this issue and find "why?" that happens, or just close your eyes on that, if so, well i don't want to contribute to this plugin at all if author don't wants improve this.
P.S. I don't know Python so well to fix some bugs by myself.
You keep posting different problems under the same github issue. The idea is: one issue, one bug!
Unless more people contribute their input to the bug reports, there is nothing I can do. One computer (your computer) encountering bugs, is not enough to analyze them remotely.
Everything I know about python, I learned from sublime plugin. Otherwise I only know PHP. Python is SIMPLE. Check it out!
Good luck!
Ok, i got it, my PC to blame for everything. There is no different problems, it's still the same, but affects another language.
This discussion is pointless, you expressed your opinion loud and clear.
P.S. I know which Python is, but i have a lot of work with another languages, and i don't have time to learn another one more deeply. Python CI it's all i need now.
Dude, please dont cry! You are the only one reporting these problems, me fixing your problems is pointless. You will believe me when I say: we ALL have a lot of work ;)
i have index updating every time when i write some Ruby(Rails) code like
ActiveRecord::
Because of that i should waiting a while(10-20 seconds) before tooltip show me suggestions