snaggle --inplace#62
Merged
Merged
Conversation
Reviewer's GuideThis PR adds a new "inplace" mode to Snaggle—skipping linkage of the base ELF—by refactoring the API to accept variadic options, wiring the new flag through the CLI, updating tests to cover both default and inplace modes, and introducing directory‐contents assertions to validate outputs. Sequence diagram for Snaggle CLI execution with and without --inplacesequenceDiagram
actor User
participant CLI
participant Snaggle
User->>CLI: Run 'snaggle <file> <root>'
CLI->>Snaggle: Snaggle(path, root)
Snaggle->>Snaggle: Link base ELF, dependencies, interpreter
User->>CLI: Run 'snaggle <file> <root> --inplace'
CLI->>Snaggle: Snaggle(path, root, Inplace())
Snaggle->>Snaggle: Only link dependencies and interpreter
Class diagram for new options and option pattern in SnaggleclassDiagram
class options {
+bool inplace
}
class option {
<<function>>
+apply(*options)
}
class Snaggle {
+Snaggle(path string, root string, opts ...option) error
}
class Inplace {
<<function>>
+Inplace() option
}
Snaggle --> options
option --> options
Inplace --> option
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #62 +/- ##
==========================================
+ Coverage 74.35% 75.05% +0.70%
==========================================
Files 8 8
Lines 425 449 +24
==========================================
+ Hits 316 337 +21
- Misses 77 80 +3
Partials 32 32 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #57
Summary by Sourcery
Support an inplace snaggling mode that skips linking the original ELF by adding an --inplace flag and programmatic Inplace() option, and update code and tests to validate both default and inplace behaviors
New Features:
Enhancements:
Tests: