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

Add jssets #59

Merged
merged 16 commits into from
Jan 2, 2021
Merged

Add jssets #59

merged 16 commits into from
Jan 2, 2021

Conversation

@juancarlospaco juancarlospaco marked this pull request as draft December 26, 2020 11:21
@juancarlospaco juancarlospaco marked this pull request as ready for review December 26, 2020 19:24
func getFloat*(this: JsSet): seq[float] {.importjs: """
(() => {const x = []; #.forEach(a => x.push(parseFloat(a))); return x})()""".}
## Convert `JsSet` to `seq[float]`, all items will be converted to `float`.
func toString*(this: JsSet): seq[cstring] {.importjs: """
Copy link
Member

@timotheecour timotheecour Dec 26, 2020

Choose a reason for hiding this comment

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

making toString return a seq[cstring] is too surprising. Either remove this or implement $(this: JsSet): string (string intended, not cstring), that would behave similar to stdlib

Copy link
Member

Choose a reason for hiding this comment

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

@juancarlospaco this was marked as resolved but the problem is still there.

Same remark as @Araq's comment here nim-lang/Nim#16409 (comment) except this is worse because it returns a seq[cstring]

@juancarlospaco juancarlospaco marked this pull request as draft December 26, 2020 20:35
@juancarlospaco juancarlospaco marked this pull request as ready for review December 27, 2020 06:27
@timotheecour
Copy link
Member

@juancarlospaco you're re-requesting a review but #59 (comment) is still un-addressed

nim doc -b:js --doccmd:-d:fusionJsSetTests src/fusion/js/jssets.nim

still fails, and my review comment says how you can easily fix it

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; we really need to start running CI and nim doc for js in fusion otherwise all those tests are left un-tested

please ask for another LGTM so we can merge this

changelog.md Outdated Show resolved Hide resolved
src/fusion/js/jssets.nim Outdated Show resolved Hide resolved
src/fusion/js/jssets.nim Outdated Show resolved Hide resolved
@juancarlospaco
Copy link
Contributor Author

@timotheecour Ping. Also #55 (review)

@timotheecour timotheecour merged commit 9d70bea into nim-lang:master Jan 2, 2021
@juancarlospaco juancarlospaco deleted the jsjset branch January 2, 2021 20:43
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