This repository was archived by the owner on Aug 26, 2021. It is now read-only.
Adding error for fake complete=false module#371
Open
pyricau wants to merge 1 commit intosquare:masterfrom
pyricau:py/fake_incomplete
Open
Adding error for fake complete=false module#371pyricau wants to merge 1 commit intosquare:masterfrom pyricau:py/fake_incomplete
pyricau wants to merge 1 commit intosquare:masterfrom
pyricau:py/fake_incomplete
Conversation
It does not make sense to use "complete = false" on a module if there is no missing binding. This can happen after refactorings, or copy pasting. While you can't beat manual review, it also helps to have the compiler let you know that you have it wrong. I've used this branch to chase our "fake incomplete" modules. Turns out we had more then a few, so I think it might be worth making that a feature. This commit is not done yet: I can't build, I have mysterious "java.io package not allowed" errors and also apparently I need to upgrade Maven for Android to build. I'll try to fix that done or steal Jake's laptop. I should also add some tests. In the meantime, let me know if that sounds like the right way to do it. I wonder if it should live in GraphAnalysisProcessor or not.
Contributor
There was a problem hiding this comment.
This is pretty loose. I suspect there's a better way.
Member
Author
There was a problem hiding this comment.
Yep. That's mostly me not knowing what can jump out of there. I guess we don't like checked exceptions for some reason :) .
Contributor
Collaborator
There was a problem hiding this comment.
This can be shortened to:
shouldBeComplete &= errors.isEmpty();
Member
Author
There was a problem hiding this comment.
Because it's so much easier to understand this way :) ?
Collaborator
There was a problem hiding this comment.
At the very least you should be using isEmpty() in the conditional here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It does not make sense to use "complete = false" on a module if there is no missing binding. This can happen after refactorings, or copy pasting. While you can't beat manual review, it also helps to have the compiler let you know that you have it wrong.
I've used this branch to chase our "fake incomplete" modules. Turns out we had more then a few, so I think it might be worth making that a feature.
This commit is not done yet: I can't build, I have mysterious "java.io package not allowed" errors and also apparently I need to upgrade Maven for Android to build. I'll try to fix that done or steal Jake's laptop.
I should also add some tests.
In the meantime, let me know if that sounds like the right way to do it. I wonder if it should live in GraphAnalysisProcessor or not.