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

different path in error msg when HAXE_STD_PATH is set #4163

Closed
andyli opened this Issue Apr 20, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@andyli
Member

andyli commented Apr 20, 2015

When HAXE_STD_PATH is set, the file path in error messages are prepended with ./.

Test.hx

asdf //just to produce an error

when HAXE_STD_PATH is not set:

$ haxe -main Test --interp
Test.hx:3: characters 2-8 : Missing ;
Test.hx:3: characters 2-8 : Unknown identifier : adsasf

when HAXE_STD_PATH is set:

$ haxe -main Test --interp
./Test.hx:3: characters 2-8 : Missing ;
./Test.hx:3: characters 2-8 : Unknown identifier : adsasf

I tested in Mac and Linux.
This prevents the haxe repo to switch to the TravisCI container based environment, where sudo is not allowed, thus we have to mess with PATH and HAXE_STD_PATH instead of sudo make install.
And our misc tests failed because of this issue (build log).

@Simn

This comment has been minimized.

Show comment
Hide comment
@Simn

Simn Apr 20, 2015

Member

Can reproduce on Windows. The relevant code looks a bit strange:

        let parts = "" :: Str.split_delim (Str.regexp "[;:]") p in
        com.class_path <- List.map normalize_path (loop parts)

https://github.com/HaxeFoundation/haxe/blob/development/main.ml#L1020

@ncannasse: What's the "" doing there? The problem seems to be that it goes through normalize_path which turns it into ./.

Member

Simn commented Apr 20, 2015

Can reproduce on Windows. The relevant code looks a bit strange:

        let parts = "" :: Str.split_delim (Str.regexp "[;:]") p in
        com.class_path <- List.map normalize_path (loop parts)

https://github.com/HaxeFoundation/haxe/blob/development/main.ml#L1020

@ncannasse: What's the "" doing there? The problem seems to be that it goes through normalize_path which turns it into ./.

@Simn

This comment has been minimized.

Show comment
Hide comment
@Simn

Simn Apr 20, 2015

Member

Looks like the "" :: should just move one line down. Reading the loop implementation it is passed through anyway, so the only difference to the other branches is that the "" goes through normalize_path. I'll go ahead and change it.

Member

Simn commented Apr 20, 2015

Looks like the "" :: should just move one line down. Reading the loop implementation it is passed through anyway, so the only difference to the other branches is that the "" goes through normalize_path. I'll go ahead and change it.

Simn added a commit that referenced this issue Apr 20, 2015

@Simn

This comment has been minimized.

Show comment
Hide comment
@Simn

Simn Apr 20, 2015

Member

@andyli: Please confirm it works now.

Member

Simn commented Apr 20, 2015

@andyli: Please confirm it works now.

@andyli

This comment has been minimized.

Show comment
Hide comment
@andyli

andyli Apr 20, 2015

Member

It works now, thanks!
Your issue fixing speed is impressive as always :)

Member

andyli commented Apr 20, 2015

It works now, thanks!
Your issue fixing speed is impressive as always :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment