https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • b

    bright-gpu-74537

    12/01/2019, 11:41 AM
    ok, i put a trace at the top of the function and a little further down, and only saw a single trace... which is interesting
  • b

    bright-gpu-74537

    12/01/2019, 11:41 AM
    thats certainly something to go on
  • b

    bitter-family-72722

    12/01/2019, 11:42 AM
    reminder: there's a macro debugger in vscode 😉
  • b

    bright-gpu-74537

    12/01/2019, 11:42 AM
    Copy code
    haxe
            var fullClass = fileParts.concat([className]).join(".");
            if (ComponentClassMap.hasClass(fullClass) == true) {
                trace("here");
                return fullClass;
            }
  • b

    bright-gpu-74537

    12/01/2019, 11:42 AM
    so... something to do with the ComponentClassMap already having data
  • b

    bright-gpu-74537

    12/01/2019, 11:43 AM
    so i guess i could clear it everytime the macro runs...
  • b

    bright-gpu-74537

    12/01/2019, 11:44 AM
    is there a better way to do this?
  • b

    bitter-family-72722

    12/01/2019, 11:44 AM
    I'm not exactly sure what the problem is
  • b

    bitter-family-72722

    12/01/2019, 11:44 AM
    isn't it good if it's already populated and thus has to do less work on subsequent compilations?
  • b

    bright-gpu-74537

    12/01/2019, 11:45 AM
    well, it seems it doesnt have the actual class though
  • b

    bright-gpu-74537

    12/01/2019, 11:46 AM
    so it looks like first time round it builds the dynamic class and puts a class name in the class map
  • b

    bright-gpu-74537

    12/01/2019, 11:46 AM
    the second time round its already in the class map, so it doesnt build it... but... its not actually there
  • b

    bright-gpu-74537

    12/01/2019, 11:46 AM
    i mean, it hasnt actually been generated
  • b

    bitter-family-72722

    12/01/2019, 11:47 AM
    not sure if relevant here, but something to be aware of is that static variables are reset between compilations unless they're @:persistent
  • b

    bright-gpu-74537

    12/01/2019, 11:48 AM
    indeed, if i do:
  • b

    bitter-family-72722

    12/01/2019, 11:48 AM
    none of this explains why it would already fail during the first compilation though
  • b

    bright-gpu-74537

    12/01/2019, 11:48 AM
    Copy code
    haxe
        macro public static function processModules() {
            if (_modulesProcessed == true) {
                return macro null;
            }
    
            ComponentClassMap.clear();
  • b

    bright-gpu-74537

    12/01/2019, 11:48 AM
    everything compiles fine
  • b

    bitter-family-72722

    12/01/2019, 11:49 AM
    are you sure you're not connecting to a vscode server that's already been running with your "command line compilation"?
  • b

    bitter-family-72722

    12/01/2019, 11:49 AM
    i.e. did you actually start the haxe server yourself?
  • b

    bright-gpu-74537

    12/01/2019, 11:49 AM
    im not using command line now... im pretty sure i was connecting to the vscode instance before
  • b

    bright-gpu-74537

    12/01/2019, 11:49 AM
    im inside vscode now
  • b

    bitter-family-72722

    12/01/2019, 11:49 AM
    well, then it wasn't the first compilation
  • b

    bright-gpu-74537

    12/01/2019, 11:49 AM
    nope
  • b

    bright-gpu-74537

    12/01/2019, 11:49 AM
    was the second as you said, first was the cache
  • b

    bright-gpu-74537

    12/01/2019, 11:50 AM
    then command line was just connecting to that
  • b

    bright-gpu-74537

    12/01/2019, 11:50 AM
    but adding that .clear() means i can compile just fine
  • b

    bright-gpu-74537

    12/01/2019, 11:50 AM
    but i wonder, is it the right thing to be doing?
  • b

    bright-gpu-74537

    12/01/2019, 11:50 AM
    doesnt hurt, but should i be looking for a deeper issue somewhere?
  • b

    bright-gpu-74537

    12/01/2019, 11:50 AM
    ie, why does the class map have info that the build doesnt actually seem to have
1...150151152...1687Latest