-
Notifications
You must be signed in to change notification settings - Fork 34
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
Backend-specific dependencies #499
Comments
Once we have a way to specify that a compilation unit is only for a particular back end (#500), this could be done by allowing the dependencies of a module to be declared 'outside' the module descriptor some how. For example using the Would you be allowed to |
I think with the implementation of #500 we could define annotations for backend-specific imports and keep them all in the single module foo '1' {
import bla '1';
jvm import bli '2';
js import foo '1';
} |
BTW, this would be trivial to implement. |
I think this makes sense. Of course, it's only 1/2 of the problem. We still need to be able to define a module which has different underlying implementations for different backends. This feature, on its own, is almost useless. The hard bit is how to define a platform-independent module that makes use of platform-specific code. |
Well, go and tell us to go ahead on #500 then ;) |
We will solve this and #500 for Ceylon 1.1. Not for Ceylon 1.0. Sorry. |
I'm closing this issue. AFAICT, it doesn't propose anything that is not already provided by |
What? This is not about Also optional would never produce an error if the module is missing, and in the case of multi-backends we surely want to make sure the dependencies exist. |
All of which cases are already handled by judicious application of
Ok, fine, so let's enhance |
Can't we reuse the |
No, because
Well, perhaps, even though I have a feeling this will end up meaning But if you agree |
|
Moving to 1.2. |
…end our `ModuleManager` is for (ceylon/ceylon-spec#499 and ceylon/ceylon-spec#500)
…end our `ModuleManager` is for (ceylon/ceylon-spec#499 and ceylon/ceylon-spec#500)
…are not for the JVM backend (ceylon/ceylon-spec#499)
…g for the Java backend (ceylon/ceylon-spec#499)
…aration` and we initialize it from any `native` annotations it might have (#499)
… `ModuleImport` objects (ceylon/ceylon-spec#499)
…the imported module itself (ceylon/ceylon-spec#499)
…and the native attribute of the imported module itself (#499)
…the imported module itself (ceylon/ceylon-spec#499)
I think this can be closed now. Any remaining problems can be put in their own issues. |
We need a way to say that backend JVM depends on those modules, but backend JS on those.
The text was updated successfully, but these errors were encountered: