Skip to content

feat: make samply-codspeed a submodule rather than git rev with cargo#416

Merged
GuillaumeLagrange merged 1 commit into
mainfrom
samply-submodule
Jun 19, 2026
Merged

feat: make samply-codspeed a submodule rather than git rev with cargo#416
GuillaumeLagrange merged 1 commit into
mainfrom
samply-submodule

Conversation

@GuillaumeLagrange

Copy link
Copy Markdown
Contributor

Working locally with this was extremely annoying, and the script was actually a stupid workaround compared to just using a submodule.

@codspeed-hq

codspeed-hq Bot commented Jun 18, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 7 untouched benchmarks


Comparing samply-submodule (612399d) with main (2533b0c)

Open in CodSpeed

@greptile-apps

greptile-apps Bot commented Jun 18, 2026

Copy link
Copy Markdown

Greptile Summary

This PR replaces the Cargo git-rev dependency on samply-codspeed with a proper git submodule, making local development straightforward. The old scripts/samply-dev.sh workaround is deleted; the submodule is pinned to the exact same commit (81ba2c3) as the previous rev, so there is no behavior change at runtime.

  • Cargo.toml: samply dependency changes from git = …, rev = "81ba2c3" to path = "crates/samply-codspeed/samply", and the submodule directory is excluded from the workspace to avoid workspace conflicts.
  • Cargo.lock: Removes the git+… source annotations for all samply crates and downgrades several Windows transitive dependencies (0.61.2 → 0.60.2) as a result of Cargo re-resolving the path dependency.
  • .pre-commit-config.yaml: Adds pass_filenames: false to the cargo fmt hook (correct) but also drops --all, which narrows formatting coverage to the root package only.

Confidence Score: 5/5

Safe to merge — the submodule is pinned to the identical commit as the replaced Cargo rev, so no production behavior changes.

The structural change is correct: the path dependency, workspace exclude, and submodule commit all align perfectly with the old rev. The only notable deviation is the pre-commit fmt hook losing its --all flag, which is a local-developer tooling concern rather than a build or runtime issue.

.pre-commit-config.yaml — the fmt hook change warrants a quick look to confirm whether --all should be retained.

Important Files Changed

Filename Overview
.gitmodules Registers crates/samply-codspeed as a new git submodule pointing to the CodSpeedHQ/samply-codspeed repo
.pre-commit-config.yaml Removes --all from cargo fmt args and adds pass_filenames: false; --all removal means workspace crates under crates/* are no longer formatted by the hook
Cargo.toml Switches samply dependency from git rev to local path (submodule), adds workspace exclude for crates/samply-codspeed to avoid workspace conflicts
Cargo.lock Removes git source annotations for samply crates and downgrades windows-sys from 0.61.2→0.60.2 due to fresh path-dependency resolution
crates/samply-codspeed New git submodule pinned to the same commit (81ba2c3) as the previous Cargo git rev, ensuring no behavior change
scripts/samply-dev.sh Deleted script that was a workaround for local samply development; superseded by the submodule which makes local editing trivial

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph Before["Before (git rev dependency)"]
        A[Cargo.toml\nsamply git rev=81ba2c3] -->|cargo fetch| B[Cargo downloads\nsamply-codspeed\nfrom GitHub]
        B --> C[Build]
        D[scripts/samply-dev.sh] -->|patches Cargo.toml\nfor local dev| A
    end

    subgraph After["After (git submodule)"]
        E[.gitmodules\nsubmodule crates/samply-codspeed] -->|git submodule update| F[crates/samply-codspeed/\npinned @ 81ba2c3]
        G[Cargo.toml\nsamply path=crates/samply-codspeed/samply] -->|local path dep| F
        F --> H[Build]
    end

    Before -->|"PR #416"| After
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    subgraph Before["Before (git rev dependency)"]
        A[Cargo.toml\nsamply git rev=81ba2c3] -->|cargo fetch| B[Cargo downloads\nsamply-codspeed\nfrom GitHub]
        B --> C[Build]
        D[scripts/samply-dev.sh] -->|patches Cargo.toml\nfor local dev| A
    end

    subgraph After["After (git submodule)"]
        E[.gitmodules\nsubmodule crates/samply-codspeed] -->|git submodule update| F[crates/samply-codspeed/\npinned @ 81ba2c3]
        G[Cargo.toml\nsamply path=crates/samply-codspeed/samply] -->|local path dep| F
        F --> H[Build]
    end

    Before -->|"PR #416"| After
Loading

Reviews (2): Last reviewed commit: "feat: make samply-codspeed a submodule r..." | Re-trigger Greptile

Working locally with this was extremely annoying, and the script was
actually a stupid workaround compared to just using a submodule.
@GuillaumeLagrange GuillaumeLagrange merged commit 612399d into main Jun 19, 2026
22 checks passed
@GuillaumeLagrange GuillaumeLagrange deleted the samply-submodule branch June 19, 2026 10:44
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.

2 participants