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

[DEVOPS-916] nix: Fix slow eval of cardano-sl-explorer-frontend #3137

Merged
merged 1 commit into from
Jun 26, 2018

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Jun 26, 2018

Description

yarn2nix needs to have a src argument to generate its nix expression (at evaluation time). It's not good if building src depends on building cardano-sl.

Linked issue

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

Type of change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🛠 New feature (non-breaking change which adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
  • 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
  • 🔨 New or improved tests for existing code
  • ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

  • I have read the style guide document, and my code follows the code style of this project.
  • If my code deals with exceptions, it follows the guidelines.
  • I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.

Testing checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.

QA Steps

nix-instantiate -A cardano-sl-explorer-frontend
# (verify that cardano-sl is not built or fetched)
nix-build -A cardano-sl-explorer-frontend
ls -l ./result

yarn2nix needs to have a src argument to generate its nix
expression. It's not good if building src depends on building
cardano-sl.
@rvl rvl requested a review from iohk-devops as a code owner June 26, 2018 12:17
Copy link
Contributor

@deepfire deepfire left a comment

Choose a reason for hiding this comment

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

Most importantly this moves the cardano-explorer-hs2purs invocation (and therefore the dependency on cardano-explorer and cardano-sl) from the attribute defining the frontend source to the actual frontend build -- so it only gets evaluated when we build, not when we evaluate the attribute set.

@rvl
Copy link
Contributor Author

rvl commented Jun 26, 2018

Yes, exactly. Thanks.

@rvl rvl merged commit 783cd2a into develop Jun 26, 2018
@rvl rvl deleted the devops-916-explorer-frontend-eval branch June 26, 2018 13:30
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.

2 participants