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

feat: never build twice #490

Merged
merged 15 commits into from
Jan 17, 2025
Merged

feat: never build twice #490

merged 15 commits into from
Jan 17, 2025

Conversation

RomainMuller
Copy link
Contributor

Adds a new jobserver message to track ongoing compilation tasks, so that duplicates can be completely avoided by re-using the first build task's outcome. This allows de-duplicating builds even if an injected package is already present in the natural dependency closure of the package being built.

Fixes #430

Adds a new jobserver message to track ongoing compilation tasks, so that
duplicates can be completely avoided by re-using the first build task's
outcome. This allows de-duplicating builds even if an injected package
is already present in the natural dependency closure of the package
being built.

Fixes #430
@RomainMuller RomainMuller requested a review from a team as a code owner January 7, 2025 14:10
@RomainMuller RomainMuller force-pushed the romain.marcadier/full-dedupe branch 4 times, most recently from 4911acb to a903aca Compare January 8, 2025 17:11
@RomainMuller RomainMuller force-pushed the romain.marcadier/full-dedupe branch from a903aca to 7a31f03 Compare January 8, 2025 17:25
@RomainMuller RomainMuller enabled auto-merge January 9, 2025 11:16
@RomainMuller RomainMuller force-pushed the romain.marcadier/full-dedupe branch from b82c2b2 to d817790 Compare January 16, 2025 10:50
…-dedupe

# Conflicts:
#	internal/cmd/toolexec.go
#	internal/toolexec/aspect/oncompile.go
#	internal/toolexec/proxy/compile.go
#	internal/toolexec/proxy/proxy.go
@RomainMuller RomainMuller force-pushed the romain.marcadier/full-dedupe branch from 0bc878b to 96dc50e Compare January 16, 2025 14:06
@RomainMuller RomainMuller added this pull request to the merge queue Jan 17, 2025
Merged via the queue into main with commit c9e1cd7 Jan 17, 2025
39 checks passed
@RomainMuller RomainMuller deleted the romain.marcadier/full-dedupe branch January 17, 2025 09:18
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 70 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@c163726). Learn more about missing BASE report.
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/toolexec/proxy/compile.go 68.25% 10 Missing and 10 partials ⚠️
internal/jobserver/nbt/nbt.go 82.65% 11 Missing and 6 partials ⚠️
internal/cmd/toolexec.go 44.82% 8 Missing and 8 partials ⚠️
internal/files/files.go 80.00% 2 Missing and 2 partials ⚠️
internal/jobserver/server.go 63.63% 2 Missing and 2 partials ⚠️
internal/toolexec/aspect/oncompile.go 55.55% 2 Missing and 2 partials ⚠️
internal/goflags/flags.go 92.30% 1 Missing ⚠️
internal/jobserver/buildid/version.go 66.66% 1 Missing ⚠️
internal/jobserver/pkgs/resolve.go 75.00% 1 Missing ⚠️
internal/toolexec/aspect/resolve.go 50.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #490   +/-   ##
=======================================
  Coverage        ?   65.00%           
=======================================
  Files           ?      188           
  Lines           ?    11582           
  Branches        ?        0           
=======================================
  Hits            ?     7529           
  Misses          ?     3477           
  Partials        ?      576           
Components Coverage Δ
Generators 76.15% <ø> (?)
Instruments 73.41% <ø> (?)
Go Driver 78.29% <92.30%> (?)
Toolexec Driver 73.72% <71.26%> (?)
Aspects 80.10% <ø> (?)
Injector 78.17% <ø> (?)
Job Server 70.68% <81.60%> (?)
Integration Test Suite 57.58% <ø> (?)
Other 65.00% <75.00%> (?)
Files with missing lines Coverage Δ
internal/cmd/server.go 18.01% <100.00%> (ø)
internal/jobserver/client/client.go 57.89% <100.00%> (ø)
internal/jobserver/client/env.go 71.21% <100.00%> (ø)
internal/jobserver/common/handler.go 50.00% <100.00%> (ø)
internal/toolexec/proxy/compile.flags.go 100.00% <100.00%> (ø)
internal/toolexec/proxy/link.go 57.14% <100.00%> (ø)
internal/toolexec/proxy/parse.go 78.94% <100.00%> (ø)
internal/toolexec/proxy/proxy.go 74.13% <100.00%> (ø)
internal/toolexec/version.go 50.00% <100.00%> (ø)
internal/goflags/flags.go 79.37% <92.30%> (ø)
... and 10 more

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.

[BUG] Packages may be (unnecessarily) built multiple times
2 participants