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

Commands don’t save meta information #545

Closed
hellerve opened this issue Sep 10, 2019 · 9 comments
Closed

Commands don’t save meta information #545

hellerve opened this issue Sep 10, 2019 · 9 comments

Comments

@hellerve
Copy link
Member

As discussed in #542, it seems as if commands do not save their meta information. The behavior exhibited seems similar to when documenting modules was impossible.

Cheers

@eriksvedang
Copy link
Collaborator

This works now? @hellerve

@hellerve
Copy link
Member Author

It doesn’t seem to:

> (info Dynamic.String.concat)
concat : Dynamic
Defined at line 0, column 0 in 'dummy-file'
> (doc Dynamic.String.concat "concats a string dynamically")
> (info Dynamic.String.concat)
concat : Dynamic
Defined at line 0, column 0 in 'dummy-file'

@eriksvedang
Copy link
Collaborator

Huh, it works for me on bit-width:

:i bit-width 
bit-width : Dynamic Defined at line 0, column 0 in 'dummy-file'
鲤 (doc bit-width "stuff")
鲤 :i bit-width
bit-width : a
Defined at line 0, column 0 in 'dummy-file'
Documentation: stuff

So maybe it's something with commands inside modules.

@hellerve
Copy link
Member Author

hellerve commented May 3, 2020

Maybe, but also the type changed in your example (from Dynamic toa), which leads me to believe that that’s a doc stub we’re seeing.

@hellerve
Copy link
Member Author

hellerve commented May 3, 2020

But it does look like this works as of current master, insofar as docstubs are created correctly.

@eriksvedang
Copy link
Collaborator

Oh, right... totally missed that! Needs more investigation then, hopefully it's not that hard to fix since it works for other kinds of definitions.

eriksvedang added a commit that referenced this issue May 5, 2020
@eriksvedang
Copy link
Collaborator

I think this should be fixed in master now..!

@eriksvedang
Copy link
Collaborator

For posterity, the bug was caused by two things:

  1. The commands that were added to the starting env had their Path XObj:s set to SymPath [] name, they are now qualified like this SymPath ["Dynamic"] name
  2. When looking up symbols in primitiveMetaSet, we need to do an additional attempt where Dynamic is prepended to the path or else you won't find the symbol, in which case a stub will be created instead.

@hellerve
Copy link
Member Author

hellerve commented May 5, 2020

Oh, fun! Thanks for the explanation :)

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

No branches or pull requests

2 participants