Musenik
February 28, 2023, 10:08pm
1
I did a fresh download of Defold.
Created a new Empty Project.
Added dependencies for the LPeg and Narrator assets.
I fetched the libraries.
The game runs in debug.
When I tried to bundle the project into a MacOS app, the process fails with the error:
The module ‘/LPeg.lua’ can’t be found.
Is the asset no longer usable?
What am I doing wrong?
britzl
March 1, 2023, 6:56am
2
What if you open the LPeg extension in Defold? Does the included example build?
I have a memory of this happening when I switched to 1.4 Defold. I’m going to try it with last, 1.3.x.
I can’t download any version earlier than 1.3.6. I know I was making builds of a game that used LPeg, last year.
Potota
March 1, 2023, 6:02pm
5
Looks like there was a new module added recently that tries to require("lpeg")
which fails because that doesn’t work on native extensions. Does it work if you use the previous version ?
2 Likes
I’ll try that. Thanks.
It’s easy to forget about how the on-demand libraries can suddenly undermine your game.
britzl
March 1, 2023, 10:09pm
7
It’s also very easy to avoid by depending on a specific version of a dependency instead of the latest one
Ah, but each asset page suggests and assists in setting a dynamic dependency. None point to a fine list of builds, such as the wonderful URL that you kindly provided.
So version 1.0.2 builds correctly on MacOS.
Now I will pray that Narrator doesn’t depend upon the 1.0.3 LPeg…
britzl
March 2, 2023, 6:51am
10
You’re right. We should promote this more.
1 Like
britzl
March 2, 2023, 2:48pm
11
The asset pages now clearly link to the releases page for GitHub hosted assets:
2 Likes
Workaround - just add empty “lpeg.lua” file to your project.
Better approach - ask @astrochili to fix it
1 Like
britzl
March 4, 2023, 11:17am
13
Or the best solution: Submit a PR with the fix!
1 Like
The rule was “Don’t touch what works fine,” but I broke it. The update is ready .
The topic can be merged with LPeg - A pattern-matching library
4 Likes