-
Notifications
You must be signed in to change notification settings - Fork 34
Revert the addition of translate c usage #526
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
base: develop
Are you sure you want to change the base?
Revert the addition of translate c usage #526
Conversation
This because translate-c does not work with files outside of the source directory, and pydust.build.zig depends on it
|
Note: I made these changes in a single commit so it is easier to re-revert, but if need, I am happy to split into multiple commits! |
|
I am confused by this change - isn't @cimport going to go away and translate_c is going to be the only way forward? I would prefer to figure out a way to adjust the build script instead of relying on deprecated functionality. TranslateC is shipped as part of Zig compiler itself. I think the standard management practice for any c style dependencies is to import the header file you code against and then link as approriate against local build or a shared library. |
|
I see, had to read the upstream zig issue. We can merge this and go back to translatec with zig 0.16 |
Agreed, @robert3005. I believe this is the way to go in this case. |
|
I am investigating the problem in the CI, it looks like Python libraries are not properly installed maybe? I will research the diff between |
|
I have investigated this and tried to fix this for quite some time. It looks like that, for some reason, the Python library is not found during tests (and in the 0.26 release, I get the same error we have here locally). I am out of ideas to fix this, maybe awaiting for 0.16? I wonder if someone from the community or most recent contributors would know better than me (cc @jburgy @robert3005 @boisgera) Important: I believe this error started happening when - name: Run library tests
run: poetry run python -m ziglang build testwas added to |
Changes
Use
@cImportbecause translate-c does not work with files outside of the source directory, andpydust.build.zigdepends on it to work.The original changes were added in the commit 9fb5721, and that also removed
usingnamespace, so I was careful I did not re-add those.Notes
Discussions about this happened in the PR #500, where I got stuck with the usage of translate-c, so @jburgy listed 2 ways to fix that in this comment .
I decided to revert the change and use
@cImportagain because ziglang/translate-c does not have tagged releases and it targes latest Zig, even when unstable. It is worth keeping an eye on this library, though, we might want to use that in the future Zig releases.