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

macro refactor #66

Merged
merged 8 commits into from
Sep 27, 2024
Merged

Conversation

tukanoidd
Copy link
Contributor

Hey, here's the refactor I promised. :)

It adds support for generics and also now allows you to provide any kinds of attributes separated by "|" inside of a literal string (I tried different approaches but could only make this one work without needing too much boilerplate) (can check in README).

Let me know what you think and if I need to change anything

@tukanoidd
Copy link
Contributor Author

Also, I just realized that bc I'm using my work laptop, my work account was pushing the changes, sorry for the confusion if there was any regarding that 😅

@tukanoidd
Copy link
Contributor Author

oh, weird, a buid failure, ill be afk for a bit, and will check after, but thats weird, since it builds fine on my machine

@tukanoidd
Copy link
Contributor Author

Oh, stable/nightly thing

@@ -38,7 +38,7 @@ enum WindowDirection {
Bottom,
}

#[to_layer_message(derives = "Debug Clone")]
#[to_layer_message(attrs = "derive(Debug, Clone)")]
Copy link
Collaborator

@Decodetalkers Decodetalkers Sep 27, 2024

Choose a reason for hiding this comment

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

I want this be

#[derive(Debug, Cone)]
#[to_layer_messages...]

like this kind.. Can this be achieved?

@Decodetalkers
Copy link
Collaborator

Ok , I made some adjustments

@Decodetalkers Decodetalkers merged commit 7545129 into waycrate:master Sep 27, 2024
3 checks passed
@Decodetalkers
Copy link
Collaborator

Ok, now I think it is fine

@tukanoidd
Copy link
Contributor Author

Hmm, I guess it's fair, for some reason I completely forgot the fact I could just take the attrs from DeriveInput (mb bc I was so hung up on the fact that it was panicing if I tried adding attrs to MessageEnum 😅 )

@tukanoidd tukanoidd deleted the refactor_layershell_macro branch September 27, 2024 08:44
@Decodetalkers
Copy link
Collaborator

Do you mind adding similar macro to iced-sessionlock?

@tukanoidd
Copy link
Contributor Author

I personally havent used iced-sessionlock so I'm going to be not familiar with the API but I could take a look after work (in about 6-7 hrs) :)

@Shinyzenith
Copy link
Member

Hey @tukanoidd thank you so much for your high quality contributions. As you seem to be using @Decodetalkers library in your projects, would be nice to have your say on our changes.

May I invite you to our GitHub org?

@tukanoidd
Copy link
Contributor Author

tukanoidd commented Sep 29, 2024

Hey @tukanoidd, thank you so much for your high-quality contributions. As you seem to be using the @Decodetalkers library in your projects, it would be nice to have your say on our changes.

May I invite you to our GitHub org?

I mean, if you don't mind, sure, although I really don't know how much help I am going to be when it comes to actual logic implementation, as I'm still quite unskilled in this area.

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

Successfully merging this pull request may close these issues.

4 participants