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

feat: single cancellable scan #11243

Closed

Conversation

dominikg
Copy link
Contributor

@dominikg dominikg commented Dec 7, 2022

Description

scanning currently starts multiple esbuild promises and there is no way to cancel them.

use a single pass promise and add a plugin that cancels the running build when calling cancel()

Additional context

this may be useful to prevent parallel runs of the optimizer too, ideally there was a simpler way to cancel the esbuild promise but i didn't see it :/


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@dominikg
Copy link
Contributor Author

dominikg commented Dec 7, 2022

see #11245 for this without cancel.

@benmccann
Copy link
Collaborator

I filed a feature request: evanw/esbuild#2725

@sapphi-red sapphi-red mentioned this pull request Feb 2, 2023
9 tasks
@benmccann benmccann removed the on hold label Feb 27, 2023
@benmccann
Copy link
Collaborator

@dominikg perhaps you'd be able to rebase this PR?

esbuild added support for cancel in 0.17.1: https://github.com/evanw/esbuild/releases/tag/v0.17.1

vite now uses esbuild@0.17.5

@IanVS
Copy link
Contributor

IanVS commented Feb 27, 2023

I wonder if this might help solve #9986. That sure would be nice! It's a big frustration for a lot of Storybook-vite users.

@dominikg
Copy link
Contributor Author

not sure if rebase is a good idea, this PR has extra complexity that's no longer needed with the new esbuild api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants