Skip to content

Commit

Permalink
Fix: Only rescan when bitbake settings are changed
Browse files Browse the repository at this point in the history
The extension started scanning twice at startup. It turns out this was
because the extension was sending a rescan request when the python
embedded settings where updated. This was fixed by only sending a
rescan request when the bitbake settings are changed.
  • Loading branch information
deribaucourt committed Dec 6, 2023
1 parent bed35b5 commit 023e458
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export async function activate (context: vscode.ExtensionContext): Promise<void>
if (event.affectsConfiguration('bitbake')) {
bitbakeDriver.loadSettings(vscode.workspace.getConfiguration('bitbake'), vscode.workspace.workspaceFolders?.[0].uri.fsPath)
logger.debug('Bitbake settings changed')
void vscode.commands.executeCommand('bitbake.rescan-project')
}
if (event.affectsConfiguration('bitbake.loggingLevel')) {
loadLoggerSettings()
Expand Down
1 change: 0 additions & 1 deletion server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ connection.onShutdown(() => {
// eslint-disable-next-line @typescript-eslint/no-misused-promises
connection.onDidChangeConfiguration(async (change) => {
logger.level = change.settings.bitbake.loggingLevel
void connection.sendRequest('bitbake/rescanProject')
parseOnSave = change.settings.bitbake.parseOnSave
})

Expand Down

0 comments on commit 023e458

Please sign in to comment.