Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(cargo): check in Cargo.lock #1434

Merged
merged 2 commits into from
Oct 20, 2024
Merged

chore(cargo): check in Cargo.lock #1434

merged 2 commits into from
Oct 20, 2024

Conversation

joshka
Copy link
Member

@joshka joshka commented Oct 19, 2024

When kept up to date, this makes it possible to build any git version
with the same versions of crates that were used for any version, without
it, you can only use the current versions. This makes bugs in semver
compatible code difficult to detect.

The Cargo.lock file is not used by downstream consumers of the crate, so
it is safe to include it in the repository (and recommended by the Rust
docs).

This helps with issue #1433.

When kept up to date, this makes it possible to build any git version
with the same versions of crates that were used for any version, without
it, you can only use the current versions. This makes bugs in semver
compatible code difficult to detect.

The Cargo.lock file is not used by downstream consumers of the crate, so
it is safe to include it in the repository (and recommended by the Rust
docs).

This helps with issue <#1433>.
@joshka joshka requested a review from a team as a code owner October 19, 2024 17:56
Copy link

github-actions bot commented Oct 19, 2024

🐰 Bencher Report

Branch1434/merge
Testbedubuntu-latest

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
barchart/render/2048📈 view plot
⚠️ NO THRESHOLD
195,470.00
barchart/render/256📈 view plot
⚠️ NO THRESHOLD
128,770.00
barchart/render/64📈 view plot
⚠️ NO THRESHOLD
84,435.00
barchart/render_grouped/2048📈 view plot
⚠️ NO THRESHOLD
340,540.00
barchart/render_grouped/256📈 view plot
⚠️ NO THRESHOLD
139,260.00
barchart/render_grouped/64📈 view plot
⚠️ NO THRESHOLD
127,120.00
barchart/render_horizontal/2048📈 view plot
⚠️ NO THRESHOLD
164,880.00
barchart/render_horizontal/256📈 view plot
⚠️ NO THRESHOLD
84,170.00
barchart/render_horizontal/64📈 view plot
⚠️ NO THRESHOLD
77,024.00
block/render_all_feature/100x50📈 view plot
⚠️ NO THRESHOLD
11,306.00
block/render_all_feature/200x50📈 view plot
⚠️ NO THRESHOLD
19,923.00
block/render_all_feature/256x256📈 view plot
⚠️ NO THRESHOLD
94,105.00
block/render_empty/100x50📈 view plot
⚠️ NO THRESHOLD
6,124.90
block/render_empty/200x50📈 view plot
⚠️ NO THRESHOLD
12,238.00
block/render_empty/256x256📈 view plot
⚠️ NO THRESHOLD
79,485.00
buffer/empty/16📈 view plot
⚠️ NO THRESHOLD
793.35
buffer/empty/255📈 view plot
⚠️ NO THRESHOLD
220,900.00
buffer/empty/64📈 view plot
⚠️ NO THRESHOLD
13,330.00
buffer/filled/16📈 view plot
⚠️ NO THRESHOLD
779.74
buffer/filled/255📈 view plot
⚠️ NO THRESHOLD
218,200.00
buffer/filled/64📈 view plot
⚠️ NO THRESHOLD
13,077.00
buffer/with_lines/16📈 view plot
⚠️ NO THRESHOLD
14,059.00
buffer/with_lines/255📈 view plot
⚠️ NO THRESHOLD
12,724.00
buffer/with_lines/64📈 view plot
⚠️ NO THRESHOLD
14,893.00
line_render/Center/0📈 view plot
⚠️ NO THRESHOLD
4.02
line_render/Center/10📈 view plot
⚠️ NO THRESHOLD
633.26
line_render/Center/3📈 view plot
⚠️ NO THRESHOLD
297.26
line_render/Center/4📈 view plot
⚠️ NO THRESHOLD
343.82
line_render/Center/42📈 view plot
⚠️ NO THRESHOLD
839.88
line_render/Center/6📈 view plot
⚠️ NO THRESHOLD
402.61
line_render/Center/7📈 view plot
⚠️ NO THRESHOLD
456.46
line_render/Left/0📈 view plot
⚠️ NO THRESHOLD
4.02
line_render/Left/10📈 view plot
⚠️ NO THRESHOLD
592.51
line_render/Left/3📈 view plot
⚠️ NO THRESHOLD
226.31
line_render/Left/4📈 view plot
⚠️ NO THRESHOLD
241.28
line_render/Left/42📈 view plot
⚠️ NO THRESHOLD
839.47
line_render/Left/6📈 view plot
⚠️ NO THRESHOLD
386.07
line_render/Left/7📈 view plot
⚠️ NO THRESHOLD
403.07
line_render/Right/0📈 view plot
⚠️ NO THRESHOLD
4.02
line_render/Right/10📈 view plot
⚠️ NO THRESHOLD
564.54
line_render/Right/3📈 view plot
⚠️ NO THRESHOLD
280.69
line_render/Right/4📈 view plot
⚠️ NO THRESHOLD
336.41
line_render/Right/42📈 view plot
⚠️ NO THRESHOLD
840.37
line_render/Right/6📈 view plot
⚠️ NO THRESHOLD
446.31
line_render/Right/7📈 view plot
⚠️ NO THRESHOLD
503.09
list/render/16384📈 view plot
⚠️ NO THRESHOLD
1,204,600.00
list/render/2048📈 view plot
⚠️ NO THRESHOLD
325,350.00
list/render/64📈 view plot
⚠️ NO THRESHOLD
205,470.00
list/render_scroll_half/16384📈 view plot
⚠️ NO THRESHOLD
1,214,200.00
list/render_scroll_half/2048📈 view plot
⚠️ NO THRESHOLD
322,610.00
list/render_scroll_half/64📈 view plot
⚠️ NO THRESHOLD
133,090.00
paragraph/new/2048📈 view plot
⚠️ NO THRESHOLD
257,640.00
paragraph/new/64📈 view plot
⚠️ NO THRESHOLD
6,756.20
paragraph/new/65535📈 view plot
⚠️ NO THRESHOLD
8,124,300.00
paragraph/render/2048📈 view plot
⚠️ NO THRESHOLD
607,200.00
paragraph/render/64📈 view plot
⚠️ NO THRESHOLD
565,570.00
paragraph/render/65535📈 view plot
⚠️ NO THRESHOLD
1,706,200.00
paragraph/render_scroll_full/2048📈 view plot
⚠️ NO THRESHOLD
576,880.00
paragraph/render_scroll_full/64📈 view plot
⚠️ NO THRESHOLD
607,250.00
paragraph/render_scroll_full/65535📈 view plot
⚠️ NO THRESHOLD
1,684,400.00
paragraph/render_scroll_half/2048📈 view plot
⚠️ NO THRESHOLD
577,730.00
paragraph/render_scroll_half/64📈 view plot
⚠️ NO THRESHOLD
611,640.00
paragraph/render_scroll_half/65535📈 view plot
⚠️ NO THRESHOLD
1,687,000.00
paragraph/render_wrap/2048📈 view plot
⚠️ NO THRESHOLD
286,500.00
paragraph/render_wrap/64📈 view plot
⚠️ NO THRESHOLD
250,830.00
paragraph/render_wrap/65535📈 view plot
⚠️ NO THRESHOLD
1,498,700.00
paragraph/render_wrap_scroll_full/2048📈 view plot
⚠️ NO THRESHOLD
285,980.00
paragraph/render_wrap_scroll_full/64📈 view plot
⚠️ NO THRESHOLD
250,920.00
paragraph/render_wrap_scroll_full/65535📈 view plot
⚠️ NO THRESHOLD
1,506,700.00
rect/rect_columns_collect/16📈 view plot
⚠️ NO THRESHOLD
39.25
rect/rect_columns_collect/255📈 view plot
⚠️ NO THRESHOLD
294.39
rect/rect_columns_collect/64📈 view plot
⚠️ NO THRESHOLD
91.37
rect/rect_columns_iter/16📈 view plot
⚠️ NO THRESHOLD
10.09
rect/rect_columns_iter/255📈 view plot
⚠️ NO THRESHOLD
84.21
rect/rect_columns_iter/64📈 view plot
⚠️ NO THRESHOLD
26.13
rect/rect_positions_collect/16x16📈 view plot
⚠️ NO THRESHOLD
294.94
rect/rect_positions_collect/255x255📈 view plot
⚠️ NO THRESHOLD
60,577.00
rect/rect_positions_collect/64x64📈 view plot
⚠️ NO THRESHOLD
3,879.40
rect/rect_positions_iter/16x16📈 view plot
⚠️ NO THRESHOLD
248.44
rect/rect_positions_iter/255x255📈 view plot
⚠️ NO THRESHOLD
61,614.00
rect/rect_positions_iter/64x64📈 view plot
⚠️ NO THRESHOLD
3,816.60
rect/rect_rows_collect/16📈 view plot
⚠️ NO THRESHOLD
37.67
rect/rect_rows_collect/255📈 view plot
⚠️ NO THRESHOLD
255.82
rect/rect_rows_collect/64📈 view plot
⚠️ NO THRESHOLD
82.53
rect/rect_rows_iter/16📈 view plot
⚠️ NO THRESHOLD
7.94
rect/rect_rows_iter/255📈 view plot
⚠️ NO THRESHOLD
80.64
rect/rect_rows_iter/64📈 view plot
⚠️ NO THRESHOLD
21.54
sparkline/render/2048📈 view plot
⚠️ NO THRESHOLD
126,720.00
sparkline/render/256📈 view plot
⚠️ NO THRESHOLD
124,700.00
sparkline/render/64📈 view plot
⚠️ NO THRESHOLD
39,670.00
table/render/16384x2📈 view plot
⚠️ NO THRESHOLD
2,903,900.00
table/render/16384x4📈 view plot
⚠️ NO THRESHOLD
5,534,800.00
table/render/16384x8📈 view plot
⚠️ NO THRESHOLD
15,980,000.00
table/render/2048x2📈 view plot
⚠️ NO THRESHOLD
627,400.00
table/render/2048x4📈 view plot
⚠️ NO THRESHOLD
1,079,400.00
table/render/2048x8📈 view plot
⚠️ NO THRESHOLD
1,794,300.00
table/render/64x2📈 view plot
⚠️ NO THRESHOLD
320,520.00
table/render/64x4📈 view plot
⚠️ NO THRESHOLD
503,300.00
table/render/64x8📈 view plot
⚠️ NO THRESHOLD
575,880.00
table/render_scroll_half/16384x2📈 view plot
⚠️ NO THRESHOLD
2,884,000.00
table/render_scroll_half/16384x4📈 view plot
⚠️ NO THRESHOLD
5,527,600.00
table/render_scroll_half/16384x8📈 view plot
⚠️ NO THRESHOLD
18,149,000.00
table/render_scroll_half/2048x2📈 view plot
⚠️ NO THRESHOLD
640,310.00
table/render_scroll_half/2048x4📈 view plot
⚠️ NO THRESHOLD
1,086,200.00
table/render_scroll_half/2048x8📈 view plot
⚠️ NO THRESHOLD
1,779,900.00
table/render_scroll_half/64x2📈 view plot
⚠️ NO THRESHOLD
212,140.00
table/render_scroll_half/64x4📈 view plot
⚠️ NO THRESHOLD
334,180.00
table/render_scroll_half/64x8📈 view plot
⚠️ NO THRESHOLD
384,450.00
🐰 View full continuous benchmarking report in Bencher

@orhun
Copy link
Member

orhun commented Oct 19, 2024

I'm not sure about this.

and recommended by the Rust docs

Can you share some links to that? AFAIK libraries shouldn't commit Cargo.lock since it might cause problems with the crates.io package and so on. I need to dig up on my issue list to find an example of that.

@joshka
Copy link
Member Author

joshka commented Oct 20, 2024

https://doc.rust-lang.org/cargo/faq.html#why-have-cargolock-in-version-control
https://blog.rust-lang.org/2023/08/29/committing-lockfiles.html

Cargo.lock does not affect users of the library from crates.io one bit. Only cargo.toml does.

@orhun orhun changed the title chore: uningnore and add cargo.lock file chore(cargo): check in Cargo.lock Oct 20, 2024
@orhun orhun merged commit 6515097 into main Oct 20, 2024
37 of 38 checks passed
@orhun orhun deleted the jm/cargo-lock branch October 20, 2024 08:59
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