-
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
Version the .spacemacs template for easier "diffing" #2065
Comments
There are two parts to the problem. One is detecting the update in the template and notifying about it. The other is providing a mechanism to deal with the change. In #2063 I use a change in the template file (not a diff with your personal file) to indicate an update is needed and then provide a link to the diff to accomplish the second step. The two steps are completely independent from one another. #2063 is a simple solution and the one you provide is another option for dealing with the detection step if I understand correctly. I guess you could write code to find the missing variables and add them to your personal file but that seems much more involved. Like a diff on the symbols or something. Anyway I'm interested in fixing this problem |
@justbur I commented in your PR. While I was for a single |
@syl20bnr honestly I think the simple diff works fine and is very quick with ediff. If you're going to change the organization of .spacemacs then you're asking for a more complicated merge of new elements in that file. I don't know of a better system for integrating new config files. |
I agree and I was not saying to remove the diff but more about removing personal configuration from the dotfile to make the diff even more straight forward. I've been thinking about it but it is likely that the .spacemacs.d will remain optional. It's too late to refactor the .spacemacs :-( Another possibility to focus the diff is to narrow the buffer ? |
Why not |
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! |
The short of this is:
.spacemacs.template
and your.spacemacs
with a version-string pairing.It is a common problem that your
.spacemacs
gets out of sync with the template, I agree we should ideally do something to help with this.We kind of started down this path with the recent "template diff" behavior, which just does a naive file diff. This is a step in the right direction, but I don't like that it just does a text diff as I like to re-order and re-word things in that file. What's important is not that the text is the same, but that we have all the variables defined.
I was thinking about this, and something that came to mind was a simple version string that could be hard-coded in two places: in your personal
.spacemacs
and in Spacemacs core. Whenever something is added to the template, the version in core should be bumped. Then on startup, the version in your.spacemacs
is compared to the version in core. If there's a difference, then you need to update your.spacemacs
! And when you do, bump the version string in it to match that in core.I've seen this pattern in things like the new magit, where you have to tell it what version you saw last in your .spacemacs so it will stop bothering you with new feature pop-ups during runtime.
The text was updated successfully, but these errors were encountered: