Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #112 by handling broken imports when imported flows or code nodes are moved or reorganized.
/claim #112
Resolves #112
Root Cause
Previously, when a referenced
.flydeflow or.flyde.tscode node was moved to another folder or renamed in the workspace, relative import paths inside.flydefiles broke and required manual path fixing.Key Changes
vscode/src/fileMoveHandler.ts:vscode.workspace.onDidRenameFileslistener invscode/src/extension.ts..flydeor.flyde.tsfiles or directories are renamed/moved..flydeflow files across the workspace usingyaml.parseDocumentto preserve structure and comments..flydeflow itself is moved to a different directory.vscode.workspace.applyEditso changes integrate cleanly with the editor's undo stack.loader/src/resolver/server/findReferencedNodeServer.ts:getLocalOrPackagePaths: if an import path does not exist directly, checks common extensions (.flyde,.flyde.ts,.ts,.js) and searches the workspace project hierarchy for moved files, preventing hard crashes.vscode/src/test/fileMoveHandler.test.tscovering file movement, code node movement, folder renaming, self-movement re-anchoring, and no-op safety. All tests pass 100% green.Testing
@flyde/loader:mocha src/**/*.spec.ts(18 passing)flyde-vscode:tsc -p ./(0 errors)fileMoveHandler:mocha vscode/src/test/fileMoveHandler.test.ts(5 passing)Bounty Payout Address (USDC on Base L2):
0x46D5318E4397cFcBED06a235c1604E473682Ea1F