Open gavinking opened 9 years ago
I don't think I can do this before the deadline you set for a wednesday release. What's the specific reason you need this feature? I'd think that knowing there is an implementation (native or not) would be sufficient?
Ah wait you linked another issue.
I want to automatically add native
annotations on the import
statements. I already have a branch of the IDE which implements this, but I can't get the information I need from a module query.
But couldn't you , for now, use the fact that a query for JVM + JS only returns one or the other for native modules?
Well sure I guess in principle I could do it with two queries, but that would make something that is already too slow now twice as slow.
Well I mean that if somebody is putting in an import statement we have to retrieve the artifacts anyway, right? So the moment you retrieve them you can check which ones you got. That shouldn't involve any queries AFAICT.
No, because as-per the resolution to https://github.com/ceylon/ceylon-module-resolver/issues/128, it only sends me the artifacts I asked for. It doesn't tell me that the module also has other artifacts available.
But that's what I mean, you'd normally ask for both artifacts, right? Because I see two situations:
native("xxx")
so you only ask for artifact XXX and don't have to worry about putting native
on any importsTHat should be enough information, right?
(*) well, it also depends on which backends you have enabled in the IDE I guess.
But that's what I mean, you'd normally ask for both artifacts, right?
No, I don't, because I want to get a filtered list of modules. Instead I ask for only the modules that are compatible with at least one of the enabled backends.
@quintesse Note that I can have a native
import in a cross-platform module, and I might not have both backends enabled.
Reassigning to 1.3 because I think I can live without this for now.
Note that I can have a native import in a cross-platform module.
Yes, that was the second bullet point I mentioned above.
No, I don't, because I want to get a filtered list of modules. Instead I ask for only the modules that are compatible with at least one of the enabled backends.
I'm not sure I understand. If you ask for the list of modules that are compatible with either JVM or JS then you have your answer right there, don't you? Some of the modules will have JVM artifacts, some JS and some both. It would seem to me that's enough information?
The
ModuleVersionDetails
class should have an attribute that tells me what are the supportedBackends
.@quintesse would you please take a look at this. Thanks.