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

GH-644: documenter clean #680

Closed
wants to merge 5 commits into from

Conversation

tobHai
Copy link
Contributor

@tobHai tobHai commented Jun 22, 2024

writeDocumentation cleans the output directory before writing any documentation files per default.

I think for the other public writeXYZ method, clearing the directory does not make any sense since writeModulesAsPlantUml, writeIndividualModulesAsPlantUml and writeModuleCanvases are called from writeDocumentation - additional cleans in those methods would delete previously created files.

@odrotbohm your feedback would be appreciated! :)
Thanks!

Copy link
Member

@odrotbohm odrotbohm left a comment

Choose a reason for hiding this comment

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

This looks pretty decent to me already. A couple of general comments:

  • Would you mind adding Javadoc to the public methods of the newly introduced Options type?
  • Switch to var for the variables created in test cases for consistency

Regarding the “wipe once approach”: IIRC, we discussed this with Cora at some point. I don't remember the exact details anymore but wonder whether we can keep a variable within the Documenter instance whether an initial wiping has occurred. As the write… methods all return this we could flip the flag for the first method invoked. clearOutputFolder() looks like a good place to implement such logic. I guess we'd need to document this behavior clearly in Options.defaults()'s Javadoc.

@tobHai
Copy link
Contributor Author

tobHai commented Jul 2, 2024

Thanks for the feedback! Sure, no problem - I will add Javadoc and make use of var.
I will investigate into the "wipe once approach" - I hope I find some time soon 😄

@odrotbohm
Copy link
Member

Do you have a rough estimate when you would get to this? I'd love to get the changes into the release next Friday. I am happy to take it from here but don't want to break your flow if you're still considering it.

@tobHai
Copy link
Contributor Author

tobHai commented Jul 14, 2024

Hi!
I tackled the points regarding the documentation and the use of var.
Unfortunately, I do not have time before Friday to work on the "wipe once approach" - it would be great if you could take it from here.

Thanks!

@odrotbohm
Copy link
Member

No worries at all! Thanks for the contribution so far!

@odrotbohm
Copy link
Member

That's polished and merged against GH-644, thanks!

@odrotbohm odrotbohm closed this Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to let Documenter clear target folder before rendering documentation
2 participants