Skip to content

assets:precompile always modifies mtime in the generated manifest #707

Description

@blampe

Expected behavior

Running assets:precompile twice should produce identical asset manifests when none of the underlying assets have been modified.

Actual behavior

mtime = Time.now.iso8601

mtime is always modified. This produces an identical manifest except for the mtime fields:

     "foo-62ad8f466dff387634e10db2eebe215c9550ef654bbb597718d428e9fb90cfc5.css": {
       "logical_path": "foo .css",
-      "mtime": "2021-05-24T13:44:44-07:00",
+      "mtime": "2021-05-24T13:54:00-07:00",
       "size": 527213,
       "digest": "b7e651694fa30e3fd68adb375d7a3d14121d4e1b8fdf6ff06c6bc2a342967503",
       "integrity": "sha256-t+ZRaU+jDj/Wits3XXo9FBIdThuP32/wbGvCo0KWdQM="
     },

System configuration

  • Sprockets version: 4.0.2
  • Ruby version: 2.6.7

Example App (Reproduction) - THIS IS IMPORTANT YOUR ISSUE LIKELY WILL NOT BE RESOLVED WITHOUT THIS

Setting

config.assets.manifest = "#{Rails.root}/public/assets/manifest.json

then running

rake assets:precompile; git add public/assets/manifest.json; rake assets:precompile; git status

should be sufficient to reproduce the behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions