Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

version constant interpolation in module descriptor #7157

Closed
gavinking opened this issue Jul 23, 2017 · 5 comments
Closed

version constant interpolation in module descriptor #7157

gavinking opened this issue Jul 23, 2017 · 5 comments

Comments

@gavinking
Copy link
Contributor

gavinking commented Jul 23, 2017

Mentioned here by @FroMage, it would be nice to be able to do stuff like this:

module my.example "1.0.0" {
    value javaVersion = "8";
    value ceylonVersion = "1.3.3-SNAPSHOT";

    import java.base javaVersion;

    import javafx.base javaVersion;
    import javafx.graphics javaVersion;
    import javafx.controls javaVersion;

    import ceylon.collection ceylonVersion;
    import ceylon.file ceylonVersion;
}
@gavinking
Copy link
Contributor Author

This is already basically working, but I think I need to add a ImportModuleListScope.

@gavinking
Copy link
Contributor Author

I wonder if we should have some predefined constants, for example ceylonVersion, holding the version of the compiler.

@lucaswerkmeister
Copy link
Contributor

Well we already have that one as language.version, so it seems like allowing that would be cleaner…

On the other hand, that might suggest that changing the ceylon.language version via overrides should automatically change those imports as well (we probably don’t want that) and that you can use other String values from other modules as well (we definitely don’t want that).

@gavinking
Copy link
Contributor Author

Well, anyway, this is done now, closing this issue.

@FroMage
Copy link
Contributor

FroMage commented Jul 24, 2017

Very cool!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants