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

Do not fail on non-"meta" attributes #47

Merged
merged 2 commits into from
Jan 20, 2020
Merged

Do not fail on non-"meta" attributes #47

merged 2 commits into from
Jan 20, 2020

Conversation

CreepySkeleton
Copy link
Contributor

Attributes are no longer ought to be in the "meta" form.

For example, this is absolutely valid code:

use getset::CopyGetters;
use clap::{Clap, crate_version};

#[derive(Clap, CopyGetters)]
#[clap(version(crate_version!()))]
pub struct Config {}

but your crate fails to parse this with

error: proc-macro derive panicked
 --> src\main.rs:6:16
  |
6 | #[derive(Clap, CopyGetters)]
  |                ^^^^^^^^^^^
  |
  = help: message: attribute: Error("expected `,`")

error: aborting due to previous error

This PR resolves the issue.

Copy link

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

LGTM

@Hoverbear Hoverbear merged commit 2d26f1e into jbaublitz:master Jan 20, 2020
@Hoverbear
Copy link
Collaborator

Thanks! Looks great. :)

@Hoverbear Hoverbear added this to the 0.1.0 milestone Jan 20, 2020
@Hoverbear
Copy link
Collaborator

Hi! I'm reverting this and #48 since they were merged without having run on CI. I still want to merge thisi PR so please just reopen it and once it passes CI I'm happy to merge it!

@CreepySkeleton
Copy link
Contributor Author

CreepySkeleton commented Jan 20, 2020

Wouldn't it be easier to just merge #49 ?

@CreepySkeleton
Copy link
Contributor Author

I contains a fix.

@Hoverbear
Copy link
Collaborator

Right, but master is supposed to build green, and I can't merge the CI fix in #52 unless the tests are passing, and #47/#48 broke the tests. So they need to be reverted, the CI fix needs to be merged, then they can be merged when they pass the tests.

@Hoverbear Hoverbear removed this from the 0.1.0 milestone Jan 20, 2020
@Hoverbear Hoverbear mentioned this pull request Jan 20, 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.

3 participants