-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix loading configs from project .continue folder in JetBrains IDEs on Windows (bug #5474) #5618
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
Conversation
this firstly fixes bug in loading configs from project's .continue folder on JetBrains IDEs with messages in core.log like "Failed to unroll block [object Object]: ENOENT: no such file or directory, open '/D:/Projects/test/.continue/models/new-model.yaml'"
✅ Deploy Preview for continuedev canceled.
|
@muravvv thanks for the fix, this is great to see!
I think there are some quick unit tests that would be extremely beneficial. Can you take moment to add a few cases for the different operating systems to |
url generation code duplicates localPathToUri (which mostly used to create file urls in the rest code), except URI.normalize to avoid adding uri-js package to test environment (and because in general getContent should work with any valid file url)
@sestinj ok, I've added test for local file urls. If it is running on Windows it now detects this bug (if fix commit is reverted). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that this test is just a repeat of the previous test with different file contents, rather than actually testing the URL. Is this purposeful? I'd like to make sure that there's a representative test that you are able to run on your windows machine
Actually this test checks exactly access by file url: primary difference from absolute path test is And as File content is changed just in case to protect against confusing variables with absolute path test. It does not affect on test logic itself. And of course, I have checked, that this test really works: I have reverted my first commit and the test became failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, thanks for clarifying
Hi @muravvv, yesterday we shared some updates with our contributors about how we're aiming to improve the contribution process. Part of this included the addition of a Contributor License Agreement (CLA) to protect both contributors and the project. We're reaching out to ask that previous contributors sign it. Could you please take a moment to sign, or if you have any questions send me a message? (either here or nate@continue.dev would work) To do so, you just need to post a comment below with the following text:
❤️ Thank you for the work you've done on Continue, and let me know if you have any suggestions on how we can make the project even better! |
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
Description
This pull reqest fixes bug in loading configs from project's
.continue
folder in JetBrains IDEs with messages incore.log
Failed to unroll block [object Object]: ENOENT: no such file or directory, open '/D:/Projects/test/.continue/models/new-model.yaml'
(bug #5474). Also it should fix other issues with access to local files by urls on Windows.The problem arises from incorrect handling
file://
URLs inRegistryClient.getContent
on Windows: functiongetContentFromFilePath
simply removesfile://
prefix, while on Windows it is needed to remove third/
as well. So for URLfile:///C:/path/to/file
it will try to read file/C:/path/to/file
while right file path isC:/path/to/file
(UNIX-syle slashes is acceptable for node.js).Checklist
Testing instructions
#5474 is reproduced in any JetBrains IDE (I have tested in CLion and IntelliJ Community) on Windows: before this fix no yaml files worked from project's
.continue
folder.Summary by mrge
Fixed loading configs from the .continue folder in JetBrains IDEs on Windows by correcting file:// URL handling.