Skip to content
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

Compiling package's gets stuck at verifying dependencies #18

Closed
MartinSStewart opened this issue Sep 13, 2024 · 10 comments
Closed

Compiling package's gets stuck at verifying dependencies #18

MartinSStewart opened this issue Sep 13, 2024 · 10 comments

Comments

@MartinSStewart
Copy link

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
Copy link
Author

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
Copy link

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

@decioferreira
Copy link

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
Copy link

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:

  • Err (ParseError (Declarations (DeclDef "char" (DeclDefBody (Let (LetDef "emojiChar" (DefBody (List (ListExpr (Char (CharNotString 21) 551 19) 551 19) 551 19) 551 19) 551 19) 551 19) 551 19) 551 19) 551 19)) (relates to https://github.com/elm-explorations/test/blob/9669a27d84fc29175364c7a60d5d700771a2801e/src/Fuzz.elm#L550)
  • Err (ParseError (Declarations (DeclDef "barView" (DeclDefBody (Let (LetBody (String_ StringEndless_Single 157 64) 157 64) 157 64) 157 64) 157 64) 157 64))
  • Err (ParseError (Declarations (DeclDef "toLinesHelp" (DeclDefBody (Let (LetDef "bailOut" (DefBody (String_ StringEndless_Single 88 75) 88 75) 88 75) 88 75) 88 75) 88 75) 88 75))

This is probably related with #14.

@MartinSStewart
Copy link
Author

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 miniBill/elm-unicode#3

decioferreira added a commit that referenced this issue Sep 14, 2024
@decioferreira
Copy link

decioferreira commented Sep 14, 2024

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
Copy link
Author

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
Copy link
Author

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

@MartinSStewart
Copy link
Author

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
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants