-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Allow to pin packages to specific archive #6575
Allow to pin packages to specific archive #6575
Conversation
Using a location recipe that isn't really a recipe kinda violates POLA. It may be better to implement a new syntax: (ensime :archive "melpa-stable") Or maybe: (ensime :pin "melpa-stable") In this case, |
Hey @bmag, What you say makes sense. I will update my PR to reflect this. Thanks for the suggestion. |
183a110
to
8f0cfca
Compare
I've updated PR. Instead of using strings - let's use symbols 😸 Checkout updated PR description. |
core/core-configuration-layer.el
Outdated
|
||
ARCHIVE must be one of the following symbols: melpa, org, gnu, | ||
melpa-stable." | ||
(unless (memq archive '(melpa org gnu melpa-stable)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use package-archives
instead of hard-coded archive names:
;; if archive is a string
(assoc archive package-archives)
;; if archive is a symbol
(assoc (symbol-name archive) package-archives)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Thanks!
I don't understand why you prefer symbols to strings here, but either way works 😄 |
8f0cfca
to
0351e56
Compare
@bmag thanks for all suggestions once again 😸 💃
Yeah, both of them work. My main point is that symbol here is like enum. Only several predefined values are acceptable. On the other hand, string has another meaning 😸 |
0351e56
to
0411313
Compare
0411313
to
80b8882
Compare
ping, would be awesome to have this on the develop branch |
80b8882
to
4cc1a0d
Compare
Fixed conflicts. |
4cc1a0d
to
ae49a2f
Compare
Fixed conflicts 😸 |
A noob question. Can it be used on |
Yes |
ship it! :D |
Ship it please! 😸 |
This sounds as if it is not possible to get all packages from stable by default, but as if one would have to enumerate all of them. Would be great if you could allow users to define both the default repository with Thanks! |
@BABILEN That sounds really likely to break things, as it's likely that the code within some layer that most users have enabled on their systems would break if you changed the default repo to pull packages from. It seems a lot more manageable for the layer itself to specify which package version (from which repo) it's intended to work against. |
@clhodapp Well, sure. It's just that at the moment all packages (appear?) to be daily snapshots from melpa. I don't quite see how that is considered to be less likely to break things than pulling properly released versions by default. :) |
@BABILEN The problem is gradual vs all-at-once. Sure, some layers break some times, but by moving between melpa and melpa stable, you are likely changing the version of a whole bunch of packages at the same time (and changing them to a version that is potentially a lot different from what most users are running to boot). It seems like a much safer option would be to have separate "stable" and "unstable" versions of layers (potentially both coexisting in the tree at the same time) and letting you pick which set you wanted to use (at the potential cost of losing out on some layers, especially at first). It could maybe work to be able to mix-and-match from the sets, but then you could run the risk pre-inits and post-inits being broken (unless the system is crazy-smart and knows to use the pre-inits and post-inits from stable when a package is coming from a stable layer)... anyway, sorry for the rant ;) |
@BABILEN AFAIK, MELPA builds all packages continuously. Once build is finished, new one is started. If a package doesn't have any changes between builds, there is no new version. MELPA builds from specified branch (with |
@d12frosted That's exactly how it works. With support for
I understand that this requires a more rigorous development process than many package developers are willing to adopt, but exposing |
@BABILEN Unfortunately Spacemacs is not really suited for 'stable' releases, so We might provide something like 'snapshots'. The idea is that specific Spacemacs version is known to work with specific set of packages. There is a mirror of popular package archives we maintain. Ideally I would like it to be used for these snapshots. |
@d12frosted But isn't that more a result of the fact that melpa stable is a comparably new thing, rather than a conscious and intentional decision? In a way you probably want to develop spacemacs against a defined set of dependencies, rather than targeting |
It's hard to answer this question, but supporting Stable MELPA is not high on the priority list. There are several possible reasons for this.
But keep in mind that I understand the need of such thing. It's just not critical for me 😸 I update not that often and I know how to revert / rollback updates (thanks to Spacemacs it's easy to do). Current implementation of stable Spacemacs releases is not ideal as it targets specific versions of packages, but these versions are not written anywhere. Our solution to this issue - package fix releases. So in case you wish to use 'stable' release you have to use latest stable release with latest packages. If something breaks - new release will come. In case you are using old version of Spacemacs - you are on your own 😸 P. S. Just in case. Everything I say is just my opinion and not something that can be treated as official project position. Other contributors might disagree with me. 😸 |
@d12frosted Thank you for elaborating. I totally understand the reason why this is tricky to implement at the moment. I also believe that functionality will be used if it is easy to do so, so by making it easier to install, configure and track stable versions the community will, inadvertently, start using it. This could result in a more stable working platform that does not break over time. Rather than having to catch up with every whim (and bug) in Thanks for all the work on spacemacs and comments on this issue. Much appreciated! |
I was working on this in late december but the solution was not satisfying, this is a tricky topic. The idea was to have package distribution channels:
This is great but switching between channels may break Spacemacs since its configuration is bound to specific versions of packages. So I start to think that it reduces only to a matter of choosing what we support in Spacemacs: either last stable packages or latest packages but not a mix of them. There is no good choice to this, since some people want stability and others want latest. I prefer latest with a fast living ecosystem but there is a major downside to this: sometimes a latest version of a package breaks fresh installs of Spacemacs. Can we find some solutions to this without pinning packages ? I'm thinking about it, a sort of error detection + fallback may be a solution but not sure how hard it would be to implement. |
Is there anything holding this back from being merged? |
Any updates on this? I'm running into issues with the latest cider. |
seems like it's not going to happen 😸 closing PR |
Somewhat fixes or moves towards fixing #6531, #2057 and #3542.
Also #4165 is somewhat related.
Basically thanks to @tonylotts I realised that pinning packages to stable MELPA can be easily automated.
This leverages described problem. But doesn't solve it fully.
Hot it works
This PR does following.
configuration-layer/pin-package
which can be used to pin specific package to one of available archives. One can use it manually, but there is a better choice.:archive archive-name
. To be accurate - it just pins that package.Usage
This will force Spacemacs to download
ensime
from MELPA stable.