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

Simplify code thanks to migration from v0.4 #179

Merged
merged 11 commits into from
Mar 6, 2017
Merged

Simplify code thanks to migration from v0.4 #179

merged 11 commits into from
Mar 6, 2017

Conversation

TotalVerb
Copy link
Collaborator

@TotalVerb TotalVerb commented Feb 5, 2017

The first commit deletes a lot of code to guess the return types of function calls in cases where inference can handle it.

The second commit replaces evaltype and parsetype with a single function that is more general and sophisticated than the existing one.

The third commit deletes a large amount of 0.4-specific code that is no longer necessary, and deletes some uses of eval where safer, less dynamic infrastructure exists.

The fourth commit fixes bug #167 and also replaces some uses of typeof(x) == T with isa(x, T).

The fifth commit includes tests for all the bugs fixed by this PR, except #167 which is tested in test/docs.jl.

The sixth commit improves the detection of when a type is considered mutable, which fixes several old issues; both #56 and #84 are fixed.

The seventh commit removes code specific to 0.4 dealing with vect, which is now well-defined and legal. This fixes #81 and #195.

The eighth and ninth commits fix Dict linting on v0.6, which was broken due to a change in the Expr representation.

The tenth commit disables some tests on 0.5 for which the special cases allowing them to pass have been removed. In 0.6 and future releases those special cases are not necessary, and so I feel it is unnecessary to keep special cases around for those obscure cases.

The eleventh commit disables the self-lint test because of #200, and fixes a test hang on 0.6.

All of these issues are fixed, and test has been added to test/bugs.jl:

Fixes #56
Fixes #79
Fixes #81
Fixes #84
Fixes #88
Fixes #122
Fixes #167 [test is in test/doc.jl]
Fixes #195

I checked several old issues to see if they were fixed, and these ones were, but probably not by this PR (likely some intervening change fixed them). Tests have been added (see test/bugs.jl) to confirm that the bugs are fixed. I include them here because this PR tests for them, and because GitHub should close them when this is merged.

Closes #135

@TotalVerb
Copy link
Collaborator Author

There seems to be a hang in the v0.6 tests. I'll investigate that.

@coveralls
Copy link

coveralls commented Mar 6, 2017

Coverage Status

Coverage increased (+1.2%) to 87.682% when pulling 3a9949f on TotalVerb:fw/code-simplify into 28d02ec on tonyhffong:master.

@coveralls
Copy link

coveralls commented Mar 6, 2017

Coverage Status

Coverage increased (+2.06%) to 88.532% when pulling 7cc7696 on TotalVerb:fw/code-simplify into 28d02ec on tonyhffong:master.

@TotalVerb
Copy link
Collaborator Author

@tonyhffong @Michael-Klassen @TeroFrondelius This is ready for review/merge.

@TotalVerb TotalVerb changed the title WIP: Simplify code thanks to migration from v0.4 Simplify code thanks to migration from v0.4 Mar 6, 2017
line = ""
while line != "\n"
line = "."
while !isempty(line)
Copy link
Contributor

Choose a reason for hiding this comment

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

My guess is that this change hangs the lintserver().

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This change was needed to prevent a hang. On v0.6, readline changed to remove trailing newlines.

Copy link
Contributor

Choose a reason for hiding this comment

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

My bad, I was late with my review, I thought the lintserver hang was still a problem.

@TeroFrondelius
Copy link
Contributor

For me this looks good. Although my competence is not enough to review all the changes and their possible effects. Then again code test coverage is relatively high, if tests pass then I want to believe this is not breaking anything.

@Michael-Klassen Michael-Klassen merged commit 564469e into tonyhffong:master Mar 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment