question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Overriding in module descriptors

See original GitHub issue

Following an agreeable discussion about module descriptors and assemblies, we decided that we need to allow overrides in module.ceylon. Merging these overrides would apply downwards in a module dependency tree (cycles are not a problem because they always have to be compiled together anyway).

For flatclasspath we would still require additional overrides (to resolve conflicts between non-shared but duplicated dependencies).

We’d need a compile-time version validation phase (to identify diamonds), which would benefit from being able to obtain dependency information without downloading the entire module. This could be a special API for herd, or a separate artifact obtainable separately from the module itself.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:46 (37 by maintainers)

github_iconTop GitHub Comments

3reactions
lucaswerkmeistercommented, Mar 8, 2016

dont import "this.module" 😉

2reactions
gavinkingcommented, Mar 7, 2016

Some people are going to complain that ~ is not easy on their keyboard 😉

Well, TBH, I would be perfectly happy using:

  • the actual annotation instead of ~ for import version overrides, and
  • the shared annotation instead of ~ for import export overrides, and
  • nothing instead of + for adding imports.

But then I wouldn’t know what to do for removing imports, which @FroMage insists is a necessary capability.

FTR, it would look like this:

native("jvm")
module com.my.app "1.0.0" {
    import "org.hibernate:hibernate-entitymanager" "5.0.4.Final";
    import "org.hsqldb:hsqldb" "2.3.1";
    module "org.hibernate:hibernate-entitymanager" "5.0.4.Final" {
        shared import "org.hibernate:hibernate-core";
        shared import "org.javassist:javassist";
        shared import "org.hibernate.javax.persistence:hibernate-jpa-2.1-api";
    }
    module "org.hibernate:hibernate-core" {
        shared import "javax.transaction:jta" "1.1";
    }
}

The above is rather clean and readable, and more ceylonic (no cryptic symbols). But how would you indicate removal of a dependency?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Modules (Guice 4.2 API) - Google
Returns a builder that creates a module that overlays override modules over the given modules. If a key is bound in both sets...
Read more >
Module Details: override (v3) - InspIRCd Documentation
The "override" Module. Description. This module allows server operators to be given privileges that allow them to ignore various channel-level restrictions.
Read more >
A Drupal module for overriding services | by Rik de Boer
One example of services are EventSubscribers. You can use this module to override as many services as you require.
Read more >
Use Modules to override styles - Adobe Developer
Theme styles should override module styles. But you must use the override pattern consistently within Page Builder, or it won't work.
Read more >
Module overrides - Eclipse Ceylon
For all these reasons, we created an experimental measure that lets you override the dependency information in a Maven or Ceylon module descriptor....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found