Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Undo loop optimization - #2077

Merged
Mikhail Arkhipov (MikhailArkhipov) merged 9 commits into
masterfrom
u2
Jun 19, 2020
Merged

Mikhail Arkhipov (MikhailArkhipov) merged 9 commits into
masterfrom
u2

Conversation

@MikhailArkhipov

Copy link
Copy Markdown

Undo #1686. Basically fork right before the PR then cherry pick changes on top. Also removes caching services.

Fixes #1988 and probably some others - to be verified.
Some tests became less stable due to old loop resolution issues.

Comment thread src/Analysis/Ast/Impl/Analyzer/StubMerger.cs
@PhilipMay

Copy link
Copy Markdown

This is great. Many thanks. I hope #1988 can be fixed soon.

@jakebailey

Copy link
Copy Markdown
Member

There seem to be some regressions in the __all__ handling. Might be something that was over-reverted, since I know the loop dependency stuff was using it to some extent.

@MikhailArkhipov

Copy link
Copy Markdown
Author

Minimized differences and ported fixes from PRs that were not taken due to compatibility problems with old code.

@MikhailArkhipov

Copy link
Copy Markdown
Author

What happened to __all__? Yes, loop resolution can definitely affect that. Theoretically it is possible to build off commit right before the loop one and compare if behavior is the same.

@jakebailey

Jake Bailey (jakebailey) commented Jun 17, 2020 •

Copy link
Copy Markdown
Member

If you run the whole test suite, many of the __all__ related tests fail.

@MikhailArkhipov

Copy link
Copy Markdown
Author

Ran full stack, mine's are clean except one import ordering (it uses os and path which have loops, I guess I need to update the test).

image

image

@jakebailey

Copy link
Copy Markdown
Member

Those LS results appear to be cached; if I run them I get:

image

@MikhailArkhipov

Mikhail Arkhipov (MikhailArkhipov) commented Jun 17, 2020 •

Copy link
Copy Markdown
Author

Those are not cached, they turn this way when you re-run individual tests. HoverSpanCheck was a known problem, typically passes on re-run. In MissingImports SymbolOrdering2 failed, very long test. Fixed.

What fails for you in highlight and imports? Are you on 3.8 or higher?

@jakebailey

Copy link
Copy Markdown
Member

Well, this is embarrassing. I'm still on your undo branch. I didn't see that this PR was being made from a branch on the repo itself rather than a fork. I'll retest.

@jakebailey

Copy link
Copy Markdown
Member

Yeah, now that I run the actual code it passes... 😄

I'll spot check this on some real code.

@MikhailArkhipov

Copy link
Copy Markdown
Author

This should be off my fork, u2 branch

@jakebailey Jake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Checked it with a few projects, things appear to work as they do now (just without the loop messages, of course).

@PhilipMay

Philip May (PhilipMay) commented Jun 19, 2020 •

Copy link
Copy Markdown

Is these anything that can be done on Code comment level so this bug will not be introduced again? Are there regression tests possible?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find all References does not search in subdirectories

3 participants