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

CFMLCompletionItemProvidor Error #27

Closed
maverck opened this issue Jan 14, 2019 · 8 comments
Closed

CFMLCompletionItemProvidor Error #27

maverck opened this issue Jan 14, 2019 · 8 comments
Labels

Comments

@maverck
Copy link

maverck commented Jan 14, 2019

[2019-01-14 21:56:04.125] [exthost] [error] TypeError: Cannot read property 'uri' of undefined
at CFMLCompletionItemProvider.provideCompletionItems (/home/maverck/.vscode/extensions/kamasamak.vscode-cfml-0.5.0/out/features/completionItemProvider.js:284:159)
at /usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:561:127
at t.asThenable (/usr/share/code/resources/app/out/vs/workbench/node/extensionHostProcess.js:141:941)

occurs when i try add a dot after a variable containing a component
doesn't provide function/variable completion suggestions.

@maverck
Copy link
Author

maverck commented Jan 14, 2019

Seems related to my current project since another works fine.
I am not sure what is the cause however.

@maverck
Copy link
Author

maverck commented Jan 15, 2019

I narrowed the problem down to interfaces.
I had a few interfaces that defined some functions.

The simplest one is this

interface name="IJsonConverter" {

string function getJsonString();
void function loadJson(required array json);
void function loadJsonString(required string jsonString);

}

If i remove the functions and just have it as an empty interface. i no longer get the error and completions work.
Removing the interface entirely also fixes the problem

@KamasamaK
Copy link
Owner

Thanks for providing more detail. Can you please be specific how the interface is causing the issue? What relation does the interface have with the file that is having the issue? Or is the issue with every file if the interface exists in the workspace?

@maverck
Copy link
Author

maverck commented Jan 15, 2019

It seemed to be the case where if i have an interface with functions defined in it the error occurs.
I got around it by removing the functions from both interfaces and leaving them empty.

I have to restart vscode each time to test things.

https://github.com/maverck/cfml-vscode-example
I setup an example that breaks for me everytime i add functions to the interface.
Everytime i remove them it works
I need to restart vscode each time.
It seems to break when it's caching components?

in the example i am not even using the interface at all. it's just there.

@KamasamaK
Copy link
Owner

Please see if v0.5.1 fixes your issue.

@msp1kpj
Copy link

msp1kpj commented Jan 18, 2019

I am still having the same issues on v0.5.1.
image

@KamasamaK
Copy link
Owner

@msp1kpj Would you be able to provide a sample file in which this error occurs? I could just make it not error there, but if I know why it is failing I could probably make a smarter fix.

@maverck
Copy link
Author

maverck commented Jan 19, 2019

Appears to be fixed for me. Thank you.

At first i didn't think it was fixed but then i noticed my workspace mappings were gone.
I assume i did this when i was testing and the extension couldn't have reset these.

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

3 participants