Add option to force build before extracting doc#8119
Add option to force build before extracting doc#8119shulhi wants to merge 2 commits intorescript-lang:masterfrom
Conversation
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
This is quite unusable. I'm also not convinced we should fix this in a patched up way. |
I would agree on that, but the tools read from |
|
Actually, I take that back, cmt does change for me when I add doc comment. Are we 100% sure this is not a user issue? |
Let me rephrase this better. It changed because you have Unless this is the intended design, we still want to provide a solution because it can be confusing. Either through documentation or fixing how |
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.