rafalcieslak / emacs-company-terraform

Company backend for terraform files
zlib License
38 stars 11 forks source link

scan-resources tries scanning in non-existing folders #9

Open knl opened 5 years ago

knl commented 5 years ago

When I enable the debugger on spacemacs (SPC t D) and start editing terraform files, the debugger frequently pops up with:

Debugger entered--Lisp error: (file-missing "Opening directory" "No such file or directory" "/Users/knl/work/github.com/xxx/repo/...")
  directory-files("/Users/knl/work/github.com/xxx/repo/monitoring/manifests/elasticsearch/.terraform/modules/bd12b9409b5851c1c8eda796a0321b97" t "\\.tf$")
  company-terraform--scan-resources("/Users/knl/work/github.com/xxx/repo/monitoring/manifests/elasticsearch/.terraform/modu...")
  company-terraform-get-resource-cache(variable "/Users/knl/work/github.com/xxx/repo/monitoring/manifests/elasticsearch/.terraform/modu...")
  company-terraform-candidates(#("ena" 0 3 (face font-lock-string-face fontified t)))
  company-terraform(candidates #("ena" 0 3 (face font-lock-string-face fontified t)))
  apply(company-terraform (candidates #("ena" 0 3 (face font-lock-string-face fontified t))))
  company-call-backend-raw(candidates #("ena" 0 3 (face font-lock-string-face fontified t)))
  company--fetch-candidates(#("ena" 0 3 (face font-lock-string-face fontified t)))
  company-calculate-candidates(#("ena" 0 3 (face font-lock-string-face fontified t)) nil)
  company--begin-new()
  company--perform()
  company-auto-begin()
  company-idle-begin(#<buffer main.tf<elasticsearch>> #<window 6 on main.tf<elasticsearch>> 964 2187)
  apply(company-idle-begin (#<buffer main.tf<elasticsearch>> #<window 6 on main.tf<elasticsearch>> 964 2187))
  timer-event-handler([t 23762 42357 355021 nil company-idle-begin (#<buffer main.tf<elasticsearch>> #<window 6 on main.tf<elasticsearch>> 964 2187) nil 0])
  read-event(nil t 3)
  sit-for(3)

That folder doesn't exist.