I am working on an open-source library that contains several source files. I would like to ask for feedback, not only for specific code in specific files, but also on the more general arrangement of the library and the dependencies between modules. I saw that most questions on the site ask about code that is contained in a single source file. Can I ask for feedback on the library, even though it contains several files?
Lets break down your question into separate and more digestible parts.
- Are reviews of libraries allowed? yes
- Are large questions allowed? ("an entire library", "contains several files") only if your question fits within the 65535 character limit.
- Is asking for feedback on specific code allowed? yes
- Is reviewing design on-topic? Yes, if you provide code.
- Is project structure (file system) on-topic? Yes, if you provide code. An fs tree is not code.
So a conclusion is; "yes, if you include the code in your question."
However the above questions aren't really the same as the OP's question. As I've been very literal. Like when you ask the question "can you pass the salt?" All I've done is say "yes, I posses the capacity to pick up and pass the salt to someone." Yeah, not very helpful.
The thing is, I've focused on if your question is on-topic. Completely blinding you from other rules which can leave you with a sub-par experience. Whilst you can ask for specific feedback reviewers can comment on anything. This has been documented on Code Review Meta a number of times:
I believe telling about things people don't ask for is a huge part of a good code review. Of course, it should be both polite and helpful.
Do we want to tell people about things they don't ask for or is that considered impolite / frowned upon / bad behavior?
If you tell someone something they don't already know, then you helped increase their knowledge in something. That can't hurt, right? Plus...isn't that the idea of Code Review? To help people improve their code? Why would it matter if you address something they didn't ask about; especially if it improves their code.
Yes. It is fine to ask reviewers to preferably avoid commenting on something.
Of course the reviewers can comment about it anyway, and then it will be up to the community - and the original poster - to determine if the review is helpful or not.
One of our Help Center rules, and indeed, one of our core values, is
Do I want the code to be good code?
To that end, any answer that makes the code "better" is fair game. It's just that this OP has declared some preconceived ideas of what is "better", so you would have to work extra hard to convince them to abandon the self-imposed constraints.
Yes, it is implied with every Code Review question that "any and all aspects of the question can be reviewed". From the help center:
- Do I want feedback about any or all facets of the code?
As a consequence, any answer that addresses any aspect of the code, whether the user asked for that aspect, or not, is acceptable as an answer.
rolfl, CC BY-SA 3.0, Is it okay to give a review without actually answering some of the OP's requests?
If we ignore the specifics of each point we can summarize the rule as "but we may not provide the review you want." Lets focus on why this may happen; Mathieu Guindon's Zombie Ratings. The library you've described sounds like "The
Project Review Project" with a zombie rating of 3. Meaning your question is likely to go unanswered.
Now lets pretend you have a file called
garbage.py, filled to the brim with working code which can only be described as garbage. There's enough wrong we could write a short book on the issues in the one file. Pointing out the low hanging fruit in
garbage.py will be easier than tackling the project as a whole, dropping your zombie rating from 3 to 1. You're more likely to get an answer, but even less so about the general arrangement or module dependencies.
When asking for design reviews you need to be careful. Whilst design reviews are on-topic, sharing too much unrelated code increases the zombie rating of your code. And if the quality of the somewhat unrelated code is poor then you're less likely to get the review you want. So, whilst you can just dump all the code, you should take the time to take only the important parts of your code and try to make the code as clean as you can.
I have posted 25 questions on Code Review, 24 have been answered. 23 of the questions are non trivial (multi file questions). You will get an answer in time, it may not be as fast as you want. As a suggestion ask multiple questions, one about each source file with necessary header files if that applies. Provide a link to the repository in each question. As far as interfile dependencies go, the last question you ask should be about the file that ties most of the library together, ask your dependency question there.