Add option to force build before extracting doc #8119
Draft
+77
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #8040
The
rescript-tools docextracts the docs fromcmtfiles.cmtfiles require the source code to be rebuilt to refresh them. This adds an option to run the build before extracting the doc so thecmtfiles are always up to date.@nojaf @cknitt I'm not sure if this something we want, but I feel this is helpful (or less misleading to the users). Users would expect running the tools will always work without rebuilding.
Another thing to consider is the change in the output when the flag is provided.
If the downstream expects a proper JSON, this will break any downstream CLI tools that depends on this.
Marked this as draft as this needs a bit more polishing.