-
-
Notifications
You must be signed in to change notification settings - Fork 39
Add pub prefix to args to make the method and the returned struct #362
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
base: main
Are you sure you want to change the base?
Conversation
taiki-e
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This looks good to me.
Could you also add tests/expand test case for pub project_replace = ...?
|
I edited as you asked (test cases, better error message / fixed expectation and unreachable) I had different output than the CI on some stderr, but it seem in the end there is no change from previously in the repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
I noticed you also mentioned about documentation in #361. For now, I think it's okay to use allow(missing_docs) (or simple docs), but could you add test cases to tests/include/basic-safe-part.rs to see if it works?
|
I added some simple doc for the structs and methods (feel free to correct/modify them(you should have edit rigths) and/or tell me what to change if they are unclear/incomplete/have grammar errors ...) for the fields, I copy the referenced field doc without any change. also, the For now i simply added a #[non-exhaustive] to the generated struct / enum, which seem a bit hacky to me but quite reasonable as we may want to add some fields of our own (like some PhantomData maybe), and solve the immediate problem of passing the CI As long as the user is reasonable, as in, do not use some name that need A more clean solution could be to copy some attribute and/or add a syntax to add attributes to the generated structs (which could be used for other purposes like derive(Debug) and similar ). What do you think about it ? (I could do that in a following PR if you want) |
|
PS: Sorry for the numerous commit if that make less readable for you ... I was not as exhaustive in my pre-push tests than your amazing CI which made me correct my code over and over. |
Behavior on existing syntax is kept as is.
The new syntax look like this:
pub prefix can also be used on project_ref and (named) project_replace
fix #361