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

TOML config #571

Merged
merged 15 commits into from
Oct 16, 2020
Merged

TOML config #571

merged 15 commits into from
Oct 16, 2020

Conversation

0jdxt
Copy link
Contributor

@0jdxt 0jdxt commented Apr 16, 2020

I had a problem with '#' being in my password and i saw it was an issue with serde_ini and in this milestone so did this. i think it works

@0jdxt 0jdxt closed this Apr 16, 2020
@0jdxt 0jdxt reopened this Apr 16, 2020
@0jdxt 0jdxt closed this Apr 16, 2020
@0jdxt 0jdxt reopened this Apr 16, 2020
@0jdxt
Copy link
Contributor Author

0jdxt commented Apr 16, 2020

sorry I used the github app and the 'close' button hella confused me

@mainrs mainrs self-assigned this Apr 20, 2020
@mainrs
Copy link
Member

mainrs commented Apr 20, 2020

I'll merge this into a WIP branch for the major release this week! Not sure if serde_repr does change stuff internally. It seems like it has the same effect as renaming (as was done before).

@0jdxt
Copy link
Contributor Author

0jdxt commented Apr 20, 2020

I'll merge this into a WIP branch for the major release this week! Not sure if serde_repr does change stuff internally. It seems like it has the same effect as renaming (as was done befo( re).

yay! I used serde_repr so both structopt and toml take an integer, otherwise toml would expect a string. But maybe theres another way, for me changing the renames to repr worked.

src/config.rs Show resolved Hide resolved
Copy link
Contributor

@Plecra Plecra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it 😀 Are there working configs that will work differently after this PR?

Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
src/config.rs Show resolved Hide resolved
@0jdxt
Copy link
Contributor Author

0jdxt commented Sep 27, 2020

I like it Are there working configs that will work differently after this PR?

I would imagine not since ini is a subset of toml but any value not a number or boolean now must be in quotes whereas it doesn't matter for ini.

edit: I realise my massive contradiction lmao

Copy link
Contributor

@robinvd robinvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0jdxt the readme now has this line

username = username

should that then become

username = "username"

@0jdxt 0jdxt changed the title Toml config TOML config Sep 29, 2020
robinvd
robinvd previously approved these changes Sep 29, 2020
Copy link
Contributor

@robinvd robinvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! So just for clarity, this will be a breaking change.

@0jdxt
Copy link
Contributor Author

0jdxt commented Sep 29, 2020

indeed
its part of the milestones for v1.0
just realised you guys are the new maintainers. Its good to see the project can progress now, I'll be contributing as much as I can after this PR

this will help users who may not have used TOML before - link will need to be updated when the toml crate updates to support TOML v1.0
@robinvd robinvd requested a review from Plecra October 4, 2020 10:48
Copy link
Contributor

@Plecra Plecra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! This is a great first step for better UX

@@ -169,27 +169,27 @@ spotifyd --help

### Configuration file

`Spotifyd` is able to load configuration values from a file too. The file has to be named `spotifyd.conf` and reside in the user's configuration directory (`~/.config/spotifyd`) or the system configuration directory (`/etc` or `/etc/xdg/spotifyd`). This also applies to macOS!
`Spotifyd` is able to load configuration values from a [TOML](https://toml.io/en/v0.5.0) file too. The file has to be named `spotifyd.conf` and reside in the user's configuration directory (`~/.config/spotifyd`) or the system configuration directory (`/etc` or `/etc/xdg/spotifyd`). This also applies to macOS!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we've made breaking changes, I'd like to use the ``.toml` extension. That doesn't need to be part of this PR though

@Plecra Plecra merged commit 133a119 into Spotifyd:master Oct 16, 2020
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

Successfully merging this pull request may close these issues.

6 participants