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

WiP: refactor: return types of Spoon model methods #2615

Closed
wants to merge 2 commits into from

Conversation

pvojtechovsky
Copy link
Collaborator

@pvojtechovsky pvojtechovsky commented Oct 2, 2018

Alternative of #1852 as fix of #1846
The code of this PR was generated by SniperPrinter. The sources of generator are in this branch.

There are following problems, which has to be solved before we can merge it:

@monperrus
Copy link
Collaborator

I love this first massive refactoring with the sniper mode. Eat your own dog food!

@monperrus
Copy link
Collaborator

41 problems caused by change in return types

can you post them so as to inform our decision on this?

@pvojtechovsky
Copy link
Collaborator Author

can you post them so as to inform our decision on this?

here you are CSV with error descriptions: errors.csv

@surli
Copy link
Collaborator

surli commented Oct 9, 2018

the order of imports is changed by printer (see # #2638). Note: it is not using sniper mode for imports. @surli do you think we can modify import printer by way it keeps the order from origin sources?

I think I use HashSet everywhere for the imports, so we should change that to use LinkedHashSet and it should works almost immediately.

@pvojtechovsky
Copy link
Collaborator Author

I think I use HashSet everywhere for the imports, so we should change that to use LinkedHashSet and it should works almost immediately.

It is true that HashSet is used, but then the imports are somehow "sorted", so any previous order is ignored anyway.

I think only sniper mode should try to keep origin order of imports. The normal mode is just responsible for providing of correct set of imports, which can be then printed in somehow defined order.

Actually the problem is that some imports are missing ... E.g. in CtElement the static CtRole.COMMENT. I made #2621 to fix it, but I run into bigger problems, so I need your feedback in #2624

pvojtechovsky added a commit to pvojtechovsky/spoon that referenced this pull request Oct 21, 2018
pvojtechovsky added a commit to pvojtechovsky/spoon that referenced this pull request Oct 21, 2018
pvojtechovsky added a commit to pvojtechovsky/spoon that referenced this pull request Oct 22, 2018
@monperrus
Copy link
Collaborator

Pass to close staled PRs. Feel free to reopen if appropriate.

@monperrus monperrus closed this Jun 14, 2020
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.

3 participants