Skip to content

Hide test binaries behind a feature flag #23

Description

@yusufraji

split-patch now has two rust binaries used in tests. This number could increase in the future. And it is possible that the binaries are made available to any installs split-patch via cargo install.

This is discussed in #21 (comment)

Hiding test binaries under a feature flag could prevent them from being bundled with the default split-patch. Should also make the binary theoretically smaller.

Activity

  1. pflanze commented on Aug 15, 2026

    @pflanze
    Contributor

    This is only a possibility if the alternatives don't work. I'd try to avoid complicating the project with features that have followup complications. Thus first test:

    • if "cargo install split-patch" (and we haven't even published it yet) doesn't do the right thing of only installing the binary under src/bin/ (remember I haven't verified)
    • Then, given that we want to document in the README that it should probably be "cargo install --locked split-patch" anyway, whether just also adding "--bin split-patch" is really so bad.
    • Then, we could also move the test infrastructure binaries to a separate crate. This is likely better than the feature flag.
  2. pflanze commented on Aug 15, 2026

    @pflanze
    Contributor

    Should also make the binary theoretically smaller

    Each binary is compiled separately, so it will have no effect on the size of split-patch binary if that's what you meant.

  3. pflanze commented on Aug 15, 2026

    @pflanze
    Contributor

    So I suggest to do in order:

    1. Move main crate to a subdir, too (Move split-patch crate to a subdir, too #14)
    2. Implement workspace (Configure workspaces #10)
    3. Decide on license for the split-patch crate together (Add license to the split-patch crate #11), publish on crates.io
    4. Test what cargo install does, decide what to do about it.
  4. yusufraji commented on Aug 15, 2026

    @yusufraji
    CollaboratorAuthor

    Should also make the binary theoretically smaller

    Each binary is compiled separately, so it will have no effect on the size of split-patch binary if that's what you meant.

    Yes, that's what I meant. It should be alright in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions