Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !10874

Attempt to fix custom loader race condition

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/bluenote10/bugfix/attempt_to_fix_custom_loader_race_condition into main Apr 24, 2021
  • Overview 11
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: bluenote10

This is perhaps the most naive way to fix #10871 #10315 #8707 (closed).

The idea is to make sure only one promise is created. See #10871 for details on the race condition.

I'm not an expert in webpack/fork-ts-checker-webpack-plugin and the semantics of the beforeCompile vs afterTypeScriptCheck are not entirely clear to me. In particular why beforeCompile can be called multiple times with custom loaders, but afterTypeScriptCheck is always called once. Nonetheless, the idea of the code is probably just to set a pending promise on the very first beforeCompile call, and complete it after the compilation. Since there aren't multiple calls to afterTypeScriptCheck anyway, this simple fix may be sufficient.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/bluenote10/bugfix/attempt_to_fix_custom_loader_race_condition