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

[DEVOPS] Nix dependency fix #1514

Merged
merged 2 commits into from Aug 7, 2019
Merged

[DEVOPS] Nix dependency fix #1514

merged 2 commits into from Aug 7, 2019

Conversation

Sam-Jeston
Copy link
Contributor

There were 2 issues here:

1. yarn2nix bug
The bug is defined in this issue: nix-community/yarn2nix#53

Due to a new linting dependency, we ended up with this in our yarn.lock:

"@types/events@*":
  version "3.0.0"
  resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"

events@^3.0.0:
  version "3.0.0"
  resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88"

The existing release of yarn2nix fails to differentiate between @types and regular dependencies if their version is exactly the same.

To resolve this, I just rolled the lint dependency back a major version. It still worked and resolved this issue. I ran yarn run lint and yarn run lint:fix to verify the package still works.

We can upgrade to the newer version of yarn2nix to prevent this in the future (although its an unlikely outcome). When we tried the newer version of yarn2nix, unexpectedly some packages had to be changed in the package.json (for no apparent reason), and I had to update the bable config handling to get flow passing, and I'd prefer avoid that.

2. yarn.lock version changes
By deleting and recreating the yarn.lock, we lose its value. In this instance, a dependency of a dependency had gone up a minor version, and this caused the break as it had been loosely specified by that parent dependency. I've now specified this resolutely in the package.json, but not deleting and re-creating the yarn.lock will protect us from this.

Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

Great fix @Sam-Jeston 🎉

@nikolaglumac
Copy link
Contributor

This broken CI nix issue was caused by this PR: #1483
cc @daniloprates @tomothespian

@tomothespian we need to make sure if we update these packages that you added for style linting that CI is passing before merging it.

@nikolaglumac nikolaglumac merged commit c7a5fe1 into develop Aug 7, 2019
@iohk-bors iohk-bors bot deleted the nix-dependency-fix branch August 7, 2019 08:22
@nikolaglumac nikolaglumac changed the title Nix dependency fix [DEVOPS] Nix dependency fix Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants