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

Put build artifact tracking in integrity file #3224

Merged
merged 3 commits into from
Apr 22, 2017
Merged

Conversation

sebmck
Copy link
Contributor

@sebmck sebmck commented Apr 21, 2017

Summary

This moves build artifact tracking away from the cache metadata and into the integrity file.

I suspect this should fix #1981 as the cause seems to be that they restore node_modules and not Yarn's internal cache.

Test plan

Existing tests.

Copy link
Member

@bestander bestander left a comment

Choose a reason for hiding this comment

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

Reluctantly approve.

This fixes a bug which is a higher pri but integrity-checker needs some refactoring love.
I am eager to give it a look next week because I was planning to move integrity check to earlier before install starts.

@@ -329,6 +329,12 @@ export class Install {
return true;
}

const {artifacts} = match;
Copy link
Member

Choose a reason for hiding this comment

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

Is it the right place?
bailout() function is overridden in add.js.

In the next couple of weeks I'd like to do integrity check earlier in install phase.

@@ -247,6 +251,7 @@ export default class InstallationIntegrityChecker {
integrityFileMissing: false,
integrityMatches,
missingPatterns,
artifacts: expected ? expected.artifacts : null,
Copy link
Member

Choose a reason for hiding this comment

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

Returning artifacts from check seems to break cohesion of the check function.
Makes sense from performance point of view because we already parse integrity file here but I would rather have a separate function that returns integrity file.

Side note: my fault that check command has side effects (reporter logs), I plan to refactor it.

@bestander bestander merged commit bb927d0 into master Apr 22, 2017
@bestander
Copy link
Member

bestander commented Apr 22, 2017

Let's merge it now, I'll be refactoring integrity-checker next week

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.

Installing node-sass and rebuilding/using it results in module not found
2 participants