-
Notifications
You must be signed in to change notification settings - Fork 62
Compatibility for 1.2.1 #5734
Comments
[@tombentley] Presumably we also need to be able to compile a module using 1.2.1 which depends on a 1.2.0 module. |
[@tombentley] When Ceylon gets support for assemblies we expect them to be able to override declared versions in a similar manner to what's required here. An assembly is expected to be (approximately) a zipped repository, so associating some version overrides with a repository seems like a sensible approach to items 1. and 2. In this case we'd be associating some overrides of the dist modules with the dist repo. |
[@tombentley] Doing this using I don't particularly like the idea of just removing the checks, but there's no obvious alternative. The more up to date module itself doesn't know that it can replace the older module, so a more sophisticated check isn't possible without knowing about repos, and these points in the code no nothing about repos. |
I don't think I agree with this, I don't think that what defines the needed overrides is "a repository" at all. It's the assembly itself, which in turn is defined by its contents, ie the actual versions of the available modules. So to me an assembly would be a zipped repository with the overrides stored inside it, separate from the repo, just like a JAR has a I say this because I don't think "a repository" is the correct "level" for handling overrides, repositories are dynamic, things get added and removed, we change repository paths and ordering all the time when using the tools, etc. (which means you could find the same module but in a repository without the correct overrides) What determines the need for an override is your application or the distribution itself, neither one of those are defined by a single repository (remember that often for our distribution we use both system modules from the distribution folder and the ones published to the user repository in So to me an override is something global, it's:
The first two points are easy enough to understand, I think, but the last one, "part of the distribution", is somewhat more involved. We could literally make it part of the distribution, let's say |
[@tombentley] I'm not saying that repositories in general should support overrides. But the fact is that there is a dist repository. Putting the information about how the modules in it should override other modules doesn't seem like a bad idea to me. Putting them somewhere else in the dist is of course possible, but I don't really see how that's better. But honestly where this file goes doesn't interest me particularly, I'd just like it to end up being consistent with assemblies if possible (and that's hard because we're not really thinking about them yet). Saying repositories are dynamic things is a generalization. The dist repository is not dynamic.
Well to my mind the distribution is an assembly, and would be downloadable as a single thing, not as individual components. |
[@tombentley] Here's a question: Does the metamodel (specifically ``module |
Like I said, the system components could be retrieved from some other location, it's not exactly advisable to do so (like using Addendum: That's why an overrides file that gets globally applied makes more sense because it wouldn't matter anymore where the modules come from, the overrides get applied all the same. That's what I mean when I say that the repository is not the identifying feature. It might seem like a convenient place to put it but IMO it's just not correct. An assembly is different because it's a snapshot of a repository, there's no way to mess with the versions or the ordering of the module lookup anymore and the overrides file is bound to that specific snapshot. Edit: added addendum above |
[@quintesse] Btw, it also means that we have to add support for a new |
[@FroMage]
Since the modules pointed to will be the result of the override, and the original imports may not be available, they should point to the result of the override (runtime version). In the future we may add an API to query the original imports, but those will likely point to a |
[@tombentley] Last night after I posed that question I found that |
Because with overrides the loaded version might not be the same as the version imported in the module descriptor. Part of #5734
It is not the current version if the module was compiled with an old compiler Part of #5734
…ime inlining Part of #5734 Conflicts: common/src/com/redhat/ceylon/common/Versions.java
Also: * Allow Overrides to remember where they came from (useful for dubugging, logging etc) * Log when an override is used in resolution * ceylon-runtime (in particular CeylonModuleLoader) needs to be able to resolve overrides *before* it determines whether the module should be loaded with the BootstrapBoduleLoader (because it's a dist artifact) or the CeylonModuleLoader itself, so we need an API for that. Part of #5734
…nce we need that Part of #5734 Conflicts: compiler-java/test/ceylondoc/com/redhat/ceylon/ceylondoc/test/CeylonDocToolTests.java
…dule It is not the current version if the module was compiled with an old compiler Part of #5734
Some of these are due to 1.2.0/1.2.1 compatibility, others due to language module changes. Part of #5734
Fixes a problem that @davidfestal has with running inside OSGi.
@tombentley I assume this can be closed? The remaining issues should only be the two issues I opened about this yesterday, no? |
Yes I believe this one can be closed. |
[@tombentley] This issue is to track the compatibility requirements for Ceylon 1.2.1. This issue assumes that 1.2.1 will be binary compatible with 1.2.0, so the problem is "just" about making the toolset use the 1.2.1 artifacts, rather than complaining about mismatched versions.
The specific requirements are:
@davidfestal has a requirement to be able to compile a 1.2.0 module using a 1.2.1 compiler. Specifically his requirement seems to relate to the implicit dependency on
ceylon.language
that gets added to compiled modules.[Migrated from ceylon/ceylon-dist#61]
The text was updated successfully, but these errors were encountered: