Closed Gama11 closed 10 years ago
Changing the completion mode in FD's HaxeContext to FlashDevelop gets rid of the error. Setting it to CompletionServer gets me the error I got in Sublime Text 2, so I guess that's what the haxe plugin in that IDE is using. Anyway, this underlines that this issue is probably caused by the Haxe compiler itself.
Unless you post a command line that should work but does not, this can not be considered a haxe issue. It must come from OpenFL's xml -> command line invoker translating to an invalid haxe invocation. There's nothing we can do about that on our end, so please report it to OpenFL.
When it errors on the "display file," is that the file you are editing? Are any of these editors rewriting the file in lower-case, or is the cause elsewhere in the Haxe compiler, so this is a red herring (and there's actually a different problem)?
@jgranick Exactly, it's always the file I'm editing atm.
Rewriting the file in lower-case? Not sure why that'd be the case. Anway, the file names don't seem to change.
I'm also having other issues, not sure if they are in any way related here. In FD, completion just doesn't work at all in some cases. This seems to be the case for all typed classes or classes that extend typed classes. However, it also happens elsewhere, and I haven't really been able to figure out a pattern there.
In Sublime Text 2 + the Haxe plugin by @clemos, code hinting doesn't work, but I suppose that's mainly because the status bar is already used to display the error. Ctrl + I to generate import statements doesn't seem to work either. And completion also seems broken here. Here, it's not like it's not showing up at all, instead, it shows functions and vars that are totally unrelated.
Can any of these issues be reproduced without using OpenFL's build system?
Do you actually get the error when trying to compile, from FD / ST2 Do you get it when compiling from the command line ? Also, don't you get any errors from the ST2 console ?
FYI, ST2 autocompletion doesn't use "openfl display" for now, it just extracts the infos from the .xml/.nmml file using regexps... So I'm not sure this error comes from OpenFL tools.
It rather looks like a filesystem issue or something... I heard there are still some weird cases in Windows with renaming / changing case.
@clemos Nope, everything compiles just fine in both IDE's, no errors. Same for the command line. ST2 console is empty. The error only appears in conjunction with compiler invocation for completion. Is this an error that should prevent the project from compiling, or at least also appear there?
Btw, this is happening on Win 7 64-bit (for me) and Win XP (for Rowdeh from IRC) it seems.
I had a Display error recently. It was caused by package and path mismatch: package was testpackage.server
but file path was TestPackage\Server
(Win 7 x64). Compilation was fine though. But code completion failed in FD.
Don't know if it is somewhat related to this one.
Here's a thread on nme.io about this issue. Setting "Disable Completion On Demand" in FD's HaxeContext to false has gotten rid of this error. Still, auto-completion is not working fully, not sure who's to blame, FD or Haxe.
+1 I sometime have this "Error: Class name must start with uppercase character" error that show up for no reason. At least there should be a better message (which file form which class?) so that we can track this issue.
Just throwing in my two cents: I've been getting this error a lot, on the latest build. No autocompletion available for things like haxeflixel, etc. The core haxe stuff works fine, but even importing classes no longer seems to autocomplete for me in 4.4.3.
I also encountered this error, specifically when i added <haxeflag name="network-sandbox"/>
in my xml build file. happends both with nme and openfl. I'm using Intellij Idea and also tried to use haxelib run openfl\nme test build.xml
, but got the same results.
I used all the new libraries, so I can't see how is this issue got closed, it's obviously still there.
I have same problem with openfl / fd project. Manipulations with settings (Disable Completion On Demand, CompletionMode) resolved problem %) I'm afraid close FD
I also have a project based on OpenFL 1.0.5 and Haxe Flixel 2.0.0.alpha.3 being developed with FlashDevelop 4.4.3 and am getting the same issue. In particular, it seems like--and I'm not completely sure about this--I can't get CTRL+Space auto-completion after the "." for variables with types not imported or defined inside the current file or for variables with implicit types, as in the "x" in a "for (x in members) { ... } " block. However, autocomplete works for other things. But I'm pretty sure that's just FD's limited built-in autocomplete rather than Haxe's built-in autocomplete.
I was able to get normal auto-completion working again by messing with compiler options in the project properties dialog. I removed the option "--no-output" under Additional Compiler Options and changing the Main Class from "ApplicationMain" to just "Main". However, after changing these options and then closing and re-opening the project properties, they went back to the values they were at before, but autocomplete still works.
Now I am also getting the warning message at random times:
"--macro:1: character 0 : Unknown identifier : flash"
but it isn't causing any issues AFAIK.
I'm also having this issue, specifically when using a Map and trying to get autocompletion to work on a property of that type. No compile errors. Here is what I have installed:
actuate: [1.6.4] air3: [0.0.1] feffects: [3.0.0] flambe: [3.1.1] flixel: [2.0.0-alpha.3] format: [3.0.2] haxelib_client: [3.1.0-rc.3] hxcpp: [3.0.2] hxsl: [2.0.0] msignal: [1.2.1] openfl: [1.0.5] openfl-compatibility: [1.0.1] openfl-html5: 1.0.4 [1.0.5] openfl-native: 1.0.6 [1.0.7] openfl-samples: [1.0.0] openfl-tools: 1.0.6 [1.0.8] spritesheet: [1.2.0]
and FlashDevelop 4.4.3 (R2724)
I think I found where the error comes from: 'openfl display' returns one line "commented out" (ie. starting with #). Cleaning that seems to remove the message (fixed in FD SVN).
Thanks! It works better, but still at least some glitches. like with this:
import mloader.JsonLoader.JsonLoader; import mloader.Loader.LoaderEventType; import mloader.Loader.LoaderEvent;
/**
@author Glantucan */ class TextFieldsTest extends Sprite {
public function new() { super(); addEventListener(Event.ADDED_TO_STAGE, added); }
function added(e)
{
removeEventListener(Event.ADDED_TO_STAGE, added);
var jsonLoader:JsonLoader = new JsonLoader("online/json/inputTextConf.json") ;
jsonLoader.loaded.add(onConfLoaded);
jsonLoader.load();
}
function onConfLoaded(e:LoaderEvent
}
}
I can't get the autocomplete dialog with the porperties of jsonLoader, the e e:LoaderEvent, for example. I get the
Error: Class name must start with uppercase character Error: Class name must start with uppercase character Error: Class name must start with uppercase character Error: Class name must start with uppercase character
output messages instead.
I guess it has to do with classes enums and typdefs defined all in the same module and with abstrat types.
@Simn Here is a command line that ?should? work but doesn't. My apologies if it doesn't. I am not that familar with the haxe code completion functionality.
This is original command line sent from Sublime Text.
haxe -cp C:\\Development\\Projects\\haxe\\Pong\\source -lib openfl -lib flixel --connect 6001 --cwd C:\\Development\\Projects\\haxe\\Pong -D st_display --display C:\\Development\\Projects\\haxe\\Pong\\source\\sprites\\Paddle.hx@236 --no-output -swf C:\\Development\\Projects\\haxe\\Pong\\Pong
Here is a trimmed down version that shows the same error.
haxe --display C:\Development\Projects\haxe\Pong\source\sprites\Paddle.hx@236
Is that with haxe 3? Also, what Windows version are you on?
The path is transformed by this native C function if anyone wants to have a look at it: https://github.com/HaxeFoundation/ocamllibs/blob/master/extc/extc_stubs.c#L216
what's the classpath of Paddle.hx?
Very sorry for the delay in response.
@Simn Yes it is indeed haxe 3 on Windows 7 i386.
@J-d-H package sprites;
Could you try with latest? I still cannot reproduce this.
I just tried the nightly dated 2013/08/14
from http://mromecki.fr/haxe-windows-nightlies/
Still no dice. If there is a more recent/other version you would like me to try, if you could link it I would love to give it a go.
I found that the original input is lowercased by unique_full_path on Windows, but Extc.get_real_path gets the right casing for me afterwards. Apparently it doesn't do that for you and some others, but I have no idea why.
@ncannasse; Any ideas?
I can confirm that git build development @ b9498e1 resolves this issue. I do not know which commit fixed this as there is no commit listed in the issue m22spencer referenced.
The build was downloaded from: http://hxbuilds.s3-website-us-east-1.amazonaws.com/builds/haxe/windows/
We upgrade to last build, but the problem still exists.
We were somehow lucky to be able to reproduce on a local computer at Shiro Games
<3 Le 2 déc. 2013 15:38, "Nicolas Cannasse" notifications@github.com a écrit :
We were somehow lucky to be able to reproduce on a local computer at Shiro Games
— Reply to this email directly or view it on GitHubhttps://github.com/HaxeFoundation/haxe/issues/1932#issuecomment-29621964 .
I am getting this error (always preceded by a Error: Could not process argument #--macro
line) on test case files after installing munit 2.1.2 and trying to get started with it. Before then, I didn't see it. It happens even on the autogenerated ExampleTest.hx, when I try to add an "Assert." line to see what Assert has. Meanwhile, the example tests themselves compile and run fine with munit.
Win7/64, FlashDevelop 5.0.2.2, Haxe 3.2.1, and haxelib list gives:
actuate: [1.8.6] advanced-layout: 0.6.2 0.6.3 git [dev:C:\HaxeToolkit\haxe\lib\advanced-layout/git] assetsmanager: [1.2.0] awe6: 2.5.732 [2.6.489] firetongue: 1.0.0 git [dev:C:\HaxeToolkit\haxe\lib\firetongue/git] flixel-addons: 1.1.1 git [dev:C:\HaxeToolkit\haxe\lib\flixel-addons/git] flixel-demos: [1.1.2] flixel-templates: [1.0.2] flixel-tools: 1.1.1 [1.1.2] flixel-ui: 1.0.2 git [dev:C:\HaxeToolkit\haxe\lib\flixel-ui/git] flixel: 3.3.12 git [dev:C:\HaxeToolkit\haxe\lib\flixel/git] hamcrest: [2.0.1] haxelib_client: [3.2.0-rc.3] hscript: [2.0.5] hxcpp: 3.2.193 [3.2.205] lime-tools: [1.5.7] lime: 2.8.2 2.8.3 [2.9.0] mconsole: [1.6.0] mcover: [2.1.1] mlib: [2.0.2] monax: 1.4.0 [1.5.1] msignal: 1.2.2 [1.2.4] munit: [2.1.2] nape-hacks: [2.0.1] nape-symbolic: [2.0.1] nape: [2.0.19] openfl: 3.5.3 [3.6.0] Parsex: [1.4.0] promhx: [1.0.21] scrollable-area: [0.0.1-alpha] svg: 1.0.8 [1.0.9] swf: [2.2.0] task: [1.0.7]
I should maybe note that FD's output pane always says, "haxelib.exe not found in SDK path" just after I start FD; yet, everything else normally works (compiling, code completion, debugger connection).
I have the EXACT same problem as @GimmickyApps, in a much simpler project. In fact, I just created a new OpenFL project directly from FD 5.1.1.3 and changed my Main.hx to this
package;
import openfl.display.Sprite;
class Main extends Sprite
{
public function new()
{
super();
x.|
}
}
The pipe is where I try to autocomplete (ctrl+space) and get the error:
Error: Could not process argument #--macro
Class name must start with uppercase character
Also, I found one reference to the "#--macro" in the .hxproj file:
<option additional="--remap flash:openfl
-debug #--macro keep("Main")" />
Removing the sharp removed the error, but I don't know if there is any colateral effect... But closing and opening the project again while set to debug (instead of release) adds adds the sharp again. Besides, I found pretty similar references in .hxproj files for the following lime and openfl samples:
lime-samples\2,6,0\demos\HelloWorld\HelloWorld.hxproj
lime-samples\2,6,0\features\audio\SimpleAudio\SimpleAudio.hxproj
lime-samples\2,6,0\features\text\TextRendering\TextRendering.hxproj
openfl-samples\3,3,1\demos\BunnyMark\BunnyMark.hxproj
openfl-samples\3,3,1\features\events\HandlingMouseEvents\HandlingMouseEvents.hxproj
Didn't try those ones to see if the problem is present there too...
So, this is obviously a FD problem. @elsassph, could you take a look, please?
I'm constantly getting this error whenever I type a class name plus a dot (so that auto-completion shows up) in FD 4.4.3 (also happened in earlier versions IIRC):
Error: Class name must start with uppercase character
(location in main.ml)
This happens consistently across all of my projects and classes.
Interestingly enough, a similar, but not the same thing happens in Sublime Text 2 (2.0.1, Build 2217) - this is the error I get there:
ERROR: Display file 'playstate.hx' should not start with a lowercase letter.
(location in main.ml)
I am 100% sure that these errors are unfounded - none of the class names actually do start with a lowercase letter. The
playstate.hx
class in the error is actually namedPlayState.hx
.I'm not the only person with this issue. Rowdeh from IRC (not a GitHub user) is having exactly the same issues in both IDEs. In his opinion, a conversion to lowercase is happening somwhere in
main.ml
which causes this issue.My haxe version: 3.0.0 OS: Win 7 64-bit haxelib list paste:
I have tried switching to the openfl rc's. No change.
@Simn told me in #haxe this might be related to some invalid line / argument in the .nmml (or .xml as of openfl I guess). So here's a pastie of that: http://pastebin.com/Yv8krPhs
It's the .xml which is generated by the HaxeFlixel template, but some other HaxeFlixel users I asked don't seem to have the same issue. And Rowdeh is not using HaxeFlixel at all.
Edit: Might be worth mentioning @ousado thinks this is an issue regarding completion invoking.