The sound distributed version control system

#623 My experience getting started with Pijul.

Opened by finegeometer on January 20, 2022
finegeometer on January 20, 2022

With Pijul reaching beta, I was reminded that I wanted to share my experience getting started with Pijul. Spoiler: It didn’t go well.

Compilation

I first tried to install Pijul on 2021-12-29. Unfortunately, the Pijul install happened to be broken at that time, because of https://nest.pijul.com/pijul/pijul/discussions/591.

Fortunately, a simple workaround was posted at 2021-12-31T08:01, and a fix was pushed the next day.

Key generation

My next problem was that the manual didn’t (and still doesn’t) mention key generation. The “Getting Started” section is silent, and the section for pijul key is missing. pijul key --help yields no useful information. And pijul key generate --help yields USAGE: pijul key generate [OPTIONS] <LOGIN>, but does not make it clear what <LOGIN> means.

At 2022-01-01T12:30, I resorted to reading the code. Since commands::key::Key::run stores <LOGIN> in a commands::Identity, and commands::protocol::output_id puts config.author.name in the same field of commands::Identity, I concluded that <LOGIN> refers to the screen name you wish to use.

At 2022-01-01T13:48, I found https://nest.pijul.com/pijul/pijul/discussions/521. This would have answered my questions, if I had found it earlier.

Cancellation

When I started learning Pijul, I was unsure what I was doing. As a result, I was fairly hesitant, and would often Ctrl+C a command if I wasn’t sure what I was doing.

Unfortunately, Pijul seems to dislike it when you cancel commands. Examples:

  • I hit Ctrl+C in the middle of pijul key generate. This led to the secret-key file being empty. As a result, future attempts complained that the file already existed.

  • When I tried to record my first change, I was surprised by the text editor appearing, so I tried to back out. This bricked the repository. (As of 2022-01-20, I cannot reproduce this.)

  • My experience signing up to the Nest, detailed in the next section.

These are the examples I found. But it’s probably worth looking over all the commands, to see what happens if they’re cancelled.

The Nest

At roughly 2022-01-06T08:00, I tried logging in to the Nest for the first time, using my GitHub account. At first, I hit cancel on the authorization, but then I changed my mind, tried again, and clicked authorize.

The result was that https://nest.pijul.com/finegeometer just displayed “Not Found”.

So I undid the authorization, and tried signing up directly.

  • On the first attempt, I messed up the password confirmation. It just cleared the fields, and only mentioned the problem in the URL.

  • On the second attempt, I did get it correct. But I got a “CouldNotSignup” error (again reported only in the URL). Maybe this had something to do with my earlier attempt to sign up via Github?

I had to use the “Contact Us” email, but I was eventually able to get into the Nest on 2022-01-11.

Conclusion

All in all, it took me two weeks to get from deciding to install Pijul, to successfully logging in to the Nest. I probably should have given up. But I had somehow managed to make Pijul a requirement for my New Year’s resolution, so I was motivated to continue.

finegeometer on January 20, 2022

Bonus: When I hit “Create Discussion”, I was redirected to a page saying “Not Found”. Refreshing the page fixed this.

pmeunier on January 20, 2022

Thanks! I’m sorry you experienced all this at the same time. The story around keys is complicated and mostly unfinished, but we didn’t want to let that stop the release, since feedback was the main missing point in that part of the design.

  • About the compilation issue: yes, clap is the best Rust crate for command-line argument parsing, but has had a tendency to change quite often and quite significantly lately. Sorry about that.

  • Cancellation: the key issue is indeed a bug, but I’m extremely puzzled by the problem with the text editor: all formats in Pijul are designed on purpose to be atomic in all their operations. If you can indeed “brick” a repo, this is an extremely serious bug in code that has been read and reviewed thousands of time. I really wonder what happened there.

  • The Nest: in the week leading to the release, something triggered a bug in the Nest, and the replication mechanisms failed, causing all write operations to fail. This is now fixed (in part thanks to your email!), and hundreds of new users joined in the last two days!

finegeometer on January 21, 2022
  • Brick: I know I somehow managed to get into a state where commands like pijul log would hang. But as I said, I can’t reproduce it. And unfortunately, I deleted that repo, and even a file recovery tool can’t find it. Sorry.

  • Clap and Nest: It sounds like I just picked an unlucky time to install Pijul?

  • Keys: Even if these will change soon, we still need to know how to use them now!