Skip to content

Fix Windows vs posix build inconsistency in module path hints on dev#1568

Closed
robhogan wants to merge 1 commit intomainfrom
export-D81675832
Closed

Fix Windows vs posix build inconsistency in module path hints on dev#1568
robhogan wants to merge 1 commit intomainfrom
export-D81675832

Conversation

@robhogan
Copy link
Copy Markdown
Contributor

@robhogan robhogan commented Sep 4, 2025

Summary:
When building bundles with dev=true, Metro adds project-relative module paths to module define call params, which populate module.verboseName.

Currently, this wrongly varies if the bundle happens to have been built on a Windows machine, due to using system path separators. Metro's output should not depend on where Metro is running.

This normalises to posix separators, adding a utility function we also make use of elsewhere.

 - **[Fix]** `module.verboseName` (dev builds only) now uses posix separators regardless of the OS the bundle is built on

Differential Revision: D81675832

Summary:
When building bundles with `dev=true`, Metro adds project-relative module paths to module define call params, which populate `module.verboseName`.

Currently, this wrongly varies if the bundle happens to have been built on a Windows machine, due to using system path separators. Metro's output should not depend on where Metro is running.

This normalises to posix separators, adding a utility function we also make use of elsewhere.

```
 - **[Fix]** `module.verboseName` (dev builds only) now uses posix separators regardless of the OS the bundle is built on
```

Differential Revision: D81675832
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 4, 2025
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D81675832

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in bd80558.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants