Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LanceDb/indexing issue #1218

Open
3 tasks done
nmcostello opened this issue May 2, 2024 · 6 comments
Open
3 tasks done

LanceDb/indexing issue #1218

nmcostello opened this issue May 2, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@nmcostello
Copy link

Before submitting your bug report

Relevant environment info

- OS: macOS 14.4.1
- Continue: main
- IDE: vscode

Description

When building from the main branch in the vscode debugger, no lancedb is created within the .continue directory. This leads to indexing issues when the @Docs or @Codebase contexts are used.

Downloading an older version, leaving the .continue directory alone, then installing main again works because .continue/index/lancedb already exists in that scenario.

To reproduce

  1. Remove all references to .continue on your environment.
  2. Run Task install-dependancies and run VSCode Debugger in main.
  3. Verify LanceDB directory doesn't show up at .continue/index/lancedb.
  4. Run @Docs or @Codebase.
  5. Get an error popup and failure to index.

Log output

Error refreshing index:  TypeError: failed to downcast any to Array
	at Object.connect (.../continue/core/node_modules/vectordb/src/index.ts:195:20)
	at _LanceDbIndex.update (.../continue/core/indexing/LanceDbIndex.ts:141:30)
	at async CodebaseIndexer.refresh (.../continue/core/indexing/indexCodebase.ts:104:43)
	at async _VsCodeExtension.refreshCodebaseIndex (.../continue/extensions/vscode/out/extension.js:331802:26) {stack: 'TypeError: failed to downcast any to Array
	a…extensions/vscode/out/extension.js:331802:26)', message: 'failed to downcast any to Array'}
@nmcostello nmcostello added the bug Something isn't working label May 2, 2024
@sestinj sestinj self-assigned this May 2, 2024
@sestinj
Copy link
Contributor

sestinj commented May 2, 2024

@nmcostello thanks for making an issue for this—I've been seeing it the last couple of days in the preview branch as well, but oddly not in production. I've not yet confirmed that it doesn't happen after packaging, but that seems to be the case.

Probably a git bisect will reveal the offending commit (assuming there is one)

@spew
Copy link

spew commented May 6, 2024

I am seeing this issue as well -- even after packaging and installing the extension (built from source).

@nmcostello
Copy link
Author

nmcostello commented May 7, 2024

@spew @sestinj We fixed the issue today by doing a few things:

  1. Delete core/package-lock.json and extensions/vscode/package-lock.json
  2. Modify the vectordb entry in both core/package.json and extensions/vscode/package.json:
      "dependencies": {
    -   "vectordb": "0.4.12",
    +   "vectordb": "^0.4.12",
    }
  3. Run install-dependencies.sh (via command line or VSCode tasks)
  4. Install .vsix or run the debugger

Edit: I ran git clean -fdX and removed any uncommited code before doing all of this. I don't know if that was necessary or not I just wanted to start from a clean slate.

@kivo360
Copy link

kivo360 commented May 7, 2024

Definitely happening with me. I've been seeing it for a few days.

@sestinj
Copy link
Contributor

sestinj commented May 7, 2024

@nmcostello thanks for sharing the fix. Will try and get this integrated today

@sestinj
Copy link
Contributor

sestinj commented May 7, 2024

Confirming that switching back to ^0.4.12 solves the issue (3749a8c).

The original reason for pinning to 0.4.12 was this, which is now fixed, so the change is safe.

I'm making a release for 0.9.127 right now, but I'll leave this issue for a couple of days to confirm that the new version solves the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants