guida-lang / compiler

Guida is a functional programming language that builds upon the solid foundation of Elm, offering backward compatibility with all existing Elm 0.19.1 projects
https://guida-lang.org
Other
41 stars 2 forks source link

Compiling package's gets stuck at verifying dependencies #18

Closed MartinSStewart closed 2 months ago

MartinSStewart commented 2 months ago

If I create a simple package, for example

module MyPackage exposing (a)

{-|
@docs a
-}

a : number
a =
    0

with no dependencies other than elm/core, it will get stuck at Verifying dependencies (7/8)

OS: Windows

MartinSStewart commented 2 months ago

Sorry, I had forgotten I had made some changes to the compiler before testing this. Removing those compiler changes fixes this issue. However, for a more complicated example I still have the same issue.

Specifically when I tried compiling this package https://github.com/MartinSStewart/elm-audio/blob/4.0.4/elm.json the compiler got stuck at Verifying dependencies (11/12)

decioferreira commented 2 months ago

Interesting, I thought that the compiler didn't support windows (relates to #1), could it be related to that?

decioferreira commented 2 months ago

I have tried running it on my mac and I also see the same issue. It seems to relate to elm-explorations/test 2.2.0, which doesn't seem to be able to create the file artifacts.json. Will continue investigating this. Thanks for the report 👍

decioferreira commented 2 months ago

It looks like the issue relates to this line: https://github.com/guida-lang/compiler/blob/master/builder/src/Elm/Details.elm#L799

It's erroring with the following issues:

This is probably related with #14.

MartinSStewart commented 2 months ago

It seems to work fine on Windows for the most part.

As for #14 I tried fixing it but was unsuccessful. Here's some related discussion https://github.com/miniBill/elm-unicode/issues/3?notification_referrer_id=NT_kwDOAE1WZ7MxMjM5ODgxMzgwMTo1MDY4Mzkx#issuecomment-2350953567

decioferreira commented 2 months ago

I've just added a few elm-tests for the Parse.Primitives.getCharWidth function, this should help verify a future fix. Also, @MartinSStewart with this commit you should now be able to compile the elm-audio package. can you give it a try?

thanks ❤️

MartinSStewart commented 2 months ago

I'm able to compile elm-audio on my Mac. But on Windows now nothing compiles. It gets stuck here

PS E:\repos\elm-compiler\examples> node --stack-size=8192 ../bin/guida.js src/Hello.elm
Compiled in DEBUG mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
MartinSStewart commented 2 months ago

If I revert to the old compiler version it still gets stuck now. Not sure what happened, will investigate.

MartinSStewart commented 2 months ago

Nevermind, it was a stupid mistake on my part (running bin/guida.js instead of bin/index.js). elm-audio compiles in Windows too!

decioferreira commented 2 months ago

Those are great news! Thanks for taking the time looking into this @MartinSStewart. I'll also make a note on #1 about it running on windows. Can we close this ticket in favour of #14?