Skip to content

Updating build.zig to support new API change. #177

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

Merged
merged 2 commits into from
Feb 4, 2023
Merged

Updating build.zig to support new API change. #177

merged 2 commits into from
Feb 4, 2023

Conversation

DameonSmith
Copy link
Contributor

I updated zig today and the addExecutable API appears to have changed with it. I was able to get the build to run again with this change.

I updated zig today and the addExecutable API appears to have changed with it. I was able to get the build to run again with this change.
@chrboesch
Copy link
Collaborator

I can't find any mistake.

@chrboesch
Copy link
Collaborator

...and the addExecutable API appears to have changed with it.

If you compare the zig versions, you can see that there were no changes in this function:

https://ziglang.org/documentation/0.10.1/std/src/build.zig.html#L277

https://ziglang.org/documentation/master/std/src/build.zig.html#L384

@chrboesch chrboesch closed this Feb 2, 2023
@DameonSmith
Copy link
Contributor Author

It's in this commit that was merged into main 2 days ago:
ziglang/zig@efa25e7#diff-355d0d5a29153bf7f7f73e8e64f0b467b26b2c37e824dcc47e872038a58ce855R436

New function definition is on like 436 of std/Build.zig

There's quite a few examples of the new config formatting in there. I'm just running the version of zig built by MacOS Brew. 0.11.0-dev.1540+304420b99

@boberhaus
Copy link

+1

PR calls it out explicitly: ziglang/zig#14498

benoberhaus@Bens-MBP ziglings % zig version
0.11.0-dev.1557+03cdb4fb5
benoberhaus@Bens-MBP ziglings % zig build
/Users/benoberhaus/Desktop/Coding/ziglings/build.zig:567:29: error: member function expected 1 argument(s), found 2
const build_step = b.addExecutable(base_name, file_path);
~^~~~~~~~~~~~~~
/Users/benoberhaus/Desktop/Coding/zig/lib/std/Build.zig:436:5: note: function declared here
pub fn addExecutable(b: *Build, options: ExecutableOptions) *CompileStep {

referenced by:
    runBuild__anon_6059: /Users/benoberhaus/Desktop/Coding/zig/lib/std/Build.zig:1525:27
    usage__anon_4896: /Users/benoberhaus/Desktop/Coding/zig/lib/build_runner.zig:239:20
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

@chrboesch
Copy link
Collaborator

We are sorry but since they release new dev versions every few days, we can not make a new ziglings version in the same frequency. There are a lot of testing to make everything stable. The zig foundation is growing as sponsorship has increased, and now they have more fulltime devolopers. This means that the frequency of new versions will also increase, which we very much welcome. But we do not have the possibility to keep up with the pace if the quality is not to suffer. However, since ziglings is primarily for learning and understanding the zig language, we need to think about what to do. Maybe it's time to switch to the stable dev version of zig.

@chrboesch chrboesch reopened this Feb 4, 2023
Copy link
Collaborator

@chrboesch chrboesch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build number added

@chrboesch chrboesch merged commit 2e80625 into ratfactor:main Feb 4, 2023
vamega pushed a commit to vamega/ziglings that referenced this pull request Jul 25, 2023
Updating build.zig to support new API change.
fleimgruber pushed a commit to fleimgruber/ziglings that referenced this pull request Oct 26, 2023
Updating build.zig to support new API change.
EchoPouet pushed a commit to EchoPouet/ziglings that referenced this pull request Nov 25, 2024
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

Successfully merging this pull request may close these issues.

3 participants