1
votes

BIG UPDATE

Today, I wanted to work on something else and I realized that Haxe was completley down. In fact, I can't compile any library. Even openfl doesn't work.

I tried to uninstall/reinstall Haxe without success.


I was currently working on my library project. Everything was working fine and suddenly, it became impossible to compile anything.

I restricted the problem to a minimal one.

So here is the project tree under haxe/lib folder near to every other libraries

beluga/current
beluga/0,1,0/haxelib.json
beluga/0,1,0/test/Test.hx

Note: I tried to rename the folder to 0.1.1 and haxe threw me the following error

Library beluga version 0.1.0 is not installed

The content of the file Test.hx

package test;

class Test {
}

Now, if I create a new project. If I try to compile with

haxe -cp src -lib beluga -php bin -main Main

Please note that this works

haxe -cp src -cp ../../../lib/beluga/0,1 -php bin -main Main

It does not say that the beluga library is not found so it should be properly installed. Also, in FlashDevelop, the auto completion works fine. However, with a main like this:

package ;
import test.Test;

class Main {
    static function main() { }
}

I have the following error:

src/Main.hx:2: characters 7-16 : Class not found : test.Test

Finally, the content of haxelib.json:

{
  "name": "beluga",
  "license": "GPL",
  "tags": ["php","neko","framework","game"],
  "description": "\r\n\t\tBeluga is a video game framework.\r\n\t",
  "contributors": ["masadow"],
  "releasenote": "Initial version, not released yet",
  "version": "0.1",
  "url": "http://myproject.org",
  "dependencies": {

  }
}

You can find the github repositories of the project here

Any idea ?

2
Which version of Haxe, and which version of Haxelib are you using? I ask because you're using "haxelib.json", which suggests haxelib 3, but your version number does not match Haxelib's semantic versioning... it should be "0.1.0". Not sure if that would make a difference - Jason O'Neil
@JasonO'Neil haxelib 3.0.0 and haxe 3.0.0. I never had any problem before and didn't made any update recently. That would be weird ? - Masadow
I'm just throwing out ideas here. Perhaps try a haxelib selfupdate to get the latest haxelib. And then try change the version to 0.1.0. I'm not sure if it would make a difference, but it is worth a shot. If that doesn't work, perhaps you can post the code to Github so me or @back2dos can take a look? - Jason O'Neil
I changed it into 0.1.0 and it did not change anything. I also updated haxelib. I edit the question to link the repositories of the current project. Thanks - Masadow

2 Answers

1
votes

Try haxelib path beluga and see whether it gives you the right path (you can also add that output to your compiler args instead of -lib beluga to eliminate haxelib as an error source).

It's also possible that your haxelib.json specifies a classPath other then the root.

0
votes

The problem is extremely weird and I think it is a Haxe compiler issue.

I'm using Windows and I wanted to add some routine stuff (like "doskey" commands) to my shell.

So I've add my custom routine file like that

reg add "hkcu\software\microsoft\command processor" /v Autorun /t reg_sz /d c:\bin\autorun.cmd

This is actually breaking the Haxe compiler.

Here is the autorun.cmd content :

@echo off
cls
doskey /macrofile=c:\bin\cmd_alias.txt

And the alias content :

ls=ls --color $*
ll=ls -l --color $*

It was simply an incompatibility between AUTORUN reg key of cmd.exe and Haxe compiler