Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

[DEVOPS-949] nix: Support building from git worktrees #3691

Merged
merged 1 commit into from
Oct 1, 2018

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Oct 1, 2018

Description

Previously it would fail to get the gitrev value:

error: illegal name: '.git'
(use '--show-trace' to show detailed location information)

You would have to supply a --argstr gitrev NNN manually to get it to work.

Linked issue

https://iohk.myjetbrains.com/youtrack/issue/DEVOPS-949

Type of change

  • Bug fix to build system and dev environment.

QA Steps

git checkout develop
git worktree add ../csl/devops-949 devops-949-nix-git-worktree
cd ../csl/devops-949
nix-build -A cardano-sl-wallet-new-static
./result/bin/cardano-node --version

Previously it would fail to get the gitrev value:

    error: illegal name: '.git'
    (use '--show-trace' to show detailed location information)
@rvl rvl requested a review from a team October 1, 2018 06:11
Copy link
Contributor

@angerman angerman left a comment

Choose a reason for hiding this comment

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

I'm not so happy about the amount of nix glue code we keep adding...

Don't see a way around it though either.

LGTM.

@rvl
Copy link
Contributor Author

rvl commented Oct 1, 2018

I'm not so happy about the amount of nix glue code we keep adding...

Me neither. We could move the problem into nixpkgs by upstreaming the fix. :-) Or add a nix builtin.
It will be good to delete this code, but in the meantime this will solve a usability bug.

Copy link
Contributor

@disassembler disassembler left a comment

Choose a reason for hiding this comment

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

I've had this problem since I started here, but haven't worried about it, I just added an arg override for gitrev. This looks good to me! I also think we should upstream it.

@rvl rvl merged commit 886ba71 into develop Oct 1, 2018
@rvl rvl deleted the devops-949-nix-git-worktree branch October 1, 2018 21:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants