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.
Cargo cannot include files outside of a package's root directory. We currently have includes that violate this rule. This never surfaced since we don't depend on these files being included and Cargo doesn't warn when a file couldn't be included. This isn't well documented either. (refs: https://doc.rust-lang.org/cargo/reference/manifest.html#the-exclude-and-include-fields, rust-lang/cargo#10617 (comment))
The workaround here is using symlinks which will be packaged up correctly. I tested this via
cargo package
, both using--list
as well as inspecting the resulting.crate
file.In addition, the README file for libcnb is located outside of the package root directory as well. Since we include that file as documentation in the source, compilation fails when the packaged crate is being compiled from scratch. This prevents vendoring (via
cargo vendor
) oflibcnb
.I'm not entirely sure why the README include doesn't work with
cargo vendor
since theREADME.md
is correctly included in the.crate
file I manually downloaded from crates.io. I suspect that the Cargo metadata that references the README file outside of the package root directory makescargo vendor
skip this file. This also means I cannot 💯 confirm this PR fixes the vendoring issue without publishing to crates.io.Closes GUS-W-11828824