-
Notifications
You must be signed in to change notification settings - Fork 138
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
Added warning for multiple root pages #1188
base: main
Are you sure you want to change the base?
Added warning for multiple root pages #1188
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 your 4th PR for the same issue and you haven't addressed the feedback from the 3rd PR. If you open a 5th PR I will immediately close it without reviewing.
When you need to make changes to a PR, do so by updating/editing the existing PR. Don't open a new one for each change. If you don't know how to update a PR, ask for help or do a web search for "github update pull request" and see if some of the search results tell you how.
I’ve been testing the code locally and it seems to be working fine. I have tested it with different scenarios and by creating multiple symbol graphs or by multiple pages, the code is working properly with the test cases. The warning message is showing up, but I can’t figure out why it’s not formatted correctly. I tried switching to a different branch and unchecking all the formatting settings, but the problem still persists. When I push the code again, I get the same error. I’m familiar with pushing changes to the same pull request, but when I look at the changes in the source control panel of Cursor, I only see the edited part of the code, with the line reformatted not visible there. I can only see changes I did, either addition or removal of code, which I did during the process. To address this issue, I attempted to resolve it by pushing the code with various branches, anticipating that this would resolve the problem. However, this approach did not yield any positive outcomes. Subsequently, I am trying to identify the root cause of the issue by exploring the Swift forums. I realize my mistake, and I sincerely apologize! The |
Hi @ayushshrivastv, thank you for your interest in contributing! As David pointed out above, it's preferred to keep the same PR to iterate on changes so that we can keep the feedback centralized. It seems like there is still feedback to address from the previous PRs, so let us know when your work is ready for review. For the formatting issues, you can use |
… the additional code with spaces.
It may sound silly, but when I review code changes from the Cursor GitHub source control panel graph, I see added warning code which I did. However, when I look at the GitHub files, I see a significant amount of whitespace. Despite everything appearing to work properly when I stage the changes, I encounter a lot of whitespace when I push the code to GitHub. Does the repository have a Swift formatter installed, as I don’t encounter this issue when pushing my code to other repositories? |
This repository doesn't have a formatter. My guess is that something in your local workflow is trimming whitespace lines in the entire file, not just the lines that you changed. You can either use |
Summary
Added Warning for Multiple Root Pages Issue #1170
This pull request introduces warnings to alert developers when their documentation contains multiple root pages, resolving issue #1170. These warnings aim to highlight common configuration errors when using the
docc convert
tool directly, improving the debugging experience for documentation authors.The implementation addresses three specific scenarios:
Multiple Symbol Graph Modules as Root Pages
Triggered when documentation includes more than one symbol graph module (e.g., multiple
.symbols.json
files).Mixed Root Types
Occurs when documentation combines symbol graph modules with manually defined technology roots.
Multiple Manual Technology Roots
Detected when documentation contains multiple pages marked with the
@TechnologyRoot
directive.How to Try It Out
Example: Multiple Symbol Graph Modules
To test the warning for multiple symbol graph modules, create a documentation catalog structured as follows:
Run the command:
Expected output:
Similar steps can be followed to test mixed root types or multiple manual technology roots by adjusting the catalog contents accordingly.
Benefits
docc convert
directly, outside of integrations that might pre-validate inputs.These warnings streamline the process of identifying and fixing configuration problems, making documentation authoring more intuitive.
Checklist
./bin/test
script and confirmed it succeeded.