Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion nix/overlays/dfinity-sdk.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ self: super: {
dfinity-sdk = rec {
packages = rec {
rust-workspace = super.callPackage ../rust-workspace.nix {};
rust-workspace-debug = rust-workspace.override (_: {
rust-workspace-debug = (rust-workspace.override (_: {
release = false;
doClippy = true;
doFmt = true;
doDoc = true;
})).overrideAttrs (oldAttrs: {
name = "${oldAttrs.name}-debug";
});
rust-workspace-doc = rust-workspace-debug.doc;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The changes in this PR highlighted that the docs are built via the debug workspace, so the docs are built as dfinity-sdk-rust-debug-doc.

Do we want this instead?

Suggested change
rust-workspace-doc = rust-workspace-debug.doc;
rust-workspace-doc = rust-workspace.doc;

Copy link
Contributor

Choose a reason for hiding this comment

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

rust-workspace has doDoc ? false, and I don't know if we want to generate docs from the debug rust or the release rust. Is there a difference?

Copy link
Contributor

Choose a reason for hiding this comment

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

Main repo has docs generated from debug.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@basvandijk let me know if this makes any difference and I'll follow up if necessary

Copy link
Contributor

@basvandijk basvandijk Sep 30, 2019

Choose a reason for hiding this comment

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

Great idea about the name = "${oldAttrs.name}-debug"; override. I'll do the same in the dfinity repo.

As @hansl already mentioned rust-workspace doesn't generate docs but rust-workspace-debug does. Building documentation actually requires debug builds which is the reason we enable docs in rust-workspace-debug to reuse some already built artifacts.

};
Expand Down