-
Notifications
You must be signed in to change notification settings - Fork 38
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
Intellisense seems to be broken (see magic function for DHIS2) #2641
Comments
When you say "it doesn't load", do you mean you don't see the suggestions list at all, like you don't see a UI component; or do you mean there's an empty list? With No Suggestions or just with irrelevant stuff? I've just done a quick check on app and I get "dumb" code assist, with no metadata. I think that's a problem with my credential though because I have no metadata at all... |
The metadata loads into the metadata panel, but code completion using metadata (press |
I'll take a close look on Monday |
Confirmed - intellisense was working in |
Here is the PR that introduced the issue #2433 |
He said, heroically. |
So, what's going on here is this. In the old world, we loaded all the type definitions associated with an adaptor and squashed them into a s single global type definition. This sort of worked, although it flattened namespaces like So we put out a fix which loaded each file within the adaptor into a module. This worked better - we had namespaces now. But it's still too keen to expose common functions. And it turns out that if an adaptor declares some global types in a types.d.ts, those types don't get loaded. Basically the when the typescript engine loads adaptor.d.ts, it doesn't see the types that it cross-references. In DHIS2, we declare a global type called Dhis2Data in types.d.ts and refer to it in adaptor.d.ts. But the inner workings of Monaco - which doesn't properly module a filesystem or project - mean that those type references aren't ever found. I think I have a fix and a PR will come up shortly. Basically we a) load each file as its own module ie This seems to work. At what cost, I am not entirely sure... |
Metadata is still broken :( |
When using the DHIS2 adaptor with the credentials well configured and metadata loaded, the IntelliSense did not load. Even when you try to manually trigger it by entering ctrl/cmd + space, it doesn't load.
The text was updated successfully, but these errors were encountered: