Commit e58c91d 1 parent 0f343db commit e58c91d Copy full SHA for e58c91d
File tree 2 files changed +13
-6
lines changed
2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,16 @@ class ClassPathMacro {
12
12
Sys .println (' [OUT]: ${Compiler .getOutput ()}' );
13
13
14
14
var ownPath = FileSystem .fullPath (Path .join ([Context .resolvePath (" ClassPathMacro.hx" ), ' ..' ]));
15
+ var fullPath = Context .defined (' fullpath' );
15
16
16
- for (cp in haxe.macro. Context .getClassPath ()) {
17
+ for (cp in Context .getClassPath ()) {
17
18
if (cp == " " ) continue ;
18
19
if (FileSystem .fullPath (cp ) == ownPath ) continue ;
20
+ if (fullPath ) cp = FileSystem .fullPath (cp );
19
21
Sys .println (' [CLASSPATH]: $cp ' );
20
22
}
21
23
22
- haxe.macro. Context .fatalError (' Compilation aborted' , haxe.macro. Context .currentPos ());
24
+ Context .fatalError (' Compilation aborted' , Context .currentPos ());
23
25
}
24
26
25
27
static function first (defines : Iterator <String >, targets : Array <String >) {
Original file line number Diff line number Diff line change @@ -32,19 +32,24 @@ class HaxeClasspath {
32
32
33
33
static var stdRoot = FileSystem .fullPath (Path .join ([Sys .getCwd (), " current" , " std" ]));
34
34
35
- static function getClasspath (? hxml : String = " build.hxml" ): ClasspathResult {
35
+ static function getClasspath (? hxml : String = " build.hxml" , ? fullpath : Bool = false ): ClasspathResult {
36
36
final cwd = Utils .getCallSite ();
37
37
hxml = Path .isAbsolute (hxml ) ? hxml : Path .join ([cwd , hxml ]);
38
38
if (! FileSystem .exists (hxml )) throw ' Cannot find hxml file $hxml ' ;
39
39
40
40
Sys .putEnv (" HAXE_STD_PATH" , stdRoot );
41
- final proc = new Process ( " haxe " , [
41
+ final args = [
42
42
" --cwd" , cwd ,
43
43
hxml ,
44
44
" -cp" , FileSystem .absolutePath (" res/classpath/src" ),
45
45
" --macro" , " ClassPathMacro.run()" ,
46
46
" --no-output"
47
- ]);
47
+ ];
48
+ if (fullpath ) {
49
+ args .push (" -D" );
50
+ args .push (" fullpath" );
51
+ }
52
+ final proc = new Process (" haxe" , args );
48
53
49
54
try {
50
55
final code = proc .exitCode ();
@@ -107,7 +112,7 @@ class HaxeClasspath {
107
112
108
113
public static function getDapConfig (? hxml : String = " build.hxml" ): Void {
109
114
try {
110
- var data = getClasspath (hxml );
115
+ var data = getClasspath (hxml , true );
111
116
Sys .println ([
112
117
' {' ,
113
118
' name="HashLink",' ,
You can’t perform that action at this time.
0 commit comments