Skip to content
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

Invalid TOML: missing field skip at line 1 column 1 #7

Closed
simonbcn opened this issue Mar 5, 2020 · 4 comments
Closed

Invalid TOML: missing field skip at line 1 column 1 #7

simonbcn opened this issue Mar 5, 2020 · 4 comments

Comments

@simonbcn
Copy link

simonbcn commented Mar 5, 2020

Arch Linux
Lolcate 0.5.0
$ cat .config/lolcate/default/config.toml

description = ""

# Directories to index.
dirs = [
"/"
# "~/first/dir",
# "/second/dir"
]

# Set to either "Dirs" or "Files" to skip directories or files
# skip = "Dirs"

# Set to true if you want skip symbolic links
ignore_symlinks = true

# Set to true if you want to ignore hidden files and directories
ignore_hidden = false
$ lolcate --update
Invalid TOML: missing field `skip` at line 1 column 1

It's solved when I uncomment skip line but if this parameter is mandatory it should be uncommented in the initial file.
On the other hand in the comment created in the initial file it indicates that the values for this parameter are "Set to either "Dirs" or "Files" to skip directories or files" but it does not say anything about the another possible value None.

@ngirard
Copy link
Owner

ngirard commented Mar 5, 2020

Hey @simonbcn, thanks for notifying me!

This was just solved by PR #6.

@ngirard ngirard closed this as completed Mar 5, 2020
@cryptoquick
Copy link

Hi, I'm actually still getting this error.

cargo install lolcate-rs

error: expected literal
  --> /Users/hunter/.cargo/registry/src/github.com-1ecc6299db9ec823/lolcate-rs-0.5.0/src/config.rs:31:23
   |
31 |     #[serde(default = Skip::None)]
   |                       ^^^^

error[E0277]: the trait bound `config::Config: serde::Deserialize<'_>` is not satisfied
   --> /Users/hunter/.cargo/registry/src/github.com-1ecc6299db9ec823/lolcate-rs-0.5.0/src/main.rs:103:40
    |
103 |     let config: config::Config = match read_toml_file(&toml_file, &mut buffer) {
    |                                        ^^^^^^^^^^^^^^ the trait `serde::Deserialize<'_>` is not implemented for `config::Config`
    | 
   ::: /Users/hunter/.cargo/registry/src/github.com-1ecc6299db9ec823/lolcate-rs-0.5.0/src/config.rs:46:8
    |
46  | pub fn read_toml_file<'a, 'de, P: ?Sized, T>(path: &'a P, buffer: &'de mut String) -> Result<T, Error>
    |        --------------
...
49  |     T: Deserialize<'de>,
    |        ---------------- required by this bound in `config::read_toml_file`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
error: failed to compile `lolcate-rs v0.5.0`, intermediate artifacts can be found at `/var/folders/gm/vkllhjvd6k32gr2xhyq_92r40000gn/T/cargo-installWNk1IN`

Caused by:
  could not compile `lolcate-rs`.

@ngirard
Copy link
Owner

ngirard commented May 16, 2020

Hey @cryptoquick,

the source code on crates.io is outdated ; the error you mentioned has been fixed since.
I'd suggest using the pre-build binaries from the latest pre-release.
Meanwhile, I'm in the process of releasing version 0.6.0, whose source code will be published to crates.io. I'll do it soon.

Cheers

@cryptoquick
Copy link

Yeah, I eventually built it with git and it worked fine.

Honestly, it wasn't quite what I expected, but I suppose I'd never used command-line databases before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants