Repository navigation
nvx-rs: version the nvx crate 0.1.0-alpha.3 and check it out with LF - #764
Merged
Merged
Conversation
The nvx 0.1.0-alpha.2 package was built from a working tree that core.autocrlf had checked out with CRLF line endings, and `cargo package` packs the working tree's bytes. 220 of its files therefore differ from the commit that its .cargo_vcs_info.json names, c9aa406, which stores them with LF, although Git reported the tree as clean. Builds are unaffected, since rustc reads CRLF sources as LF, but a consumer that checks the package against that commit rejects it. nvx-rs now checks out with LF on every platform, so a fresh checkout packs the bytes of its commit, and the crate moves to 0.1.0-alpha.3, to be published from such a checkout after this merges. aci_edge_sandboxes and aci_edge_sandboxes_model require the new version, and only nvx's version changes in the three lockfiles. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b4888b14-14ef-4313-98fd-052da6834405
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The version updates are consistent, the LF rule is narrowly scoped, and no unresolved correctness issues were identified.
No open issues 🎉
What changed in this PR
Prepares nvx 0.1.0-alpha.3 for publication and enforces LF checkouts for its source directory so packaged files match the referenced Git commit across platforms.
Changes:
- Adds a scoped LF checkout rule for
nvx-rs. - Bumps the crate and both sandbox dependency requirements to
0.1.0-alpha.3. - Synchronizes the
nvxversion in all three affected lockfiles.
| File | Description |
|---|---|
tests/runtime-adapter/Cargo.lock |
Updates the locked nvx version. |
nvx-rs/Cargo.toml |
Sets the crate version to 0.1.0-alpha.3. |
nvx-rs/Cargo.lock |
Updates the crate’s lockfile version. |
aci_edge_sandboxes/model/Cargo.toml |
Updates the model’s nvx requirement. |
aci_edge_sandboxes/Cargo.toml |
Updates the sandbox library’s nvx requirement. |
aci_edge_sandboxes/Cargo.lock |
Synchronizes the locked nvx version. |
.gitattributes |
Enforces LF for crate text files and explains why. |
Review effort: Balanced
nvx-rs now checks out with LF line endings on every platform, while the repository's LICENSE keeps the platform's, so on a Windows checkout with core.autocrlf the two copies of the same blob differ in their line endings and the byte comparison fails. Compare their text. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b4888b14-14ef-4313-98fd-052da6834405
Pedro Henrique Penna (ppenna)
approved these changes
Oct 22, 2026
Enrique Saurez (esaurez)
deleted the
esaurez/nvx-rs-alpha3-lf-20261022
branch
October 22, 2026 18:05
This was referenced Oct 22, 2026
longhun12346
pushed a commit
to longhun12346/nvx
that referenced
this pull request
Oct 27, 2026
The nvx crate has been published to crates.io by hand, without a written procedure, and 0.1.0-alpha.2 shows the cost: it was packed from a Windows clone that core.autocrlf had checked out with CRLF line endings. `cargo package` packs the bytes of the working tree, so most of its sources differ from the commit that its .cargo_vcs_info.json records, although Git reported the tree as clean. Since microsoft#764, nvx-rs checks out with LF on every platform, but a clone keeps the CRLF files that it checked out before then until it checks them out again. Add a section on the nvx crate to the delivery guide. A pull request sets the version of each release in nvx-rs/Cargo.toml and in the nvx requirements of aci_edge_sandboxes and its model, changes only nvx's version in the three lockfiles that pin it, and repins the release that the bundled feature downloads when the control contract changes, since bundled builds of the published crate fail otherwise. A crate owner then publishes from a fresh clone of dev, after checking that no nvx-rs file is checked out with CRLF line endings, that the bundled feature stages the pinned release, and that a dry run packs and builds the crate. dev already declares 0.1.0-alpha.3, which crates.io lacks, so microsoft#903 needs only the publication. The checks pass on dev at 8709dc8, which contains 36f8a62: no file is checked out with CRLF line endings, the bundled feature stages v0.1.0-dev.9ceb89fcc31f, whose manifest declares the crate's control contract, and the dry run packs and builds 308 files, 1.4 MiB compressed, whose sources match their blobs in the commit byte for byte. Part of microsoft#903. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
nvx0.1.0-alpha.2 was packaged from a working tree thatcore.autocrlfhad checked out with CRLF line endings.cargo packagepacks the working tree's bytes, so 220 of the package's files differ from c9aa406, the commit that its.cargo_vcs_info.jsonnames, which stores them with LF. Git reported that tree as clean, so the package isn't marked dirty either. Builds are unaffected, because rustc reads CRLF sources as LF and the crate embeds no files, but a consumer that checks a package against the commit it names rejects 0.1.0-alpha.2. 0.1.0-alpha.1 matched its commit byte for byte..gitattributes:nvx-rs/** text=auto eol=lfchecks the crate's directory out with LF on every platform, whatevercore.autocrlfsays. Every file undernvx-rsis already stored with LF, so no content changes.nvx-rs/Cargo.tomlmoves to0.1.0-alpha.3, whichaci_edge_sandboxesandaci_edge_sandboxes_modelnow require. In the three lockfiles, onlynvx's version changes. Since 0.1.0-alpha.2,devhas added the strict GPT reader (nvx-rs: add a strict GPT reader for layered root disks #673).Publishing
Git applies the new attribute only when it writes a file. A clone that already has CRLF copies keeps them for every file that this merge doesn't change, and
git statusstill shows it as clean. Publish from a fresh clone of the mergeddevcommit, or refreshnvx-rsin the existing clone first:Once 0.1.0-alpha.3 is out, 0.1.0-alpha.2 could be yanked.
Validation
On a Windows host, in fresh clones with
core.autocrlf=true:nvx-rschecks out with LF, while other directories check out with CRLF.cargo package --lockedpackages 230 files and verifies the build. All 228 files that come fromnvx-rs, includingCargo.toml.orig, have the blobs of the commit that.cargo_vcs_info.jsonnames, and none has CRLF.dev(d945e27), the same steps package 226 files with CRLF.devand then switched to this branch still has 225 CRLF files innvx-rs. After the two commands above, it has none.cargo metadata --lockedsucceeds innvx-rs,aci_edge_sandboxesandtests/runtime-adapter.