rejeep / evm

Emacs Version Manager
223 stars 34 forks source link

A lot of "Source file ... newer than byte-compiled file" #58

Closed Malabarba closed 8 years ago

Malabarba commented 9 years ago

See this build, for instance. https://travis-ci.org/clojure-emacs/cider/jobs/82025719

This is not a breaking bug, but it does make me wonder if something is going wrong. Should this be happening?

rejeep commented 9 years ago

I have seen this as well. This only happens for more recent versions of Emacs and for precompiled binaries. I haven't looked into the issue that careful as they are just warnings. But it would be nice to get fixed.

Malabarba commented 9 years ago

Yes. The biggest issue for me is that it floods the build reports. ☺ Specially on builds that run emacs many times, like https://travis-ci.org/clojure-emacs/cider/jobs/82025721

rejeep commented 9 years ago

I can try to recompile the binary again and see if it helps. It will take some time though because I have to set up the VM, etc... all over again.

Malabarba commented 9 years ago

If you feel like it. :) It's not a huge deal.

rejeep commented 9 years ago

Well, it's been bugging me too. I'll give it a try.

rejeep commented 9 years ago

OMG I'm so smart sometimes!!! https://github.com/rejeep/evm#adding-a-new-emacs-version :smile:

Malabarba commented 9 years ago

:smile:

rejeep commented 9 years ago

I don't know if Travis has some cache for downloads such as this. If not, then this does still not work.

I've been rebuilding Emacs 24.4, but I still get those messages. I even tried to touch all files before tar-ing it, but same result.

Looking at the tar-file, there should't be a problem (date is the same):

$ tar -vtf emacs-24.4-linux.tar.gz | grep package\.el
-rw-r--r--  0 vagrant vagrant   87142 Sep 25 15:17 emacs-24.4-bin/share/emacs/24.4/lisp/emacs-lisp/package.el
-rw-r--r--  0 vagrant vagrant   89405 Sep 25 15:17 emacs-24.4-bin/share/emacs/24.4/lisp/emacs-lisp/package.elc

Anyone else has a clue what's going on here?

Malabarba commented 9 years ago

No idea. =/ Maybe if you just remove the .el files?

rejeep commented 9 years ago

Would perhaps solve the issue. But I would like to know what the issue is... :confused:

Malabarba commented 9 years ago

Same here. =/

phillord commented 8 years ago

I've never written any Ruby, so I can't really follow the EVM code, but is the problem occurring during the installation? I've seen this before when, for example, rsync'ing a built emacs to somewhere else -- if the elc file goes across the wire before the el file, then it appears to be newer.

I could use `load-prefer-newer' as a fix but then I'd be running off el files rather than elc which might potentially produce some changed behaviour.

phillord commented 8 years ago

This is causing breakage in my tests here https://github.com/cask/cask/pull/349 because I need to check out output of Emacs.

Can I re-suggest Artur's idea -- just remove the *.el files. They aren't being used anyway!

Malabarba commented 8 years ago

Rsync has an option to preserve file attributes

phillord commented 8 years ago

I've checked this out now on the fix/evm-out-of-date-messages of http://github.com/phillord/m-buffer.

Two things I have noted. First, unless I have done it wrong, the standard instructions put the active emacs into /tmp/tmp/emacs-24.5. And, second, removing the el files works a treat.

Compare https://travis-ci.org/phillord/m-buffer-el/builds/132091626 with https://travis-ci.org/phillord/m-buffer-el/builds/132092411.

The .travis.yml file looks like this...

language: generic
sudo: no
env:
#  - EVM_EMACS=emacs-24.1-travis
#  - EVM_EMACS=emacs-24.2-travis
#  - EVM_EMACS=emacs-24.3-travis
#  - EVM_EMACS=emacs-24.4-travis
  - EVM_EMACS=emacs-24.5-travis
install:
  - curl -fsSkL https://gist.github.com/rejeep/ebcd57c3af83b049833b/raw > travis.sh && source ./travis.sh
  - evm install $EVM_EMACS --use --skip
  ## delete all the el files
  ## - find /tmp -name "*el"
  ## - find /tmp -name "*elc"
  - find /tmp -name "*elc" | sed 's/.$//' | xargs rm -f
  - cask
script:
  - emacs --version
  - make
rejeep commented 8 years ago

I don't think the "remove all .elc files" is a good solution, because I've experienced differences between compiled and non compiled el-files so many times. So Emacs would not be run the way it will be for real.

@phillord Can you try and see if there's anything different with this branch: https://github.com/rejeep/evm/tree/copy-with-preserve-option

phillord commented 8 years ago

@rejeep I didn't remove the elc files, I removed the all el files for which there is an corresponding *elc file.

The *el files really are unnecessary -- quite a lot of packaged emacs' ship without them, and this seems to make sense here also. They are not being loaded, after all.

I will try the branch though.

phillord commented 8 years ago

@rejeep Tried https://github.com/rejeep/evm/tree/copy-with-preserve-option at https://travis-ci.org/phillord/m-buffer-el/builds/132135612. Appears to solve the problem, also. Either solution seems good to me: yours seem to fix the actual problem, mine produces a 50M smaller download.

rejeep commented 8 years ago

Then I will go with my solution because I want the dist to be as similar as possible to what it would look like when installed IRL.

I merged my change to master, @phillord can you please verify again?

josteink commented 8 years ago

I'm not @phillord, but I've also had this issue and I can confirm this is now fixed for me.

phillord commented 8 years ago

I am @phillord, and it appears to be working on master. The errors from my cask PR are gone also.

@rejeep I think you are right, this is probably the cleaner solution.

rejeep commented 8 years ago

👍

Malabarba commented 8 years ago

Thanks for the work, Johan!

rejeep commented 8 years ago

Only took almost a year! 😄