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

[c_api] Public API for DSLX to IR w/ warning knobs. #1915

Conversation

cdleary
Copy link
Collaborator

@cdleary cdleary commented Feb 7, 2025

Keeps the prior C APIs but adds the versions that take warning parameters as well.

Note that the /public C++ API/ is changed so that we can consolidate a bit vs having APIs with tons of parameters on that side of the equation -- we're not going for a flat "C ABI style" design there. This will require a global check on import.

Adds:

  • xls_convert_dslx_path_to_ir_with_warnings to supplement xls_convert_dslx_path_to_ir
  • xls_convert_dslx_to_ir_with_warnings to supplement xls_convert_dslx_to_ir
  • xls_c_strs_free to free the dynamically sized warnings array that can be returned from the API

@cdleary cdleary changed the title [c_api] Public API for DSLX steps w/ warning knobs. [c_api] Public API for DSLX to IR w/ warning knobs. Feb 7, 2025
@cdleary cdleary force-pushed the cdleary/2025-02-06-warnings-passed-to-c-api branch 2 times, most recently from 9a13f46 to ca4c7d8 Compare February 7, 2025 07:24
@cdleary cdleary marked this pull request as ready for review February 7, 2025 08:24
xls/public/c_api.h Show resolved Hide resolved
xls/public/c_api_impl_helpers.h Outdated Show resolved Hide resolved
xls/public/c_api_impl_helpers.cc Show resolved Hide resolved
xls/public/c_api.cc Outdated Show resolved Hide resolved
@cdleary cdleary force-pushed the cdleary/2025-02-06-warnings-passed-to-c-api branch from ca4c7d8 to 1fa1376 Compare February 12, 2025 17:21
xls/public/c_api.cc Outdated Show resolved Hide resolved
xls/public/c_api.cc Outdated Show resolved Hide resolved
@cdleary cdleary force-pushed the cdleary/2025-02-06-warnings-passed-to-c-api branch 2 times, most recently from df58075 to 0208954 Compare February 12, 2025 17:59
Exposes warning data through the C API boundary.
@cdleary cdleary force-pushed the cdleary/2025-02-06-warnings-passed-to-c-api branch from 0208954 to a76e87f Compare February 12, 2025 18:00
@cdleary cdleary requested a review from grebe February 12, 2025 18:01
@cdleary
Copy link
Collaborator Author

cdleary commented Feb 12, 2025

All comments addressed now, thanks.

@copybara-service copybara-service bot merged commit 0b287cb into google:main Feb 14, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants