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

Add locked to various cargo build invocations for desktop #7524

Merged
merged 4 commits into from
Jan 30, 2025

Conversation

faern
Copy link
Member

@faern faern commented Jan 24, 2025

We want to exit with an error if we try to produce a release build with an outdated lockfile. Such builds could be really hard to reproduce later, and is a supply chain risk. Being strict in CI is a good way of making sure we don't merge changes that require lockfile updates, but that were forgotten.


This change is Reviewable

dlon
dlon previously approved these changes Jan 27, 2025
Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @faern)


windows/nsis-plugins/src/log/log.vcxproj line 78 at r1 (raw file):

    </Link>
    <PreBuildEvent>
      <Command>powershell.exe -Command "&amp; { Remove-Item Env:VSTEL_MSBuildProjectFullPath; cargo build --target i686-pc-windows-msvc --release --locked -p mullvad-nsis }"

Same as above


windows/nsis-plugins/src/cleanup/cleanup.vcxproj line 78 at r1 (raw file):

    </Link>
    <PreBuildEvent>
      <Command>powershell.exe -Command "&amp; { Remove-Item Env:VSTEL_MSBuildProjectFullPath; cargo build --target i686-pc-windows-msvc --release --locked -p mullvad-nsis }"

This is actually the debug profile, even though the Rust code is always built in release mode. Is --locked needed?

Copy link
Contributor

@MarkusPettersson98 MarkusPettersson98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @faern)

Copy link
Member Author

@faern faern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


windows/nsis-plugins/src/cleanup/cleanup.vcxproj line 78 at r1 (raw file):

Previously, dlon (David Lönnhager) wrote…

This is actually the debug profile, even though the Rust code is always built in release mode. Is --locked needed?

The policy is that we should always use --locked when building artifacts that will be available to users or for internal testing. And from what I can find, we set the C++ profiles to Release when optimizations are enabled, which they always are on build servers. So it's fine to leave it out here. But it's a bit unclear connection between those. Would be easy to miss this special case if decided to not use optimizations on the build servers. But I guess we won't really.

Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@faern faern force-pushed the add-locked-to-cargo-build branch from c910f7a to 69154e0 Compare January 30, 2025 15:12
@faern faern force-pushed the add-locked-to-cargo-build branch from 69154e0 to 80583ad Compare January 30, 2025 15:48
@faern faern merged commit a07e803 into main Jan 30, 2025
34 checks passed
@faern faern deleted the add-locked-to-cargo-build branch January 30, 2025 15:49
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.

3 participants