Skip to content

Keep the dash when joining separated linker flags - #50

Open
OskarEichler wants to merge 2 commits into
ruby-gnome:mainfrom
OskarEichler:codex/preserve-separated-link-flags
Open

OskarEichler wants to merge 2 commits into
ruby-gnome:mainfrom
OskarEichler:codex/preserve-separated-link-flags

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Preserve -L and -l when joining their separated arguments, including tab and repeated-space separators.

Reproduction and verification

For a .pc file with Libs: -L /opt/lib -l foo, PackageConfig#libs currently returns L/opt/lib lfoo; both filtered libraries/path accessors are empty. The capture group drops the hyphen. Expected: -L/opt/lib -lfoo, with both accessors retaining their respective flags.

Five splitter cases and three public-accessor checks were exercised; baseline fails the three separated forms and three public checks, candidate passes.

Existing suite on Ruby 4.0.6 through rbenv: 27 tests, 31 assertions, zero failures/errors, two upstream macOS omissions, baseline and this isolated patch. Combined installed-release consumer also passes the suite, 1,098 focused/model checks, four process cases, five linker-option cases and four path cases. rbenv exec ruby test/run.rb runs the existing suite.

Compatibility and limitations

Malformed output becomes usable flags. Already-joined flags are unchanged. This patch does not implement quoted paths or otherwise rewrite linker parsing.

No tests were added or modified under the consuming repository's no-new-tests policy. Verification uses existing tests and external scratch reproductions. No production changes; older Ruby/Linux/Windows matrices await upstream CI. No unrelated version/dependency changes.

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.

1 participant