Skip to content

feat(build): add release debuginfo profile - #333

Merged
vikrantpuppala merged 5 commits into
mainfrom
fix/332-release-debuginfo
Sep 10, 2026
Merged

vikrantpuppala merged 5 commits into
mainfrom
fix/332-release-debuginfo

Conversation

@vikrantpuppala

@vikrantpuppala vikrantpuppala commented Sep 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add an opt-in release-with-debuginfo Cargo profile that inherits release and changes only debug = 2
  • statically link a tiny native consumer and verify kernel-owned Rust function/source records in Linux .debug, macOS .dSYM, and Windows linker .pdb artifacts
  • verify ELF build IDs, Mach-O UUIDs, and PE/PDB CodeView identity while keeping private debug payloads separate from shipped binaries
  • document direct Cargo, parent-workspace, and Corrosion enablement plus platform packaging guidance

Test plan

  • pre-fix reproduction: cargo rustc --profile release-with-debuginfo rejects the undefined profile
  • Linux end-to-end staticlib link, split DWARF, source/function, strip, and build-ID smoke check
  • cargo +stable fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test (full suite, including doc tests; live E2Es remain ignored)
  • shell syntax and workflow YAML parsing
  • macOS dSYM smoke check (new PR workflow)
  • Windows linker PDB smoke check (new PR workflow)

Related-pattern audit

  • Corrosion already supports selecting a custom Cargo profile with PROFILE release-with-debuginfo; the exact downstream wiring is documented here and can land separately in ODBC/ADBC.
  • PyO3 and napi-rs are separate workspace roots that build their own dynamic artifacts, so they are outside this static-consumer change.

Closes #332

Add cross-platform staticlib symbol smoke checks and document separate symbol packaging and binary identity matching.

Refs #332

Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: 1 Low

Looks good — a clean build-profile + symbol-verification PR with no kernel logic changes. The release-with-debuginfo profile correctly overrides only debug (no [profile.release] strip override exists to erase it), the C consumer's NULL call to kernel_get_last_error is genuinely hermetic (src/c_abi/error.rs:106 returns false on null), and the header/source anchors the scripts grep for all exist. One low observation posted inline (no paths: gating means every PR runs the hosted-macOS + Windows jobs). Nit: the PowerShell script assigns $profile, which is case-insensitively the same slot as PowerShell's automatic $PROFILE variable — harmless in script scope but worth renaming (e.g. $profileName) to avoid shadowing.

Comment thread .github/workflows/release-debuginfo.yml Resolved
Apple DWARF stores source directories and filenames separately. Validate the named kernel function's DW_AT_decl_file instead of searching for a joined path string.

Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: 1 Low

Looks good — the Cargo profile (release-with-debuginfo inherits release, overrides only debug) is correct, and the smoke scripts' anchors are accurate: kernel_get_last_error lives in src/c_abi/error.rs, returns false on a null pointer (so the consumer's NULL call is genuinely hermetic), and include/databricks_kernel.h exists. One low note about CI scope/cost inline. Nit (summary-only): in .github/scripts/check-release-debuginfo.ps1 the local $profile assignment shadows PowerShell's automatic $PROFILE variable (case-insensitive); harmless here since the script never uses the profile path, but a differently-named variable (e.g. $profileName) would avoid the confusion.

Comment thread .github/workflows/release-debuginfo.yml Resolved
Keep the module-address conversion behavior unchanged while satisfying the function-casts-as-integer lint in current stable Rust.

Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No issues identified by the review bot.

Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verdict: 1 Low

Looks good — a well-scoped, well-tested build/CI addition. The only source-code change (src/c_abi/mod.rs) is a semantically-equivalent fn-pointer cast refactor, the new C consumer's kernel_get_last_error(NULL) is verified null-safe, and the release-with-debuginfo profile correctly overrides only debug (no custom [profile.release] exists to conflict). One low CI-cost note inline; nothing blocking.

Comment thread .github/workflows/release-debuginfo.yml Resolved
@vikrantpuppala
vikrantpuppala added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit a350e64 Sep 10, 2026
39 of 41 checks passed

This branch was previously deployed

1 inactive deployment
azure-prod — ae7cb5c4 Deployed Sep 10, 2026 by vikrantpuppala via followup #1344
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.

Add release debuginfo support for statically linked ODBC/ADBC consumers

2 participants