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

Cannot build bun since meta.trait is removed in zig stg #7313

Open
bonyuta0204 opened this issue Nov 25, 2023 · 3 comments
Open

Cannot build bun since meta.trait is removed in zig stg #7313

bonyuta0204 opened this issue Nov 25, 2023 · 3 comments
Labels
chore Task to improve the repository

Comments

@bonyuta0204
Copy link

What version of Bun is running?

1.0.8

What platform is your computer?

Darwin 22.5.0 x86_64 i386

What steps can reproduce the bug?

  • zig version: 0.12.0-dev.1718+3acb0e30a
  • step to reproduce
    • run bun setup

What is the expected behavior?

the compile should be succded

What do you see instead?

bun cannot be succesfully built with zig 0.12.0-dev.1718+3acb0e30a.

This error occurs in many files.

src/bun.js/base.zig:86:35: error: root struct of file 'meta' has no member named 'trait'
            if (comptime std.meta.trait.isNumber(Type)) {

Additional information

It appears that meta.trait is removed from zig stg in ziglang/zig#18061.

@bonyuta0204 bonyuta0204 added the bug Something isn't working label Nov 25, 2023
@Electroid Electroid added chore Task to improve the repository and removed bug Something isn't working labels Nov 27, 2023
@paperdave
Copy link
Member

we do need to fix this, but bun right now must be build with 0.12.0-dev.1604+caae40c21.

@wrongnull
Copy link

we do need to fix this, but bun right now must be build with 0.12.0-dev.1604+caae40c21.

There is currently third-party package that has exactly the same functions (see last comment from pull request conversation)

@paperdave
Copy link
Member

i think we should just copy the functions we use into bun, and consider removing them if possible. there was a reason std.meta.trait was removed and i mostly agree with it's reasoning.

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

No branches or pull requests

4 participants