Skip to content

Conversation

@johnbcodes
Copy link
Contributor

@johnbcodes johnbcodes commented Sep 20, 2023

Description

Zig recently introduced a change to prevent C variable names conflicting with type names that I think is the reason compilation started to fail a few days ago. I don't understand the change enough to evaluate whether the result of sqlite3_index_constraint_usage being mangled to struct_sqlite3_index_constraint_usage_4 is valid, but my change fixes the build.

Checklist

  • I added tests for my changes and they pass

No additional code so I didn't change the tests. Note that I can't get tests to run on my local machine as discussed previously but I no longer get errors compiling. Update: With #134 all tests pass on Mac OS X with this change.

@johnbcodes johnbcodes mentioned this pull request Sep 20, 2023
1 task
@vrischmann
Copy link
Owner

Thanks ! I'm not sure if the mangling is expected here but I don't have the time to dig deeper right now, so this fix is fine for me.

@vrischmann vrischmann merged commit 60f7759 into vrischmann:master Sep 20, 2023
@johnbcodes
Copy link
Contributor Author

johnbcodes commented Sep 20, 2023

Looks like this isn't the end of this. In the latest build the Linux step has failures on the updated name:

/home/runner/work/zig-sqlite/zig-sqlite/zig-cache/o/1d89e7d91170a50b500bd328be51c64b/cimport.zig:1356:67: note: called from here
vtab.zig:235:34: error: root struct of file '.home.runner.work.zig-sqlite.zig-sqlite.zig-cache.o.1d89e7d91170a50b500bd328be51c64b.cimport' has no member named 'struct_sqlite3_index_constraint_usage_4'
vtab.zig:235:34: error: root struct of file '.home.runner.work.zig-sqlite.zig-sqlite.zig-cache.o.0a5ce126024b37aaeb18f9cd8de97216.cimport' has no member named 'struct_sqlite3_index_constraint_usage_4'
vtab.zig:235:34: error: root struct of file '.home.runner.work.zig-sqlite.zig-sqlite.zig-cache.o.fe0b1d530a3ec6a11431b8fa6f3a780d.cimport' has no member named 'struct_sqlite3_index_constraint_usage_4'
vtab.zig:235:34: error: root struct of file '.home.runner.work.zig-sqlite.zig-sqlite.zig-cache.o.488cb338597fd0c7228241b5321547a0.cimport' has no member named 'struct_sqlite3_index_constraint_usage_4'

@johnbcodes johnbcodes deleted the fix-build branch September 20, 2023 16:28
@vrischmann
Copy link
Owner

Maybe the name gets mangled differently based on the platform or something.

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.

2 participants