-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
chore: added Pallas compatible comments #106
Conversation
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.
This is actually very helpful, thanks for taking the time to create this
but I find the format of the comments to be a bit weird, the comments shouldn't include the function name, and also should be written in the present tense
as an example for the ChangeWorkingDirectory
function:
// Add a WORKDIR instruction to the containerfile
Great to hear its helpful. Well, i get your point. For example the comment for Perhaps this is generally not the format style you'd prefer. |
Yeah I'm not a fan of the current commenting style, but until we have a set standard i'd keep the format i mentioned for vib |
All right I am going to enhance the comments. |
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.
Already good, but one thing is that the return of a function should be seperarated
instead of "builds xyz and returns abc", it should be
builds xyz
returns: abc
Small note: Pallas does not care about how you define returns and parameters, it will threat both as a description and always parse both from the AST instead. |
Yeah I know, but it's easier to read from the description that way, since it makes it easier to spot |
This is what I also thought. @mirkobrombin would it be possible to exclude everything from the comment starting with string “return:” from the description in Pallas? It then could fit the needs for reading in the code and in the dev documentation. |
It is possible, not sure if it is worth it, not sure if we should be opinionated in that side |
It also came to my mind it might be difficult to track whether all returns of the function are recorded correctly in the comment. I'd prefer to use the current auto generation of the functions returns and do not specifically create a section in the comment (=description). In some comments i could describe the returns though, in case they are important. |
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.
solved by ddd1e3a
It is, pallas only tells the users the type of the return, not what it returns, which is very important to have |
I don't see how it would be difficult, its not the exact value it returns, but what the return value means, if it's difficult to properly track what the function returns then the function needs to be reworked |
In that case a proper mapping would be better instead of just removing Returns from the comment
Didn't see this 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.
Some small nitpicks that i came across while going through the changes, starting to look pretty nice though
@tobehn any update on this? is it ready to merge? |
From my point of view the comments are done. |
Alright, could you squash your commits into one so that I can merge it? |
chore: improvement of Pallas compatible comments to core chore: fixing line breaks chore: improving comments based on review chore: commented each and every function and struct in the project fix typo revert deletion of //export comments added a few Returns: statements fixes agreed on in review process missing file in last commit
oh gosh, it looks to me like i messed it up. |
Yep, everything's great and how it's supposed to be. |
I do not know if this is relevant to you.
When i saw Pallas i went through the system to see how it generates the HTML sites.
I realized it needs the comments in order to provide the small description for each function and struct.
Then i started going through Vib and added the descriptions in core everywhere it was missing.
If this is accepted i would go on with adding descriptions.
Let me know if this is wasted time.
Cheers.