Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Completion: Dependancy graph and method db should be updated when there import changes #61

Closed
laginha87 opened this issue Mar 10, 2018 · 2 comments

Comments

@laginha87
Copy link
Contributor

laginha87 commented Mar 10, 2018

if you have this scenario.

# File b.cr
class A
   def self.a
   end
end
# File a.cr

and then change file a.cr to:

# File a.cr
require "./b"
A.

Completion on A. doesn't work.
This is because the dependancy to b.cr wasn't added to the file.
We can either change this on save or on update. But I think on update might be really slow.

@faustinoaq
Copy link
Member

faustinoaq commented Apr 22, 2018

@laginha87 Is this already fixed?😅

@faustinoaq
Copy link
Member

I think we can execute something similar to @workspace.open_workspace here: https://github.com/crystal-lang-tools/scry/blob/master/src/scry/context.cr#L165

Perhaps just ignoring existent files and adding new ones, WDYT?

Crystal Tools automation moved this from To do to Done May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Crystal Tools
  
Done
Development

No branches or pull requests

2 participants