Hello everybody,
I am learning Haxe by implementing small examples, and today I decided to refactor a little bit one of the examples I did and separate one class in a whole different package to reuse it later, and then import it in the original project. I can't import it or complete a single compilation since I separated them, I am not sure why because the error message is not much descriptive :(
Here is the project path which imports the code:
~/projects/
elm2openfl/Events/mouse/stamps
~/projects/elm2openfl/Events/mouse/stamps
$ tree
.
├── Makefile
├── Source
│ └── Main.hx
├── assets
│ └── openfl.svg
├── project.xml
└── stamps.iml
project.xml contains a line with:
<include path="../../../Elm/Graphics/project.xml" />Main.hx contains:
import elm.graphics.Collage.Ngon;
And here is the package I wanted to abstract which is matching the mentioned relative path:
~/projects/elm2openfl/Elm/Graphics
$ tree
.
├── Graphics.iml
├── project.xml
└── src
└── Collage.hx
Collage.hx declares:
package elm.graphics;And project.xml:
<?xml version="1.0" encoding="utf-8"?>
<project>
<meta title="Elm Graphics" package="elm.graphics.Collage" version="1.0.0" company="Company Name" />
<app main="Collage" path="Export" file="Graphics" />
<source path="src" />
<haxelib name="openfl" />
</project>
When I am in the path for stamps and I try to compile, that's everything I get:
$ haxelib run lime test project.xml neko -j16
--macro:1: character 0 : Invalid package : <empty> should be elm.graphics
I tried several renames of the folder also in case "Collage" may not be appropriate with capital C or perhaps by removing the class declared into the module but it made no change. Does anyone have an idea about how to declare properly a package and include it from my filesystem into another project?
Thank you so much in advance!
P.S. The setup is haxelib standard (non modified libraries or paths) everything is updated from the current
week.info