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

Establish Distinction between public and private headers #239

Open
JoshuaSBrown opened this issue Jul 24, 2020 · 5 comments
Open

Establish Distinction between public and private headers #239

JoshuaSBrown opened this issue Jul 24, 2020 · 5 comments
Labels
discussion help wanted Extra attention is needed question Further information is requested

Comments

@JoshuaSBrown
Copy link
Collaborator

JoshuaSBrown commented Jul 24, 2020

A clear distinction in missing between what in parthenon should be publicly exposed. This makes it easy to break down stream code that depends on parthenon as a library as internal changes are likely to break down stream packages.

It would be nice to list the classes and functions that external programs need access to so as to hide internals and thus make parthenon more robust as a dependency.

@Yurlungur
Copy link
Collaborator

This is clearly important and something we need to eventually clarify and stick to. Thanks for bringing it up.

That said, I'm not sure we're ready to solidify this... It's true that we're beginning to build things downstream with parthenon, but we haven't written enough, I think, to know what should and should not be public. And also parthenon itself is still changing pretty rapidly. I think trying to keep up an API while parthenon is still in flux will be a challenge.

@AndrewGaspar
Copy link
Contributor

I agree with @JoshuaSBrown. My concern with waiting is that it ossifies the exported APIs.

@AndrewGaspar
Copy link
Contributor

My proposal for this is:

  • Create separate include and internal directories for public and private headers, respectively.
  • Move every currently existing header file to include.
  • Going forward, names should be deliberately placed in either the include or internal directory
  • For names that must be published but are ultimately implementation details, they should go into the parthenon::internal namespace

@Yurlungur
Copy link
Collaborator

That seems reasonable to me. As discussed with @nmsriram yesterday, I also think we should try to deliberately make better use of forward declarations if we can, to reduce the amount of private headers that end up "published" via a tree of includes.

@JoshuaSBrown
Copy link
Collaborator Author

Well, I will start this process by moving all headers to a public includes folder. Will probably wait until after this has been merged though. #238

@JoshuaSBrown JoshuaSBrown self-assigned this Aug 5, 2020
@JoshuaSBrown JoshuaSBrown linked a pull request Aug 26, 2020 that will close this issue
5 tasks
@Yurlungur Yurlungur added help wanted Extra attention is needed question Further information is requested discussion labels Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants