Update ndc-spec to get the build working. #111
Merged
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.
What
ndc-spec v0.1.0-rc.8 uses workspace inheritance to set the version and edition, which unfortunately does not work with Crane for Nix (when using Git targets).
I have inlined the version and edition to solve this, but we also need to release a new version of ndc-spec and update ndc-sdk.
Until that happens, let's just override it (transitively) using
patch
in Cargo.toml.How
[patch."..."]
, in Cargo.toml, allows us to hijack a dependency and point it somewhere else. Unlike just setting the version, this works transitively, so it will also update ndc-sdk. This is important because it's the dependency build step which fails in Crane, so we need to ensure we have no reference to the previous version.Unfortunately, there's an open bug in Cargo which means that patch overrides can't use the same Git repository, even if the commit reference is different. We work around this by adding an extra "/" to trick Cargo into thinking it's a different repository.