Skip to content

Build error header "has been modified since the module file" pcm "was built: size changed" #190449

Open

Description

@jmagman

Changing headers can cause module file change build failures

I'm not able to run the example on master due to this error:

<unknown>:0: error: file '/Users/filiph/dev/impeller_windows_render_bug/build/macos/Build/Products/Debug/FlutterMacOS.framework/Headers/FlutterPluginRegistrarMacOS.h' has been modified since the module file '/Users/filiph/dev/impeller_windows_render_bug/build/macos/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules/FlutterMacOS-EB2I1X8OEY51SORFFEHAHR5XK.pcm' was built: size changed (was 6038, now 6403) ** BUILD FAILED **

Originally posted by @filiph in #190391

A flutter clean will resolve it. Either figure out how to detect this case and fix it for them, or suggest a clean instead of an inscrutable error (on iOS and macOS)

Activity

  1. added
    platform-iosiOS applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    platform-macosBuilding on or for macOS specifically
    t: xcode"xcodebuild" on iOS and general Xcode project management
    team-iosOwned by iOS platform team
    on Aug 3, 2026
  2. changed the title [-]Build error header "has been modified since the module file" FlutterMacOS-EB2I1X8OEY51SORFFEHAHR5XK.pcm "was built: size changed"[/-] [+]Build error header "has been modified since the module file" pcm "was built: size changed"[/+] on Aug 3, 2026
  3. vashworth commented on Aug 3, 2026

    @vashworth
    Contributor

    iOS already handles this:

    // Check the public headers before checking Xcode version so headers fingerprinter is created
    // regardless of Xcode version.
    final bool headersChanged = publicHeadersChanged(
    environmentType: environmentType,
    mode: buildInfo.mode,
    buildDirectory: buildDirectoryPath,
    artifacts: globals.artifacts,
    fileSystem: globals.fs,
    logger: globals.logger,
    );
    final Version? xcodeVersion = globals.xcode?.currentVersion;
    if (headersChanged &&
    incrementalBuild &&
    (xcodeVersion != null && xcodeVersion >= Version(26, 0, 0))) {
    // Xcode 26 changed the way headers are pre-compiled and will throw an error if the headers
    // have changed since the last time they were compiled. To avoid this error, clean before
    // building if headers have changed.
    targetBuildDir.deleteSync(recursive: true);
    buildCommands.addAll(<String>['clean', 'build']);
    }

    } else if (message.toLowerCase().contains('has been modified since')) {
    return _XCResultIssueHandlingResult(
    requiresProvisioningProfile: false,
    hasProvisioningProfileIssue: false,
    modifiedPrecompiledSource: true,
    );

    But macOS doesn't since we don't have unified tooling: #144397

  4. added
    team-macosOwned by the macOS platform team
    P2Important issues not at the top of the work list
    triaged-macosTriaged by the macOS platform team
    and removed
    team-iosOwned by iOS platform team
    on Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listplatform-iosiOS applications specificallyplatform-macosBuilding on or for macOS specificallyt: xcode"xcodebuild" on iOS and general Xcode project managementteam-macosOwned by the macOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-macosTriaged by the macOS platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions