Skip to content

nvx-rs: version the nvx crate 0.1.0-alpha.3 and check it out with LF - #764

Merged
Enrique Saurez (esaurez) merged 2 commits into
devfrom
esaurez/nvx-rs-alpha3-lf-20261022
Oct 22, 2026
Merged

Enrique Saurez (esaurez) merged 2 commits into
devfrom
esaurez/nvx-rs-alpha3-lf-20261022

Conversation

@esaurez

Copy link
Copy Markdown
Contributor

Summary

nvx 0.1.0-alpha.2 was packaged from a working tree that core.autocrlf had checked out with CRLF line endings. cargo package packs the working tree's bytes, so 220 of the package's files differ from c9aa406, the commit that its .cargo_vcs_info.json names, 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=lf checks the crate's directory out with LF on every platform, whatever core.autocrlf says. Every file under nvx-rs is already stored with LF, so no content changes.
  • nvx-rs/Cargo.toml moves to 0.1.0-alpha.3, which aci_edge_sandboxes and aci_edge_sandboxes_model now require. In the three lockfiles, only nvx's version changes. Since 0.1.0-alpha.2, dev has 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 status still shows it as clean. Publish from a fresh clone of the merged dev commit, or refresh nvx-rs in the existing clone first:

git rm -r -q --cached nvx-rs
git reset -q --hard

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:

  • At this branch, nvx-rs checks out with LF, while other directories check out with CRLF. cargo package --locked packages 230 files and verifies the build. All 228 files that come from nvx-rs, including Cargo.toml.orig, have the blobs of the commit that .cargo_vcs_info.json names, and none has CRLF.
  • At dev (d945e27), the same steps package 226 files with CRLF.
  • A clone checked out at dev and then switched to this branch still has 225 CRLF files in nvx-rs. After the two commands above, it has none.
  • cargo metadata --locked succeeds in nvx-rs, aci_edge_sandboxes and tests/runtime-adapter.

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
Copilot AI balanced review requested due to automatic review settings October 22, 2026 16:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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 nvx version 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
Copilot AI balanced review requested due to automatic review settings October 22, 2026 17:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The narrowly scoped checkout, version, dependency, and test changes are consistent, with no unresolved blocking findings.

No open issues 🎉

Review effort: Balanced

@esaurez
Enrique Saurez (esaurez) merged commit 4751947 into dev Oct 22, 2026
40 checks passed
@esaurez
Enrique Saurez (esaurez) deleted the esaurez/nvx-rs-alpha3-lf-20261022 branch October 22, 2026 18:05
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>
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