Skip to content
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

Add test git-dep-with-submodule #111

Closed

Conversation

Hoverbear
Copy link

@Hoverbear Hoverbear commented Jun 20, 2020

A reproduction test and working on a fix for #110.

Reproduce with

nix build -f test.nix git-dep-with-submodule

Signed-off-by: Ana Hobden <operator@hoverbear.org>
@Hoverbear Hoverbear requested a review from nmattia as a code owner June 20, 2020 14:24
@@ -121,6 +121,12 @@ let
cargoOptions = (opts: opts ++ [ "--locked" ]);
};

git-dep-with-submodule = naersk.buildPackage {
doCheck = true;
src = ./test/git-dep-with-submodule;
Copy link
Member

@cole-h cole-h Jun 20, 2020

Choose a reason for hiding this comment

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

I think you forgot to check in the testcase itself.

$ nix build -f test.nix git-dep-with-submodule
error: opening file '/home/vin/workspace/vcs/naersk/test/git-dep-with-submodule/Cargo.toml': No such file or directory
(use '--show-trace' to show detailed location information)

Copy link
Author

Choose a reason for hiding this comment

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

Yup I did! 🤦‍♀️

Good news is this new commit includes a fix!

Signed-off-by: Ana Hobden <operator@hoverbear.org>
@Hoverbear Hoverbear changed the title Add reproduction case for git-dep-with-submodule Add test git-dep-with-submodule & support git-dep-with-submodule Jun 20, 2020
@Hoverbear Hoverbear changed the title Add test git-dep-with-submodule & support git-dep-with-submodule Add test git-dep-with-submodule Jun 20, 2020
@Hoverbear
Copy link
Author

So I included a ... partial fix? I'm not sure. I don't think moving to pkgs.fetchgit is better. Unfortunately submodules = true; isn't supported on fetchGit... Do you have any advice?

Copy link
Collaborator

@nmattia nmattia left a comment

Choose a reason for hiding this comment

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

I don't understand what this changes to the actual naersk code unfortunately! Is fetchgit actually used?

@@ -1,4 +1,4 @@
{ lib, writeText, runCommand, remarshal }:
{ lib, writeText, runCommand, remarshal, fetchgit }:
Copy link
Collaborator

Choose a reason for hiding this comment

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

is fetchgit actually used?

Copy link
Author

Choose a reason for hiding this comment

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

So I actually got stuck here, since fetchgit requires sha256 and as far as I can tell we don't have that! The builtins.fetchGit doesn't, but it's not due for release until Nix 2.4 (Domen told me!)

I could use your guidance or assistance. :)

@Hoverbear
Copy link
Author

I don't have a working solution to this so I'll close and leave the report open. :)

@Hoverbear Hoverbear closed this Jul 16, 2020
@nmattia
Copy link
Collaborator

nmattia commented Jul 20, 2020

Hey! I couldn't give this more attention, I have a lot on my plate at the moment. I'll try to look #110 as soon as possible. In the meantime, thanks for giving this a shot!

@Hoverbear
Copy link
Author

I think we all do right now. :) Keep up your really amazing work @nmattia ! Thanks for looking at this!

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