8char / laux-compiler

The LAU project by Metamist (Alexander Arvidsson) has long been dead. This fork aims to breathe new life into the project and continue its development with some updates to syntax and functionality.
MIT License
11 stars 1 forks source link

Linux : compile doesn't work unless file changes #1

Closed avivi55 closed 1 year ago

avivi55 commented 1 year ago

This issue was supposed to concern Atals but, trying it on a single file didn't change anything.

The Problem: (trying to transpile AtlasFramework)

When running > ./transpile.sh for the first few time I kept getting

LAUX BUILT atlasui/libs/configurator/ui/entities/row.lua 55.211ms
LAUX BUILT atlasui/libs/configurator/ui/entities/row_settings.lua 42.739ms
LAUX BUILT atlasui/libs/configurator/ui/entities/settings_base.lua 37.655ms
LAUX BUILT atlasui/libs/players/ui/notifications/hud.lua 1.659ms
LAUX BUILT atlasui/libs/players/ui/notifications/main.lua 89.654ms
LAUX BUILT atlasui/libs/players/ui/notifications/row.lua 68.266ms
/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:609
        throw new Error("Tried to print invalid node type '" + type + "'");
              ^
Error: Tried to print invalid node type 'TableSpreadExpression'
    at CodeGenerator.print (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:609:15)
    at CodeGenerator.printJoin (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:643:14)
    at CodeGenerator.printSequence (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:661:19)
    at CodeGenerator.TableConstructorExpression (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:508:16)
    at CodeGenerator.print (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:607:46)
    at CodeGenerator.printJoin (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:643:14)
    at CodeGenerator.printList (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:621:19)
    at CodeGenerator.CallExpression (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:418:14)
    at CodeGenerator.print (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:607:46)
    at CodeGenerator.CallStatement (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:113:14)
    at CodeGenerator.print (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:607:46)
    at CodeGenerator.printJoin (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:643:14)
    at CodeGenerator.printSequence (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:661:19)
    at CodeGenerator.FunctionExpression (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:462:16)
    at CodeGenerator.print (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:607:46)
    at CodeGenerator.TableKeyString (/usr/lib/node_modules/laux-compiler/dist/codegenerator.js:539:14)

Node.js v19.8.1

And after miraculously fixing it, an other problem came up.

Problem 2

When running lauxc ... the build runs but gets stuck exemple :

LAUX COPIED atlasui/libs/configurator/ui/inputs/toggle.lua
LAUX COPIED atlasui/libs/configurator/ui/entities/entity.lua
LAUX COPIED atlasui/libs/configurator/ui/entities/entity_grid.lua
LAUX COPIED atlasui/libs/configurator/ui/entities/entity_list.lua
LAUX COPIED atlasui/libs/configurator/ui/entities/entity_list_row.lua
LAUX COPIED atlasui/libs/configurator/ui/entities/row.lua
LAUX COPIED atlasui/libs/configurator/ui/entities/row_settings.lua
LAUX COPIED atlasui/libs/configurator/ui/entities/settings_base.lua

and generates the correct files but they are empty, the file tree is good but not the content. ecept that for each .laux file 2 .lua files are generated one in the same directory as the .laux and one in the new lua/ folder.

Note

When saving a .laux file :

LAUX CHANGE atlasui/core/ui/main.lua 287.334ms
LAUX CHANGE atlasui/core/ui/tab.lua 483.888ms

the related file in the lua/ folder. is updated and filled up with the compiled code :+1: but the rest are still empty.

PS: I run Manjaro (based on Arch) if it can help troubleshoot

8char commented 1 year ago

Hello there! Sorry for the delay in getting back to you, but I wanted to let you know that I've just released a fix for the problem with the TableSpreadExpression not being recognized. If you're still experiencing any difficulties, please don't hesitate to open another issue, and I'll be more than happy to take a look at it.

Thank you for bringing this matter to my attention!

avivi55 commented 1 year ago

Thank you so much, i'll look at it as soon as possible.

avivi55 commented 1 year ago

Just letting you know that everything is working now. :+1: