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

[DEVOPS-1045] pkgs/generate.sh: Fix purity of script #3677

Merged
merged 2 commits into from
Sep 28, 2018

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Sep 28, 2018

Description

It was returning different results on Buildkite compared to when run locally.

Linked issue

https://iohk.myjetbrains.com/youtrack/v2/issue/DEVOPS-1045

Type of change

  • Bug fix for build scripts and dev environment

QA Steps

./pkgs/generate.sh
git diff  # there should be no difference

It was returning different results on Buildkite compared to when run
locally.
@rvl rvl requested review from denisshevchenko and a team September 28, 2018 03:55
pkgs/regen.nix Outdated Show resolved Hide resolved
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'd like to not carry-on with duplicating jemalloc overlay. If others deem it best to merge as-is and fix in a follow-up, I'm fine with that though. I'm also not sure how much longer we want to support nix 1 hacks.

Also, shell check is broken:

In ./pkgs/generate.sh line 8:
exec $(nix-build --no-out-link regen.nix) "$@"
     ^-- SC2046: Quote this to prevent word splitting.

pkgs/regen.nix Outdated Show resolved Hide resolved

# Update this if you need a package version recently uploaded to hackage.
# Any timestamp works.
, hackageSnapshot ? "2018-07-17T09:58:14Z"
Copy link
Contributor

Choose a reason for hiding this comment

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

what happens if we run it without hackageSnapshot? I'm just wondering, because the LTS is specified in stack.yaml. Is this if the default in nixpkgs doesn't have that LTS version in it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This timestamp is provided as an option to stack2nix. It needs to be there so that stack2nix has reproducible results (without it, latest hackage snapshot would be used).

pkgs/regen.nix Show resolved Hide resolved
@rvl rvl force-pushed the devops-1045-pkgs-generate-sh branch from 1a03584 to b4a8980 Compare September 28, 2018 15:52
@disassembler disassembler merged commit 87379c0 into develop Sep 28, 2018
@disassembler disassembler deleted the devops-1045-pkgs-generate-sh branch September 28, 2018 16:43
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.

3 participants