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

clean up the docs of some modules under lib/js #16579

Merged
merged 2 commits into from
Jan 4, 2021
Merged

Conversation

ringabout
Copy link
Member

@ringabout ringabout commented Jan 4, 2021


when not defined(js) and not defined(nimdoc) and not defined(nimsuggest):
Copy link
Member Author

Choose a reason for hiding this comment

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

timotheecour
timotheecour previously approved these changes Jan 4, 2021
Copy link
Member

@timotheecour timotheecour left a comment

Choose a reason for hiding this comment

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

LGTM; in future work

when not defined(js):
  {.error: "This module only works on the JavaScript platform".}

would need to use fatal instead, see rationale here: timotheecour#64 (comment)

EDIT: some tests fail that are related to this PR ...

@timotheecour
Copy link
Member

not correct now

proposed fix: simply remove lib/js/jscore.nim from withoutIndex in kochdocs.nim
=> this will then correctly run docs for lib/js/jscore.nim

(another fix would've been this:

   for d in items(withoutIndex):
-    commands[i] = nim & " doc $# --git.url:$# -o:$# $#" %
-      [nimArgs, gitUrl,
+    let extra = if isJsOnly(d): "--backend:js" else: ""
+    commands[i] = nim & " doc $# $# --git.url:$# -o:$# $#" %
+      [extra, nimArgs, gitUrl,
       destPath / changeFileExt(splitFile(d).name, "html"), d]
     i.inc

but the 1st proposed fix is better/simpler)

@ringabout
Copy link
Member Author

I see, thanks, you are always very helpful!(I was testing it too)

Copy link
Member

@timotheecour timotheecour left a comment

Choose a reason for hiding this comment

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

LGTM again (if passes CI)

@Araq Araq merged commit fe20492 into nim-lang:devel Jan 4, 2021
@timotheecour timotheecour mentioned this pull request Jan 4, 2021
1 task
mildred pushed a commit to mildred/Nim that referenced this pull request Jan 11, 2021
ardek66 pushed a commit to ardek66/Nim that referenced this pull request Mar 26, 2021
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.

3 participants