Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sixty-crews-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/app': patch
---

Fix concurrent function builds
8 changes: 8 additions & 0 deletions packages/app/src/cli/services/deploy/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {renderConcurrent} from '@shopify/cli-kit/node/ui'
import {AbortSignal} from '@shopify/cli-kit/node/abort'
import {inTemporaryDirectory, mkdirSync, touchFile} from '@shopify/cli-kit/node/fs'
import {joinPath} from '@shopify/cli-kit/node/path'
import {exec} from '@shopify/cli-kit/node/system'
import {Writable} from 'stream'

export interface BundleOptions {
Expand All @@ -19,6 +20,13 @@ export async function bundleAndBuildExtensions(options: BundleOptions) {
await mkdirSync(bundleDirectory)
await touchFile(joinPath(bundleDirectory, '.shopify'))

const javyRequired = options.app.allExtensions.some((ext) => ext.features.includes('function'))
if (javyRequired) {
// Force the download of the javy binary in advance to avoid later problems,
// as it might be done multiple times in parallel. https://github.com/Shopify/cli/issues/2877
await exec('npm', ['exec', '--', 'javy', '--version'], {cwd: options.app.directory})
}

await renderConcurrent({
processes: options.app.allExtensions.map((extension) => {
return {
Expand Down