Skip to content
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

Layer with directory cannot be set as parent of another Layer #36

Open
aalmiray opened this issue Sep 20, 2020 · 1 comment
Open

Layer with directory cannot be set as parent of another Layer #36

aalmiray opened this issue Sep 20, 2020 · 1 comment

Comments

@aalmiray
Copy link
Contributor

aalmiray commented Sep 20, 2020

Given the following configuration

layers:
  javafx:
    modules:
      - "org.openjfx:javafx-base:jar:mac:11.0.2"
      - "org.openjfx:javafx-controls:jar:mac:11.0.2"
      - "org.openjfx:javafx-graphics:jar:mac:11.0.2"
      - "org.openjfx:javafx-web:jar:mac:11.0.2"
      - "org.openjfx:javafx-media:jar:mac:11.0.2"
  core:
    modules:
      - "org.kordamp.tiles:modular-tiles-model:0.0.0"
      - "org.kordamp.tiles:modular-tiles-core:0.0.0"
      - "org.moditect.layrry:layrry-platform:1.0-SNAPSHOT"
      - "eu.hansolo:tilesfx:11.44"
    parents:
      - "javafx"
  plugins:
    parents:
      - "core"
    directory: plugins
  app:
    parents:
      - "plugins"
    modules:
      - "org.kordamp.tiles:modular-tiles-app:0.0.0"
main:
  module: "org.kordamp.tiles.app"
  class: "org.kordamp.tiles.app.Main"

Where the plugin layer is a parent of app.

When the plugins directory is empty and the application starts

Exception in thread "main" java.lang.IllegalArgumentException: Layer 'app': parent layer 'plugins' not configured yet
    at org.moditect.layrry.internal.LayersImpl.getParentLayers(LayersImpl.java:195)
    at org.moditect.layrry.internal.LayersImpl.run(LayersImpl.java:103)
    at org.moditect.layrry.Layrry.run(Layrry.java:41)
    at org.moditect.layrry.launcher.LayrryLauncher.launch(LayrryLauncher.java:48)
    at org.moditect.layrry.launcher.LayrryLauncher.main(LayrryLauncher.java:34)

When the plugins directory has a layer such as

plugins
└── tile-clock-0.0.0
    └── tile-clock-0.0.0.jar

Exception in thread "main" java.lang.IllegalArgumentException: Layer 'app': parent layer 'tile-clock-0.0.0' not configured yet
    at org.moditect.layrry.internal.LayersImpl.getParentLayers(LayersImpl.java:195)
    at org.moditect.layrry.internal.LayersImpl.run(LayersImpl.java:103)
    at org.moditect.layrry.Layrry.run(Layrry.java:41)
    at org.moditect.layrry.launcher.LayrryLauncher.launch(LayrryLauncher.java:48)
    at org.moditect.layrry.launcher.LayrryLauncher.main(LayrryLauncher.java:34)
@gunnarmorling
Copy link
Member

Uh, oh, thanks for reporting. Definitely needs fixing; that said, I don't think you'd need the separate "app" layer, it should work if you move its contents to the "core" layer (like in the Vert.x example).

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

No branches or pull requests

2 participants