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

Tasks: Ensure workspace delegate and scope defined #10576

Merged

Conversation

colin-grant-work
Copy link
Contributor

What it does

Fixes #10575 by ensuring that both the scope of workspace delegate and the delegate itself are defined in the TaskConfigurationManager.

Closes #10497

How to test

  1. Open the application with no workspace.
  2. In the frontend logs, see no message about inabililty to read property scope of undefined.

Review checklist

Reminder for reviewers

@colin-grant-work colin-grant-work added bug bugs found in the application tasks issues related to the task system labels Dec 22, 2021
@colin-grant-work colin-grant-work changed the title tasks: Do not create workspace delegate if no workspace is open Tasks: Ensure workspace delegate and scope defined Dec 22, 2021
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me, I confirmed that on master the following error exists while this pull-request resolves the issue:

logger-protocol.ts:112 root ERROR TypeError: Cannot read properties of undefined (reading 'toString')
    at TaskConfigurations.getKeyFromScope (http://localhost:3000/packages_task_lib_browser_quick-open-task_js.bundle.js:1744:22)
    at TaskConfigurations.readTasks (http://localhost:3000/packages_task_lib_browser_quick-open-task_js.bundle.js:1570:26)
    at TaskConfigurations.refreshTasks (http://localhost:3000/packages_task_lib_browser_quick-open-task_js.bundle.js:1562:20)
    at TaskConfigurations.onDidTaskFileChange (http://localhost:3000/packages_task_lib_browser_quick-open-task_js.bundle.js:1554:28)
    at http://localhost:3000/packages_task_lib_browser_quick-open-task_js.bundle.js:1401:28
    at http://localhost:3000/bundle.js:141256:69
    at CallbackList.invoke (http://localhost:3000/bundle.js:141262:26)
    at Emitter.fire (http://localhost:3000/bundle.js:141374:29)
    at TaskConfigurationManager.updateWorkspaceModel (http://localhost:3000/packages_task_lib_browser_quick-open-task_js.bundle.js:1152:47)
    at TaskConfigurationManager.<anonymous> (http://localhost:3000/packages_task_lib_browser_quick-open-task_js.bundle.js:1013:18)

@colin-grant-work colin-grant-work force-pushed the bugfix/handle-workspace-delegate-no-workspace branch from 1bfe9e8 to 2ae9e6e Compare January 5, 2022 20:40
@colin-grant-work colin-grant-work merged commit d7cdb85 into master Jan 6, 2022
@colin-grant-work colin-grant-work deleted the bugfix/handle-workspace-delegate-no-workspace branch January 6, 2022 16:32
@vince-fugnitto vince-fugnitto added this to the 1.22.0 milestone Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application tasks issues related to the task system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error Logged by Task System if No Workspace
2 participants