Skip to content

build: support system libgit2 1.9 and OpenSSL 4 - #259

Open
chenrui333 wants to merge 1 commit into
prooflinedev:mainfrom
chenrui333:fix-system-git2-openssl
Open

chenrui333 wants to merge 1 commit into
prooflinedev:mainfrom
chenrui333:fix-system-git2-openssl

Conversation

@chenrui333

Copy link
Copy Markdown

Summary

  • Update git2 to 0.20.4 and lock libgit2-sys 0.18.8+1.9.7 so packagers can use system libgit2 1.9.
  • Update locked openssl-sys to 0.9.118 for system OpenSSL 4 support.
  • Retain the existing vendored OpenSSL feature and default build behavior; no unrelated dependency updates.

Notes

Reproduced both failures on macOS arm64: openssl-sys 0.9.109 rejects OpenSSL 4.1.0; after updating openssl-sys, libgit2-sys rejects system libgit2 1.9.7 because it requires < 1.8.0.

With this change, all 53 tests in repository_test and priority_test pass using cargo test --locked --test repository_test --test priority_test with LIBGIT2_NO_VENDOR=1, OPENSSL_NO_VENDOR=1, and system libgit2 1.9.7 / OpenSSL 4.1.0.

References

Fixes #258. Related to Homebrew/homebrew-core#325709. The broader dependency update in #249 also proposes git2 0.20.4; this isolates the native-library compatibility changes.

Update git2 to 0.20.4, libgit2-sys to 0.18.8+1.9.7, and openssl-sys to 0.9.118 while retaining vendored-build defaults.
Fixes prooflinedev#258
Signed-off-by: Rui Chen <rui@chenrui.dev>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T16:20:46.100187Z 9588c24 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

yek/src/parallel.rs

Lines 185 to 186 in 9588c24

// Check if file should be ignored
if self.should_ignore_file(file_path, &rel_path) {

P1 Badge Preserve Gitignore matching for individually supplied files

When an input resolves to an individual file, including through a glob or stdin, this path now uses should_ignore_file, which only matches configuration globs against the full path and never loads the parent's .gitignore. Consequently, an absolute path to a text .env file misses the built-in .env* pattern, and files excluded only by .gitignore are also serialized. The previous single-file implementation used GitignoreBuilder, so this regression can include ignored secrets in output. Preserve that matcher, including basename matching and negation, for individual-file inputs.


match fs::copy(&new_binary, &current_exe) {

P1 Badge Replace the running executable via an atomic rename

On Linux, an update that reaches installation fails because fs::copy opens the running executable for writing, which the kernel rejects with ETXTBSY (Text file busy). I reproduced this exact standard-library operation locally. Thus the new updater can download and extract a newer release but cannot install it on Linux; the rollback copy targets the same running inode. Stage the replacement beside the installed binary and atomically rename it into place instead of overwriting the executing inode.


let asset_name = format!("yek-{}.tar.gz", target);

P2 Badge Select the Windows archive format in the updater

On Windows, this constructs a .tar.gz asset name, but the release build matrix publishes Windows artifacts as .zip files (.github/workflows/build.yml:40-45), matching the PowerShell installer. Therefore extract_download_url cannot find the requested asset and every Windows update exits before installation. Select the archive format by platform and use the corresponding extraction and yek.exe path.


_boost_map: &HashMap<String, i32>,

P2 Badge Carry the supplied Git boosts into the new processor

When the caller supplies nonzero recentness boosts, this bridge now discards the map and constructs RepositoryInfo with empty commit_times. The replacement priority calculation only consults that empty map, so no Git boost can reach a processed file, whereas both previous processing branches applied the supplied boosts. This also affects serialize_repo when its combined history produces different timestamps, such as inputs from multiple repositories with different HEAD dates. Preserve the precomputed boosts or populate equivalent repository information before processing.


yek/src/lib.rs

Lines 260 to 261 in 9588c24

if config.tree_header {
Ok(format!("{}{}", tree_header, main_content))

P2 Badge Enforce the output cap on the tree header itself

When the rendered tree alone exceeds --max-size or --tokens, adding its size to accumulated only prevents file contents from being included; this return still emits the entire oversized header. For example, the actual tree renderer produces a 2,637-byte header for 100 short filenames, so --tree-header --max-size 1KB exceeds the limit even with no file contents included. Budget or trim the tree itself, or report that it cannot fit, instead of returning output above the requested cap.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mohsen1

mohsen1 commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

@prooflinedev review

1 similar comment

mohsen1 commented Nov 15, 2026

Copy link
Copy Markdown
Member

@prooflinedev review

@prooflinedev

prooflinedev Bot commented Nov 15, 2026

Copy link
Copy Markdown

A full review of 9588c24b24fb is running; the Proofline check on that commit reports its progress and result.

View review in Proofline

mohsen1 commented Nov 17, 2026

Copy link
Copy Markdown
Member

Codex

The dependency update is focused, but coverage and benchmark jobs fail when checking out the fork-only branch fix-system-git2-openssl. Please make those comparison jobs fetch/check out the exact PR commit, passing the ref through a quoted environment variable, then rerun them. This is a CI checkout blocker; the earlier automated findings reference source files unchanged by this PR.

orshih6 added a commit to orshih6/yek that referenced this pull request Nov 19, 2026
On a fork PR the head branch exists only in the fork, so
'git checkout <head_ref>' failed with 'pathspec did not match' and the
coverage and benchmark jobs failed for every outside contributor (prooflinedev#259
too). Return to $GITHUB_SHA, the commit actions/checkout already fetched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

Locked dependencies prevent builds with system OpenSSL 4 and libgit2 1.9

2 participants