-
Notifications
You must be signed in to change notification settings - Fork 486
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
chezmoi2: Contributors, please help with beta testing #987
Comments
I've installed
I haven't started digging into these yet but I'll have a look and report back. Edit: I think the second two issues are actually related. I forgot that |
Ok, it turns out the symlink issues are actually just a side-effect of #959 being fixed. My existing Everything else I've tried so far has Just Worked, but I'll keep playing with it. I'm particularly excited to try out the new |
One last thing for tonight: when I make a change to a I've also just discovered while writing this that if I create a |
For those uninitiated on how to build go binaries,
I haven't found any bugs yet, but I'll keep you updated! |
Yep, that totally fixed it, thanks! Nothing new to report today. I'll probably have a few test script updates for Windows to share tomorrow. |
I noticed a few things about chezmoi2 today chezmoi2 apply is a lot slower than chezmoi1
It went from 0.026s to 0.3s. I think chezmoi2 does some more on apply, but it can probably be improved. file has changed, do you want to overwrite?When using both chezmoi1 and chezmoi2, I sometimes get the message ctrl-c in promptWhen getting the above mentioned prompt, if you press ctrl-c you get something like this
This messes up the shell output, until you do -k always succeedsWhen doing a chezmoi apply with -k (keep going), it will always exit with 0. I think it's better if you return an error code anyways, if you come across any. chezmoi2 apply isn't non-interactive anymoreAs mentioned in #992, I automatically apply files from vim. With chezmoi1 this didn't require any interaction, but now it does. You have to specify --keep-going and --no-tty to make it non-interactive in vim (vim apparently doesn't provide a tty to shell commands). I would suggest adding an option like Come to think of it, most of these issues are with the overwrite functionality added in chezmoi2. I think this change can be confusing for old and new users and could potentially break things. I didn't check if it's possible now, but I would definitely recommend adding an option to disable this feature. File permissions not correctAfter adding something to the file Edit: Added some more things |
Thank you @fwsmit for this awesome testing! Really appreciated. Thank you. In no particular order:
Hopefully fixed with 7ecad8c. This makes the prompted choices more explicit, and still allows the user to use abbreviations (e.g.
Should be fixed with b971531. It's a bit less efficient but should restore the user's terminal under more circumstances.
Should be fixed with 4682cce.
I added 2c06aba but this doesn't solve the problem, it's just a step along the path.
This is great feedback and challenges the assumptions that chezmoi2 is making. tl;dr chemzoi2 only checks that permissions are correct with respect to the user's umask. |
Yes that makes it a lot more clear. An option for diffing the two files would be a great addition. This would need to bring up a pager with the diff, and when you exit you can make the choice again.
The terminal isn't messed up after ctrl-c anymore, so that's great! Still, the weird
👍
The apply times I showed above were for when there were no changes to be applied. Chezmoi2 diff isn't actually slower than chezmoi1, so could you maybe just test if there is a difference and then apply? Or are there other things to do as well?
I don't really get how comparing to the umask works, but wouldn't it be easier to just check if permissions1==permissions2? where is the pager?I see the option |
@twpayne to get broader support, why not just post the compiled "nightlies" for commits to the github actions artifacts? I can PR an update to your github actions to enable that if you're willing. |
@JustinGrote, yes, a contribution to add nightlies would be fantastic :) This initial release of chezmoi2 was deliberately targeted at a few people because there were certainly going to be a few glaring bugs, missing features, and oversights, and I didn't want to be overwhelmed by lots of users hitting and reporting the same problem. I'm really grateful to @zb140 and @fwsmit for their front-line testing and reporting what they found here. Adding nightlies is the next logical step to make chezmoi2 more widely available to the next layer of kind testers, and I'd very much appreciate a PR that adds this :) |
Good idea!
Ack, will investigate.
I did a bit of profiling on this, and I'm pretty sure the difference is that chezmoi2 checksums every file to see if it has changed since chezmoi last wrote it, and about 50% of the CPU time is spent computing checksums. This does slow chezmoi2 down (chezmoi1 doesn't do this and so doesn't pay this price), but chezmoi is still overwhelmingly I/O bound and I think the extra value of the functionality is worth the increase in runtime (which remains in the order of a few hundred milliseconds).
Good catch! This should be fixed with 0a37bea.
I wish! The tl;dr is that umask means that "what what you read is not what you wrote". For example, If I write a file with permission 777 on a system with umask 002 and then read back its permissions then I get 0775, so I can't do a simple check that the permissions are equal: I have to take the umask into account. |
@twpayne The state version check fails with snapshotted images. My PR only fixes it if the specified commit is tagged because goreleaser still does snapshots even if you don't specify --snapshot if the commit isn't tagged. Only other option I can think is to maybe hardcode 0.0.1 as the version if not specified (which will be higher than 0.0.0 in semantic versioning) |
The right way to fix this might be to ignore the required version if chezmoi's version is zero (indicating a dev build). |
#1015 adds the diff, pager not added yet. |
@twpayne probably not a big deal but on windows the LookupGroupId returns a SID rather than an individual number and I think it is only being interpreted within a unix context This is seen with |
@twpayne on the windows side, chezmoi2 -f to follow a symbolic link seems to be working for both symlinks and ntfs junctions, however if I deep-link a file, the intermediate items don't respect the -f so they get created as a symbolic link first and fail. I set up three folders: Temp, sltest (symbolic link to temp) and jtest (ntfs junction to test) and put a text.txt file in there. ❯ get-item jtest,sltest,temp
Directory: C:\Users\JGrote
Mode LastWriteTime Length Name
---- ------------- ------ ----
l---- 1/26/2021 7:54 PM JTest -> C:\Users\JGrote\Temp
la--- 1/26/2021 7:54 PM 0 sltest -> Temp
d-r-- 1/26/2021 7:55 PM Temp Then this fails, only creating a symbolic link to sltest, when in fact the -f should have said "first follow sltest and create it as a folder, then follow and fetch the inner text.txt"
❯ get-item C:\Users\JGrote\.local\share\chezmoi\symlink_SLTest
Directory: C:\Users\JGrote\.local\share\chezmoi
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 1/26/2021 8:05 PM 7 symlink_SLTest However if I do the folder first without recursion, then it's OK.
❯ get-childitem C:\Users\JGrote\.local\share\chezmoi\SLtest
Directory: C:\Users\JGrote\.local\share\chezmoi\SLTest
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 1/26/2021 8:08 PM 11 text.txt So clearly the intermediary is just missing a flag to tell it to follow the symlink too and create a directory in source rather than a symlink to that directory. Obviously it should error if a symlink already exists, warning the user to delete the symlink in source if they want chezmoi to specificially manage "sub" files. |
.chezmoiignore: ! Filters not taking precedence per the referencehttps://www.chezmoi.io/docs/reference/#chezmoiignore
Does not seem to work. For example: Capture.mp4 |
Thanks for the in-depth testing @JustinGrote!
Ah, thanks for the insight here. Basically, as far as I can tell, Go's
Do you mean
Under the hood,
In the example here,
|
Done in a2f567d. Note also that
Group lookup skipped on Windows with 9ee00ef. |
I just found this in #831:
Not a technical issue, but a linguistic one. I think the initially planned For example, if I have two scripts Since v2 is still in early beta, this can be replaced with more appropriate words. |
Thank you @MunifTanjim for this feedback! The reason for That all said, your suggestion for All this to say, great input and thank you for this feedback - commit coming up. |
This is by design. The |
Thanks for spotting this @fwsmit! This should be fixed with 22bef17. |
Can confirm it works now!
Okay, that's a good solution.
I don't see any pager in |
Do you have [diff]
pager = "less" |
No, but I do have |
Currently in the process of moving to chezmoi from homegrown script over in caius/zshrc#6. Testing what I currently have against chezmoi2 works fine, once I read the Changelog and realised |
Firstly thank you to @zb140 @fwsmit @JustinGrote @MunifTanjim @caius for all your work in testing, feedback, and contributions. Thanks to your efforts, it seems that chezmoi2 is now reasonably solid. I think that all the feedback from this issue has now been addressed, please add a comment here if there is something that has been missed. The current plan is to release chezmoi2 a few days after Go 1.16 is released. I'll open a new issue for this. Thank you again for all your testing and feedback :) |
With #654 merged, chezmoi version 2 is now ready for beta testing. I'd really appreciate it if you could test it on your machines. At the moment, this requires you need to be familiar with Go development to build and install it locally. Packages, snaps, etc. will follow later.
Quick notes:
chezmoi2 apply
for the first time yourrun_once_
scripts will run again.chezmoi2 status
) and fix various corner-case bugs that were hard to fix with chezmoi1's architecture. Even though chezmoi2 is a complete re-write internally, to the end user, chezmoi2 is not radically different to chezmoi1.master
branch and runninggo install ./chezmoi2
.chezmoi2 diff
and/or use the--dry-run
option to check changes before you apply them.chezmoi2
directory and command name are temporary: eventually chezmoi2 will replace chezmoi1.Specific ways to help:
chezmoi2/testdata/scripts
. More tests are very welcome!chezmoi2:
.What happens next:
cc @benmezger @Grimler91 @felipecrs @fwsmit @Legion2 @zb140
The text was updated successfully, but these errors were encountered: