solargraph: [Solargraph::FileNotFoundError] ApiMap did not catalog
What I did before this issue was renaming this file. After I rename this file I got:
[Error - 3:54:17 PM] Request textDocument/hover failed.
Message: [Solargraph::FileNotFoundError] ApiMap did not catalog d:/ASPACK/FACILITY/gitsby/gitsby/db/migrate/20190114123505_create_subscription_packages.rb
Code: -32603
Previous name was: 20190114123505_create_subscriptions.rb New filename: 20190114123505_create_subscription_packages.rb
See here: (watch the cursor position and logs)
Related code:
Sequel.migration do
change do
create_table :subscription_packages do
primary_key :id, type: :Bignum
column :subject, 'character varying(64)', null: false
column :slug, 'character varying(64)', null: false
column :storage_size, 'bigint', null: false
column :price_per_month, 'double precision', null: false
column :price_per_year, 'double precision', null: false
column :discount, 'smallint', default: nil
column :discounted_until, 'timestamp without time zone', default: nil
column :is_active, 'boolean', default: true
column :properties, 'jsonb', default: nil
column :actives_on, 'timestamp without time zone', default: nil
column :expires_on, 'timestamp without time zone', default: nil
column :created_on, 'timestamp without time zone', null: false
column :updated_on, 'timestamp without time zone', default: nil
end
end
end
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 28 (15 by maintainers)
Released in v0.32.2.
Gem v0.32.5 is released. FileNotFoundErrors during completion and hover operations no longer steal focus in the client.
@castwide Looks like disabling and re-enabling the extension fixed the issue.
I will keep you posted if the issue happens again.
Gem 0.33.2 introduces one more change that fixes FileNotFoundError in textDocument/references messages, and might finally eliminate the root cause.
The commonality between most/all the errors was a
checkout
method. Its purpose was to ensure that external files were synced with a library before querying its maps. The error would occur whencheckout
was called more than once in a single query.There’s already a mechanism in another component that performs much smarter library syncing, so the
checkout
method was not only unreliable, it was redundant. This version removes it altogether.My one remaining concern is edge cases in processes that modify the workspace, such as switching repo branches or running rake tasks. Most of those cases should be fine, but I don’t know what I don’t know. If anyone still runs into this issue, please report it. In the meantime, the workaround is to restart either the language server or the editor that’s running it.
The next version of the gem will log FileNotFoundError for debugging purposes but will not send an error message to output. I’m also working on a way to correct the error in place instead of ignoring it, but this way at least it won’t impact usability.
The change is currently in the master branch. I’ll try to have it ready for publication tomorrow.
No further issues here.
The master branch includes a change that forces libraries to update their maps when the language server reports file events. This should fix FileNotFoundErrors that have been happening when external processes create or delete files.
I didn’t see such error other than i reported here.
Currently, my issue goes away but i will keep eye on it. If raises again, I will also check other outputs and devtools.