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.64k stars 4.89k forks source link

layers.el loaded after packages.el #9668

Closed miraclemore closed 4 years ago

miraclemore commented 6 years ago

Description :octocat:

layers.el is loaded after packages.el when I add my own layer. But from layer documentation http://spacemacs.org/doc/LAYERS.html#packagesel Chapter 4.2 inform that packages.el is loaded after layers.el.

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: N/A

Expected behaviour: :heart: :smile: N/A

System Info :computer:

Backtrace :paw_prints:

Loading /Users/chuck/.spacemacs.d/layers/miraclemore/packages.el (source)...done
Loading /Users/chuck/.spacemacs.d/layers/miraclemore/layers.el (source)...
Loading /Users/chuck/.spacemacs.d/layers/miraclemore-ui/packages.el (source)...done
Loading /Users/chuck/.spacemacs.d/layers/miraclemore/layers.el (source)...done

layers.el
(configuration-layer/declare-layer '(
                                     miraclemore-ui
                                     miraclemore-programming))
CeleritasCelery commented 6 years ago

What is the effect of this?

miraclemore commented 6 years ago

Currently, there is no side effect on my local. But if I according to the documents to configure my layers, it will caused the dependency problems. And if the actual order is that, we need to update documentation for new spacemacs users. @CeleritasCelery

CeleritasCelery commented 6 years ago

How do you know they are being loaded in that order?

miraclemore commented 6 years ago

@CeleritasCelery from the Message buffer. As you can see,

Loading /Users/chuck/.spacemacs.d/layers/miraclemore/packages.el (source)...done
Loading /Users/chuck/.spacemacs.d/layers/miraclemore/layers.el (source)...
Loading /Users/chuck/.spacemacs.d/layers/miraclemore-ui/packages.el (source)...done
Loading /Users/chuck/.spacemacs.d/layers/miraclemore/layers.el (source)...done

packages.el done is shown before layers.el done

And also I define a global variable x, setq-default x to 1 on layers.el setq-default x to 2 on packages.el when Emacs startup, C-h v to show that the value of x is 1. It means that the value of x is override by layers.el

Due to I am new to elisp programming language, if I am wrong, please feel free to correct me. thx!

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!