Unverified Commit 451810f3 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

Remove experimental.sharedPool (#56021)

`experimental.sharedPool` is `true` by default for a long time, changing
it to the default behavior
parent b596de89
......@@ -444,7 +444,6 @@ pub struct ExperimentalConfig {
output_file_tracing_root: Option<String>,
proxy_timeout: Option<f64>,
scroll_restoration: Option<bool>,
shared_pool: Option<bool>,
sri: Option<serde_json::Value>,
swc_minify_debug_options: Option<serde_json::Value>,
swc_trace_profiling: Option<bool>,
......
......@@ -1172,10 +1172,7 @@ export default async function build(
: undefined
const timeout = config.staticPageGenerationTimeout || 0
const sharedPool = config.experimental.sharedPool || false
const staticWorkerPath = sharedPool
? require.resolve('./worker')
: require.resolve('./utils')
const staticWorkerPath = require.resolve('./worker')
let appPathsManifest: Record<string, string> = {}
const appPathRoutes: Record<string, string> = {}
......@@ -1259,18 +1256,12 @@ export default async function build(
},
},
enableWorkerThreads: config.experimental.workerThreads,
exposedMethods: sharedPool
? [
'hasCustomGetInitialProps',
'isPageStatic',
'getDefinedNamedExports',
'exportPage',
]
: [
'hasCustomGetInitialProps',
'isPageStatic',
'getDefinedNamedExports',
],
exposedMethods: [
'hasCustomGetInitialProps',
'isPageStatic',
'getDefinedNamedExports',
'exportPage',
],
}) as Worker &
Pick<
typeof import('./worker'),
......@@ -1817,11 +1808,6 @@ export default async function build(
hasNonStaticErrorPage: nonStaticErrorPage,
}
if (!sharedPool) {
pagesStaticWorkers.end()
appStaticWorkers?.end()
}
return returnValue
})
......@@ -2630,18 +2616,14 @@ export default async function build(
pages: combinedPages,
outdir: path.join(distDir, 'export'),
statusMessage: 'Generating static pages',
exportAppPageWorker: sharedPool
? appStaticWorkers?.exportPage.bind(appStaticWorkers)
: undefined,
exportPageWorker: sharedPool
? pagesStaticWorkers.exportPage.bind(pagesStaticWorkers)
: undefined,
endWorker: sharedPool
? async () => {
await pagesStaticWorkers.end()
await appStaticWorkers?.end()
}
: undefined,
exportAppPageWorker:
appStaticWorkers?.exportPage.bind(appStaticWorkers),
exportPageWorker:
pagesStaticWorkers.exportPage.bind(pagesStaticWorkers),
endWorker: async () => {
await pagesStaticWorkers.end()
await appStaticWorkers?.end()
},
}
await exportApp(dir, exportOptions, nextBuildSpan)
......@@ -3373,18 +3355,12 @@ export default async function build(
silent: true,
threads: config.experimental.cpus,
outdir: path.join(dir, configOutDir),
exportAppPageWorker: sharedPool
? appWorker.exportPage.bind(appWorker)
: undefined,
exportPageWorker: sharedPool
? pagesWorker.exportPage.bind(pagesWorker)
: undefined,
endWorker: sharedPool
? async () => {
await pagesWorker.end()
await appWorker.end()
}
: undefined,
exportAppPageWorker: appWorker.exportPage.bind(appWorker),
exportPageWorker: pagesWorker.exportPage.bind(pagesWorker),
endWorker: async () => {
await pagesWorker.end()
await appWorker.end()
},
}
await exportApp(dir, options, nextBuildSpan)
......
......@@ -44,7 +44,6 @@ const supportedTurbopackNextConfigOptions = [
'excludeDefaultMomentLocales',
'experimental.clientRouterFilterRedirects',
'experimental.cpus',
'experimental.sharedPool',
'experimental.proxyTimeout',
'experimental.isrFlushToDisk',
'experimental.workerThreads',
......
......@@ -400,9 +400,6 @@ const configSchema = {
scrollRestoration: {
type: 'boolean',
},
sharedPool: {
type: 'boolean',
},
sri: {
properties: {
algorithm: {
......
......@@ -188,7 +188,6 @@ export interface ExperimentalConfig {
swcMinify?: boolean
cpus?: number
memoryBasedWorkersCount?: boolean
sharedPool?: boolean
proxyTimeout?: number
isrFlushToDisk?: boolean
workerThreads?: boolean
......@@ -741,7 +740,6 @@ export const defaultConfig: NextConfig = {
(os.cpus() || { length: 1 }).length) - 1
),
memoryBasedWorkersCount: false,
sharedPool: true,
isrFlushToDisk: true,
workerThreads: false,
proxyTimeout: undefined,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment