BurntSushi / ucd-generate

A command line tool to generate Unicode tables as source code.
Apache License 2.0
95 stars 21 forks source link

Missing file emoji-data.txt #9

Closed mattias-p closed 5 years ago

mattias-p commented 5 years ago

I ran into this following the instructions in the Example section on the crates.io page:

$ ucd-generate property-bool /tmp/ucd-10.0.0 --include Hyphen,Dash,Quotation_Mark --chars
No such file or directory (os error 2)

I had to dig into the code to figure out what was going on. The missing file is emoji-data.txt.

I reproduced this behavior with both version 0.2.1 (cargo install) and current master (b56d7f3f0c4e9a2a8c50023baa290a494191a0d5).

I would have expected:

  1. The instruction on crates.io to not run into file-not-found errors. Maybe a first example that doesn't require emoji-data.txt?
  2. A more discoverable instruction for downloading emoji-data.txt. Maybe an adapted version of the note in emoji_properties.rs in the Example section, along with some hints for when it's needed and which version to pick?
  3. Path-related error messages to spell out the troublesome path. Maybe relative to <ucd-dir>?

If you like I could make a PR to spell out the relevant path in error messages?