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

Extension methods are not included in completion proposals #30

Open
ramon-rocha opened this issue Mar 29, 2013 · 4 comments
Open

Extension methods are not included in completion proposals #30

ramon-rocha opened this issue Mar 29, 2013 · 4 comments
Labels

Comments

@ramon-rocha
Copy link
Owner

We want all appropriate extension methods to be displayed as dot completion proposals including things like .toTechString included for all objects and .md5HashInHex included for Strings.

@ramon-rocha
Copy link
Owner Author

I think what's happening is that the call to .allMembers on a Box node is not including extension methods because another Compiler instance is being created in between the time the completion list is generated and the next parse request starts.

http://cobra-language.com/trac/cobra/browser/cobra/trunk/Source/Boxes.cobra#L119

I'm not sure yet but the first line of _allExtensionMembers is if .compiler and .compiler.nameSpaceStack.count

I need to stick some trace statements in there and see what's going on.

@ghost ghost assigned ramon-rocha Jul 17, 2013
@ramon-rocha
Copy link
Owner Author

Looks like .compiler.nameSpaceStack is always empty. Hmm...

ramon-rocha added a commit that referenced this issue Jul 25, 2013
Some cleanup work remains but otherwise this appears to be working.
@ramon-rocha
Copy link
Owner Author

Pretty much done and ready to merge into 'master' with the next release. Some issues which cannot be resolved with a non-thread safe compiler remain but it seems to work most of the time.

@ghost ghost assigned ramon-rocha Aug 7, 2013
@ramon-rocha
Copy link
Owner Author

Decided to remove this functionality after more testing revealed that race conditions frequently prevented these from working correctly. This will be addressed in the future with a new Cobra parser and type resolver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant