Changelog generation requires annotating commits with a commit type,
otherwise the tests will fail. This is annoying for contributors, since
it's unusual, and I often myself forget to do it, causing a round-trip
with tests.
So, skip generating the changelog during the tests. Also, change the
`--no-git` option for `gen book` and `gen all` to `--no-changelog`, so
it's clearer what it does.
I think I'll wind up just making a YAML file that contains commit types,
for changelog generation, so it doesn't have to be done in the commit
message.
type: testing
Tweak the `MetainfoDecode` error message to make it different from the
`MetainfoDeserialize` error message. It's a fine distinction, but the
`MetainfoDeserialize` error message happens on any serde error when
deserializing, whereas the `MetainfoDecode` error message happens when
encountering invalid bencode.
Also placate Clippy by disabling `clippy::needless_lifetimes` lint.
type: reform
Previously, the release branch would be merged after pushing a tag to
github. This would cause the merge to fail, because github would kick
off a CI run after pushing the tag, and block the merge because it
wasn't finished.
This changes the publish recipe to merge before pushing the tag, which
aboves the above problem.
type: development
Instead of checking if `options.quiet` is set whenever printing, disable
all printing to stderr if the `--quiet` flag is passed.
Although it isn't strictly necessary, I still don't construct a progress
bar if `options.quiet` is true, since progress bars might be a little
more expensive than just printing error messages.
A future diff might add checking to the `errln` and `outln` macros, so
that they don't print at all if the respective output stream is
inactive.
type: reform
If both author name and email are present for a commit, format as a
link. If one is absent, format as the other. If both are absent, format
as "Anonymous".
type: documentation
`Info::infohash` will discard fields not present in the `Info` struct,
and can thus produce an erronous infohash.
To try to prevent this function from being called in those
circumstances, rename it to `Info::infohash_lossy`, and add a comment
explaining why it is dangerous.
Embarassingly, `Info::infohash` was called in
`TorrentSummary::from_input`, and thus transitively by the torrent show
subcommand, where it is definitely not safe, since torrent show is
intended to be used with arbitrary torrents. This is now fixed.
There was also a build failure caused by a cache issue, so change the
cache keys to invalidate the caches.
type: fixed
Keybase and IRC chat never got any users, and since I never check them
and they get no traffic, it's probably best to remove them from the
readme.
type: documentation
- Add a `bench` feature that exposes a hasher benchmark.
- Make the hasher read up to the next piece end and hash everything it
reads, instead of hashing one byte at a time. This was a 4x
improvement on the benchmark. (Terrible code == easy wins!)
type: performance
Split imdl into a binary, `src/main.rs`, and a library, `src/lib.rs`.
This will enable benchmarking, fuzz testing, and anything that requires
making `imdl` functions accessible another crate.
type: reform
The `data` crate is intended to be used as the manifest serialization
and deserialization format.
This blog post describes the motivation and goals for this crate:
https://rodarmor.com/blog/data
type: added
- Combine test Metainfo values into a small number of globally available
values.
- Serialize update URLs as `URL` insted of `String`.
- Add additional `show` tests
type: reform
To make it clearer what is and isn't generated content, make gen place
all generated output in `target/gen`.
Also, try to make the readme clearer about the location of build
artifacts.
type: development
- Document the various ways files can be included and excluded from
torrents in the book.
- Make links to the book more prominent in the readme, by including them
in sections with obvious names.
type: documentation
- Rebase master branch without checking it out
- Don't check for no changes, since we're using `-d`, which will fail on
an unmerge branch.
- Make merge take an argument, so it can be used with something other
than the current branch.
type: development
I copied the gihub actions caching configuration from examples, and I'm
not sure it's optimal. In particular, it causes a cache miss whenever
any `Cargo.lock` changes. I suspect that it would be better to always
hit the cache, and let cargo figure out what it needs to rebuild.
type: development