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

Change the Normalization algorithm #51

Merged
merged 3 commits into from
Jul 14, 2017
Merged

Change the Normalization algorithm #51

merged 3 commits into from
Jul 14, 2017

Conversation

johnynek
Copy link
Collaborator

This adds a test for a bug we observed in how we
rewrite the Normalized graph. The old algorithm
had bugs and was more complex. The current algorithm
builds up the final graph by starting at the roots
with the normalized versions of anything reachable.

This adds a test for a bug we observed in how we
rewrite the Normalized graph. The old algorithm
had bugs and was more complex. The current algorithm
builds up the final graph by starting at the roots
with the normalized versions of anything reachable
@johnynek
Copy link
Collaborator Author

cc @non

@johnynek
Copy link
Collaborator Author

@ianoc review?

@ianoc
Copy link
Collaborator

ianoc commented Jul 14, 2017

lgtm

@johnynek johnynek merged commit 78f98b7 into master Jul 14, 2017
@kevingessner
Copy link
Contributor

@johnynek This change appears to be causing some problems in my repository -- when I run generate, some dependencies that are in dependencies.yaml are not generated. Reverting this commit fixes it.

I'm trying to come up with a small test case to track down the problem. I'll keep you posted.

@johnynek
Copy link
Collaborator Author

Okay.

That's strange because we explicitly find all the root dependencies and put in all their transitive dependencies, but maybe the root dependency checking is in correct.

(we tried this on 1 repo internally and worked as expected).

@johnynek
Copy link
Collaborator Author

cc @non

@non
Copy link
Collaborator

non commented Jul 14, 2017

@kevingessner OK, thanks, feel free to pass along a minimized test case would be great, but also feel free to pass along a complete file if that ends up being too much work.

@kevingessner
Copy link
Contributor

@johnynek It looks like roots that have no dependencies aren't added to the normalized graph. For instance com.maxmind.geoip -- if you add that as the only entry in dependencies.yaml, nothing is generated.

@kevingessner
Copy link
Contributor

cc @non ^

@johnynek
Copy link
Collaborator Author

yep....

that makes sense. Sorry.

We can add a test for this case, and make sure to explicitly addNode, not just addEdge.

Or you can take it! :)

val dependencies = dependenciesUv.map { uv =>
MavenCoordinate(uv, canonicals(uv))
}
// add the edges from versionedH -> deps
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

here is the bug. We need to addNode(versionedH) no matter what. cc @non @kevingessner.

Would be nice to add a test to repro, then fix. Unfortunately I'm about to get on a plane and won't have time.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll try that fix.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I can fix this, I have a repro test now.

Copy link
Contributor

Choose a reason for hiding this comment

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

@johnynek @non Fix is here: #53

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.

5 participants