Hexworks / mixite

A GUI agnostic hexagonal grid library. Supports a multitude of grid layouts including hexagonal, triangular, rectangular and more.
Apache License 2.0
191 stars 31 forks source link

unable to compile when getSatelliteData() is called #69

Open blaine-dodson opened 2 years ago

blaine-dodson commented 2 years ago

When an application uses getSatelliteData() there is a compiler error:

...\dev\test-mixite> gradle build

> Task :app:compileJava FAILED
...\dev\test-mixite\app\src\main\java\test\mixite\App.java:29: error: cannot access Maybe
            h.getSatelliteData();
             ^
  class file for org.hexworks.cobalt.datatypes.Maybe not found
1 error

FAILURE: Build failed with an exception.

To reproduce the error, build a grid and attempt to access the satellite data:

package test.mixite;

import org.hexworks.mixite.core.api.Hexagon;
import org.hexworks.mixite.core.api.HexagonalGrid;
import org.hexworks.mixite.core.api.HexagonalGridBuilder;
import org.hexworks.mixite.core.api.defaults.DefaultSatelliteData;

public class App {
    public static void main(String[] args) {

        HexagonalGridBuilder<DefaultSatelliteData> builder = new HexagonalGridBuilder<DefaultSatelliteData>()
            .setGridHeight(9)
            .setGridWidth(9)
            .setRadius(30.0);
        HexagonalGrid<DefaultSatelliteData> grid = builder.build();

        for (final Hexagon<DefaultSatelliteData> h : grid.getHexagons()) {
            h.getSatelliteData();
            // ^error here
        }
    }
}

The error occurs whether using the latest release, or the latest commit:

dependencies {
    implementation 'com.github.Hexworks.mixite:mixite.core-jvm:2018.2.0-RELEASE'
    // ^ this works
    // implementation 'com.github.Hexworks.mixite:mixite.core-jvm:2020.1.0'
    // ^ this fails
    // implementation 'com.github.Hexworks.mixite:mixite.core-jvm:master-SNAPSHOT'
    // ^ this fails
}

The problem is not present in the 2018.2.0-RELEASE

Let me know if there is more information that I can provide. Thank you.