Skip to content

Update ndc-spec to get the build working. #111

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

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

SamirTalwar
Copy link
Contributor

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.

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_.
@SamirTalwar SamirTalwar enabled auto-merge October 26, 2023 08:50
@SamirTalwar SamirTalwar added this pull request to the merge queue Oct 26, 2023
Merged via the queue into main with commit 07b4149 Oct 26, 2023
@SamirTalwar SamirTalwar deleted the samirtalwar/ndc-spec-without-inheritance branch October 26, 2023 09:14
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.

2 participants