eclipse-archived / ceylon

The Ceylon compiler, language module, and command line tools
http://ceylon-lang.org
Apache License 2.0
399 stars 62 forks source link

ModuleVersionDetails should have nativeBackends #4791

Open CeylonMigrationBot opened 9 years ago

CeylonMigrationBot commented 9 years ago

[@gavinking] The ModuleVersionDetails class should have an attribute that tells me what are the supported Backends.

@quintesse would you please take a look at this. Thanks.

[Migrated from ceylon/ceylon-module-resolver#129]

CeylonMigrationBot commented 9 years ago

[@quintesse] 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?

CeylonMigrationBot commented 9 years ago

[@quintesse] Ah wait you linked another issue.

CeylonMigrationBot commented 9 years ago

[@gavinking] 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.

CeylonMigrationBot commented 9 years ago

[@quintesse] But couldn't you , for now, use the fact that a query for JVM + JS only returns one or the other for native modules?

CeylonMigrationBot commented 9 years ago

[@gavinking] 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.

CeylonMigrationBot commented 9 years ago

[@quintesse] 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.

CeylonMigrationBot commented 9 years ago

[@gavinking] No, because as-per the resolution to #4790, it only sends me the artifacts I asked for. It doesn't tell me that the module also has other artifacts available.

CeylonMigrationBot commented 9 years ago

[@quintesse] But that's what I mean, you'd normally ask for both artifacts, right? Because I see two situations:

THat should be enough information, right?

(*) well, it also depends on which backends you have enabled in the IDE I guess.

CeylonMigrationBot commented 9 years ago

[@gavinking]

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.

CeylonMigrationBot commented 9 years ago

[@gavinking] @quintesse Note that I can have a native import in a cross-platform module, and I might not have both backends enabled.

CeylonMigrationBot commented 9 years ago

[@gavinking] Reassigning to 1.3 because I think I can live without this for now.

CeylonMigrationBot commented 9 years ago

[@quintesse]

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?