Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundle exec rake assets:precompile is compiling all assets (but only every time another OS is compiling them) #2736

Closed
h0jeZvgoxFepBQ2C opened this issue Sep 22, 2020 · 2 comments

Comments

@h0jeZvgoxFepBQ2C
Copy link

h0jeZvgoxFepBQ2C commented Sep 22, 2020

Our team has a big problem and we tried multiple countermeasures, but we couldn't find any solution.

Due to server and system constraints, we precompile our assets (sprockets + webpacker) before releasing new versions.

The normal rails script RAILS_ENV=production bundle exec rake assets:precompile is working fine and compiles only the last changed files - except if someone of my team is compiling them also.

We are syncing all code changes before with git, we run yarn install --check-files before each compilation to ensure we have the same npm packages. But it still doesn't work as expected.

When I compile only on my machine, only new assets get compiled. When another teammate compiles them (with pulled changes, updated manifest files,...), all assets get precompiled. If they compile again only on their machine, only the latest changed files are precompiled again.

I'm on OSX, my mates are on Linux/Ubuntu.

Does anyone have a suggestion on how to fix this issue? Or do I miss something? My question is mostly about webpacker, sprockets looks fine.

Also it seems that only some small webpack internal numbers are incresed, see following screenshow:

Bildschirmfoto 2020-09-22 um 17 23 00
Bildschirmfoto 2020-09-22 um 17 21 54

Node: v.14.9.0
Yarn: 1.22.5

@Aeon
Copy link

Aeon commented Feb 20, 2021

@h0jeZvgoxFepBQ2C look into the files tmp/cache/webpacker/last-compilation-digest-development, tmp/cache/webpacker/last-compilation-digest-production, etc.

Implementation details in https://github.com/rails/webpacker/blob/master/lib/webpacker/compiler.rb - the fresh? check uses this file at each run to determine whether recompilation is needed

@justin808
Copy link
Contributor

We've got some other issues that concern this.

Due to server and system constraints, we precompile our assets (sprockets + webpacker) before releasing new versions.

that's normal.

Please reopen if you have more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants