Closed joelcnz closed 10 months ago
Thanks for the report. I haven't tested it on MacOS but I just pushed a commit to test that on GitHub since I don't have access to a macbook.
Edit: reproduced here: https://github.com/azihassan/youtube-d/actions/runs/7411039217/job/20164659137?pr=48
I looked into it, and it turned out that one of the libraries failed to build under MacOS. Just merged a patch and it seems to be working now, at least on Github actions. Could you pull from main and try again?
I get the same errors. I tried the shell files, but didn't anywhere - command not found (used sudo on them).
Oh ok, I guess there's a mismatch in sed
between your version of MacOS and whichever one is used in GitHub actions.
In that case I would have to merge the fix into duktaped and wait for it to be deployed in code.dlang.org, or fork it and find a way to reference it in dub.json. I'll try implementing the second approach tomorrow but if all else fails, we could always resort to Docker.
This is a trick I do with my libraries (notice the '../'s):
"importPaths": [
"source",
"source/io",
"../JMiscLib/source",
],
"sourcePaths": [
"source",
"source/io",
"../JMiscLib/source",
]
TIL, thanks. I also found out dub supports local dependencies. But I couldn't get either of these two solutions to work unless I include duktaped's source code in the project, which I'm trying to avoid. In the end, I decided to fork duktaped and put the changes there, this way I can maintain both projects separately. This PR includes that change. Just merged it into main, let me know if it's still causing you trouble.
I still get the same errors. I used "duktaped": "*" -> 1.0.0
Hmm not sure what else it could be honestly. Maybe dub still references the previous duktaped version instead of the fork. Make sure dub.selections.json both point to the fork, and delete ../../../../.dub/packages/duktape
(or whichever folder holds the dub dependencies) to force a redownload and run dub clean
, then dub build --force
for good measure.
I've wiped duktape packages off, used clean and force flags - but I'm still getting the same errors.
../../../../.dub/packages/duktaped/1.0.0/duktaped/source/etc/c/duk_config.d(907,25): Error: undefined identifier `jmp_buf` ../../../../.dub/packages/duktaped/1.0.0/duktaped/source/etc/c/duk_config.d(908,20): Error: undefined identifier `setjmp` Error /Library/D/dmd/bin/dmd failed with exit code 1.
I'm confused why it says 1.0.0
I don't think dub's targeting the right version, my fork doesn't have anything in line 908: https://github.com/azihassan/duktaped/blob/c1f1939c8e62fbb4022050a0b3b1ba2164881067/source/duk_config.d#L908
What's inside your dub.json and dub.selections.json?
dub.json:
{
"authors": [
"Hassan Azi"
],
"copyright": "Copyright © 2023, Hassan Azi",
"dependencies": {
"htmld": "~>0.3.7",
"duktaped": "*"
},
"description": "Youtube downloader",
"license": "MIT",
"name": "youtube-d"
}
dub.selections.json:
{
"fileVersion": 1,
"versions": {
"duktaped": "1.0.0",
"htmld": "0.3.7"
}
}
It looks different from the ones in the main branch, try pulling from main since it includes the MacOS compatible version of duktaped
I don't understand how to pull from the main branch?
Not sure how your project copy is set up, but the easiest way would be to git clone
the project in another directory to automatically get the latest changes.
I don't understand how to pull from the main branch?
I'm not sure I follow, did the previous suggestion not work ?
I mean to look later. (I guess git clone (copied git link) would pull from the main).
I'm not getting those errors any more. I recloned it.
I'm on macOS.