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

[docs] Add Backend to directory structure #4503

Merged
merged 9 commits into from
Mar 12, 2024

Conversation

AdarshRawat1
Copy link
Member

@AdarshRawat1 AdarshRawat1 commented Mar 6, 2024

  • Add Backend to directory
  • Add Subdirectories of backends

@vlstill
Copy link
Contributor

vlstill commented Mar 6, 2024

Good catch this is incomplete.

  • Add Subdirectories of backends

How deep do you wish to go? The backends are very different and presumably it is quite rare for one person to actively work on many backends so having the documentation for each backend separately makes more sense to me.

@vlstill vlstill added the documentation Topics related to compiler documentation. label Mar 6, 2024
@AdarshRawat1
Copy link
Member Author

AdarshRawat1 commented Mar 6, 2024

Good catch this is incomplete.

Thank you😁

The backends are very different and presumably it is quite rare for one person to actively work on many backends so having the documentation for each backend separately makes more sense to me.

Sure, I was also thinking that, adding the subdirectories in "Compiler source code organization" would make it too cluttered.

How deep do you wish to go?

I initially thought it would be nice if I could cover all the subdirectories in "Compiler source code organization", but as you correctly pointed out that, it's more practical to have them covered in separate readme.
So, It would be better to list the subdirectories in README of the respective directories.

What are your thoughts on this?
May I include directory structure to each backend's Readme .

@AdarshRawat1 AdarshRawat1 marked this pull request as ready for review March 6, 2024 09:14
@AdarshRawat1 AdarshRawat1 changed the title [Draft] [docs] Add Backend to directory structure [docs] Add Backend to directory structure Mar 6, 2024
@fruffy
Copy link
Collaborator

fruffy commented Mar 7, 2024

So, It would be better to list the subdirectories in README of the respective directories.

Yes, that is the better approach. It will be difficult to maintain the tree for all possible back ends. The back ends are often maintained by independent teams.

Copy link
Collaborator

@fruffy fruffy left a comment

Choose a reason for hiding this comment

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

Thanks, some suggestions on rewording.

docs/README.md Outdated Show resolved Hide resolved
docs/README.md Outdated Show resolved Hide resolved
docs/README.md Outdated Show resolved Hide resolved
@AdarshRawat1
Copy link
Member Author

AdarshRawat1 commented Mar 7, 2024

Yes, that is the better approach. It will be difficult to maintain the tree for all possible back ends. The back ends are often maintained by independent teams.

Noted !!
I think with this approach we will also be able to cover all the files and their tasks in backend.

If this sounds right to you then,
I'll open a draft PR where the teams can suggest appropriate descriptions for files and when we're ready with the structure we'll merge it.

@AdarshRawat1
Copy link
Member Author

AdarshRawat1 commented Mar 7, 2024

Thanks, some suggestions on rewording.

Thanks for your suggestions .
I'll update the PR accordingly 🚀

AdarshRawat1 and others added 4 commits March 7, 2024 08:11
[docs] Update description of "common" directory in  "Compiler source code organization" Section

Co-authored-by: Fabian Ruffy <5960321+fruffy@users.noreply.github.com>
[docs] Update description of "dpdk" backend in  "Compiler source code organization" Section

Co-authored-by: Fabian Ruffy <5960321+fruffy@users.noreply.github.com>
Update description of "p4tools" , "tc" and "ubpf" directory in  "Compiler source code organization" Section

Co-authored-by: Fabian Ruffy <5960321+fruffy@users.noreply.github.com>
@AdarshRawat1
Copy link
Member Author

Updated the PR based on suggestions.🚀

@AdarshRawat1
Copy link
Member Author

So, It would be better to list the subdirectories in README of the respective directories.

Yes, that is the better approach. It will be difficult to maintain the tree for all possible back ends. The back ends are often maintained by independent teams.

Please have a look at the "Backend source code organization" Section , does this look appropriate to you.
https://github.com/AdarshRawat1/p4c/blob/Docs-3-Trial-File-structure/backends/bmv2/README.md

Copy link
Collaborator

@fruffy fruffy left a comment

Choose a reason for hiding this comment

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

Let's clean up some small things then we are good to go.

docs/README.md Outdated Show resolved Hide resolved
docs/README.md Outdated Show resolved Hide resolved
docs/README.md Outdated Show resolved Hide resolved
@AdarshRawat1
Copy link
Member Author

Implemented Suggestions, renamed front end's description also.
i.e. front-end -> front end . [ To avoid extra PR for minor changes ]

@AdarshRawat1 AdarshRawat1 requested a review from fruffy March 9, 2024 03:14
@AdarshRawat1
Copy link
Member Author

AdarshRawat1 commented Mar 9, 2024

So, It would be better to list the subdirectories in README of the respective directories.

Yes, that is the better approach. It will be difficult to maintain the tree for all possible back ends. The back ends are often maintained by independent teams.

Please have a look at the "Backend source code organization" Section , does this look appropriate to you. https://github.com/AdarshRawat1/p4c/blob/Docs-3-Trial-File-structure/backends/bmv2/README.md

Please guide me on how this looks to you. Do we add this or not?

@fruffy
Copy link
Collaborator

fruffy commented Mar 10, 2024

So, It would be better to list the subdirectories in README of the respective directories.

Yes, that is the better approach. It will be difficult to maintain the tree for all possible back ends. The back ends are often maintained by independent teams.

Please have a look at the "Backend source code organization" Section , does this look appropriate to you. https://github.com/AdarshRawat1/p4c/blob/Docs-3-Trial-File-structure/backends/bmv2/README.md

Please guide me on how this looks to you. Do we add this or not?

I would discuss this in a separate PR. However, we do not need to know about every single compilation unit or header file. The folders are meant to give a broad overview over the content.

@fruffy fruffy added this pull request to the merge queue Mar 10, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 10, 2024
@AdarshRawat1
Copy link
Member Author

I would discuss this in a separate PR. However, we do not need to know about every single compilation unit or header file. The folders are meant to give a broad overview over the content.

Noted !
I'll focus on the overview of directory structure rather than going to such depth of every unit's functionality😅.

@fruffy fruffy added this pull request to the merge queue Mar 12, 2024
Merged via the queue into p4lang:main with commit 2463725 Mar 12, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Topics related to compiler documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants