Skip to content

.bs.js gets timestamp 1970-01-01 if .res had a warning #5206

Closed
@cknitt

Description

@cknitt

This just cost me almost a day to figure out. I was upgrading and refactoring a large (ReScript) React Native app, and suddenly Metro Bundler was not picking up any changes anymore until I restarted it with --reset-cache. Which I had to repeat every time I made a change. 🤯

The reason was that, in the process of refactoring, I had introduced some "unused open" warnings that I was planning to resolve later.

For the files with warnings, correct JS output was generated in the .bs.js, but the timestamp of the .bs.js was set to / remained 1970-01-01, so Metro did not refresh its cache and therefore the changes I made never became active in my app.

I think this is quite a serious issue and might affect other bundlers, too. I believe I have just not run into it before because I usually don't leave any warnings unresolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions