Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Folder structure for packages and Java #277

Open
elharo opened this issue Sep 9, 2018 · 6 comments
Open

Folder structure for packages and Java #277

elharo opened this issue Sep 9, 2018 · 6 comments
Labels

Comments

@elharo
Copy link
Contributor

elharo commented Sep 9, 2018

Haven't tried to build yet, but I was struck that some of the java code for aa and LocalServer isn't organized along the usual package conventions, though the code itself does have package statements. E.g. in AaTool.java

@oferb
Copy link
Contributor

oferb commented Sep 9, 2018

Do you mean that,
com.google.startupos.tools.reviewer.aa.AaTool
is in folder tools/reviewer/aa instead of java/com/google/startupos/tools/reviewer/aa and tests in javatests/com/google/startupos/tools/reviewer/aa?

@elharo
Copy link
Contributor Author

elharo commented Sep 9, 2018

Yes, that's what I meant.

@oferb
Copy link
Contributor

oferb commented Sep 10, 2018

Right, so we've actually had some discussions on that, here:
#30
The idea is that Bazel is a multi-language built tool, so if a repo has multiple projects, and say some project has java, scala, c++, python and proto (quite conceivable), it's confusing to have each in a separate root folder, i.e:
java/com/google/startupos/tools/reviewer/aa
javatests/com/google/startupos/tools/reviewer/aa
and then similarly,
<language>/com/google/startupos/tools/reviewer/aa
<language>tests/com/google/startupos/tools/reviewer/aa
for every language.

So the idea is that we organize folders based on projects, and keep project-related files together.

@oferb oferb added the P2 label Sep 11, 2018
@oferb
Copy link
Contributor

oferb commented Sep 14, 2018

How do we move forward with this issue?

@elharo
Copy link
Contributor Author

elharo commented Sep 14, 2018

My personal opinion:

It is not confusing to put separate language files in separate roots. In fact, it's the opposite. It helps keep things organized and makes it easier to find the code. google3 and most multi-language github projects I've seen do this.

That said, I don't know enough about bazel to have a strong, informed opinion here. But I do think most Java developers will find the existing layout confusing.

@elharo
Copy link
Contributor Author

elharo commented Sep 14, 2018

I'm not sure what you mean by a root here. google3 certainly does separate java, C++, etc. into separate directory structures and google3/java follows java conventions on package organization. In this case google/startup-os is the equivalent of google3.

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

No branches or pull requests

2 participants