这是indexloc提供的服务,不要输入任何密码
Skip to content

turborepo / nextjs compat issue #3651

@aviramha

Description

@aviramha

User reported that running next repo using turbopack doesn't work with mirrord

webpack --> mirrord exec -f .mirrord/mirrord.json -- next dev -p 4004
  turbopack --> mirrord exec -f .mirrord/mirrord.json -- next dev --turbopack -p 4004

We had this issue in the past and thought same workaround would work but when running from next cli you can't really add the workaround configuration.

I thought the fix would be in Vercel's Turborepo side but they didn't allow us to include mirrord env variables.

This leads me to the following idea - instead of saving settings inside env variables and trust it'd propagate between sub processes, we will use a const fd + memfd to store the data.

On mirrord config access -> check if our const 94838 FD is valid, if it is, check if it has magic in first 4 bytes, if it does, load encoded settings from there -> can repeat and iterate on FDs in case our FD is used already for other means -> if we can't find in fd fallback to env.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions