syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.65k stars 4.89k forks source link

Core tests failing for all newer PRs due to wrong layer loading order #10650

Closed smile13241324 closed 6 years ago

smile13241324 commented 6 years ago

Description :octocat:

It seems that the layer loading order is broken. This is causing the test test-declare-layers--distribution-layer-is-second to fail for all newer PRs.

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: The tests fail, preventing any merges.

Expected behaviour: :heart: :smile: The tests do not fail, allowing merges.

System Info :computer:

syl20bnr commented 6 years ago

Promise, will fix it soon :D

sdwolfz commented 6 years ago

When running tests locally (in a VM since the tests mess up your ~/.emacs.d and ~/.spacemacs) the configuration-layer--used-layers vairables contains (spacemacs-bootstrap spacemacs-defaults spacemacs-base emacs-lisp git). It looks to me like the change should be:

diff --git a/tests/core/core-configuration-layer-ftest.el b/tests/core/core-configuration-layer-ftest.el
index 0ddcaa98..5c1b255a 100644
--- a/tests/core/core-configuration-layer-ftest.el
+++ b/tests/core/core-configuration-layer-ftest.el
@@ -33,7 +33,7 @@
         (configuration-layer--indexed-layers (make-hash-table :size 1024)))
     (configuration-layer/discover-layers 'refresh-index)
     (configuration-layer//declare-used-layers dotspacemacs-configuration-layers)
-    (should (eq 'spacemacs-base (second configuration-layer--used-layers)))))
+    (should (eq 'spacemacs-base (third configuration-layer--used-layers)))))

 ;; ---------------------------------------------------------------------------
 ;; Lazy installation of layers
sdwolfz commented 6 years ago

I've pushed 0d9b3490912f83f75462d14eb8abb320fb901661 that fixes the failures, tested it on an old PR of mine and it passes now.

The commit itself fails on deploy though... looks like a formatting issue in the python layer, I'll fix that next.

sdwolfz commented 6 years ago

And we have green!

Looks like all failing PRs opened in the last month need to be rebased.